Rich DiCroce created ISPN-4443:
----------------------------------
Summary: Key Transformer cannot be registered early enough
Key: ISPN-4443
URL:
https://issues.jboss.org/browse/ISPN-4443
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.0.2.Final
Reporter: Rich DiCroce
Assignee: Mircea Markus
I have a replicated mode cache that has an index stored on each node using the RAM
directory provider. I can't annotate the key class with @Transformable, so I'm
using SearchManagerImplementor#registerKeyTransformer() instead. When the second node
starts up, I get the below exception for about 50 milliseconds because the first node is
putting stuff in the cache, and the cache has been started on the second node, but the
Transformer hasn't been registered yet.
As far as I can tell, this is a catch-22 that is impossible to avoid. I have to obtain a
Cache in order to register the Transformer, but getting the cache causes the cache to be
started before I can register the Transformer. The exceptions stop after the Transformer
is registered, but I don't know what the state of the index is relative to the
contents of the cache. My application will have a serious problem if an entry is in the
cache but not the index.
This problem is similar to ISPN-2575, but not the same.
{code}
2014-06-25 17:51:48,601 ERROR [org.infinispan.interceptors.InvocationContextInterceptor]
(remote-thread-0) ISPN000136: Execution error: java.lang.IllegalArgumentException:
Indexing only works with entries keyed on Strings, primitives and classes that have the
@Transformable annotation - you passed in a class
com.sgi.song.common.message.SONGv1.address.EndpointAddress. Alternatively, see
org.infinispan.query.SearchManager#registerKeyTransformer
at
org.infinispan.query.backend.KeyTransformationHandler.keyToString(KeyTransformationHandler.java:153)
at org.infinispan.query.backend.QueryInterceptor.keyToString(QueryInterceptor.java:332)
at
org.infinispan.query.backend.QueryInterceptor.updateIndexes(QueryInterceptor.java:221)
at
org.infinispan.query.backend.QueryInterceptor.processPutKeyValueCommand(QueryInterceptor.java:518)
at
org.infinispan.query.backend.QueryInterceptor.visitPutKeyValueCommand(QueryInterceptor.java:164)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPutKeyValueCommand(PessimisticLockingInterceptor.java:111)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at
org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:32)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:255)
at
org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:186)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at
org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:32)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:206)
at
org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:141)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:148)
at
org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:134)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73)
at
org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:32)
at
org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333)
at
org.infinispan.statetransfer.StateConsumerImpl.doApplyState(StateConsumerImpl.java:543)
at org.infinispan.statetransfer.StateConsumerImpl.applyState(StateConsumerImpl.java:495)
at
org.infinispan.statetransfer.StateResponseCommand.perform(StateResponseCommand.java:62)
at
org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:95)
at
org.infinispan.remoting.InboundInvocationHandlerImpl.access$000(InboundInvocationHandlerImpl.java:50)
at
org.infinispan.remoting.InboundInvocationHandlerImpl$2.run(InboundInvocationHandlerImpl.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_05]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_05]
{code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)