Details
-
Bug
-
Resolution: Done
-
Major
-
9.0.0.Alpha4
-
None
Description
Exception thrown:
12:13:52,946 ERROR (testng-ClusteredCacheWithAffinityIndexManagerTx) [InvocationContextInterceptor] ISPN000136: Error executing command GetKeyValueCommand, writing keys [] java.lang.IllegalStateException: Transaction TransactionImple < ac, BasicAction: 0:ffff7f000001:af11:57c02470:0 status: ActionStatus.COMMITTED > is not in a valid state to be invoking cache operations on. at org.infinispan.interceptors.impl.TxInterceptor.enlist(TxInterceptor.java:437) at org.infinispan.interceptors.impl.TxInterceptor.enlistIfNeeded(TxInterceptor.java:395) at org.infinispan.interceptors.impl.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:376) at org.infinispan.interceptors.impl.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:83) at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:41) at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:53) at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeInterceptorsSync(BaseAsyncInvocationContext.java:307) at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.forkInvocationSync(BaseAsyncInvocationContext.java:98) at org.infinispan.interceptors.impl.BaseAsyncInvocationContext.invokeForkAndHandlerSync(BaseAsyncInvocationContext.java:474)
The Hibernate Search engine applies work to index after the transaction is committed, and since the AffinityIndexManager lazily initializes its shards, it tries to call cache operations on a tx commited state which is not allowed on Infinispan