On Sep 13, 2011, at 12:24 PM, Sanne Grinovero wrote:

> On 13 September 2011 11:25, Galder Zamarreño <gal...@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?

Hmmm, I think a new JIRA is needed here, cos at first glance, it means that 
https://issues.jboss.org/browse/ISPN-1162 is not fully resolved.

We should not wait until execution to discover this. Given that we already 
check for dups for internal cmds, and ModuleProperties checks for externally 
provided ones, I decided to keep both worlds separate. So, the testcase you 
show above should work.

> 
> Sanne
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to