[infinispan-dev] Externalizer and Commands ID ranges

Sanne Grinovero sanne at infinispan.org
Tue Sep 13 06:24:57 EDT 2011


On 13 September 2011 11:25, Galder Zamarreño <galder at redhat.com> wrote:
>
> On Sep 12, 2011, at 1:32 PM, Sanne Grinovero wrote:
>
>> I've added a new table as suggested by Galder, and sent a pull request
>> to constrain Query in the range I just defined [1]
>>
>> For this case we only have a single byte to share across all commands.
>> Is it reasonable to reserve 100 values for Infinispan core, and blocks
>> of 20 for needing modules?
>>
>> 1 - https://github.com/infinispan/infinispan/pull/526
>
> No need to reserve for Infinispan core cos that's indexed differently to the externally provided commands. Same thing happens for externally defined Externalizers.

That would be nice, but it's not the case currently: If I change the
org.infinispan.query.ModuleCommandIds.CLUSTERED_QUERY from 101 to 12
the test org.infinispan.query.blackbox.ClusteredQueryTest
is going to throw several exceptions with the following stacktrace:

Caused by: java.lang.ClassCastException:
org.infinispan.query.clustered.ClusteredQueryCommand cannot be cast to
org.infinispan.commands.tx.PrepareCommand
	at org.infinispan.commands.CommandsFactoryImpl.initializeReplicableCommand(CommandsFactoryImpl.java:277)
	at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:180)
	at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:199)
	at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:319)
	at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:171)
	at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165)
	at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144)
	... 22 more

Do I have to open a JIRA to change this or are we going to keep the
first 100 reserved for core?

Sanne



More information about the infinispan-dev mailing list