]
Adrian Nistor updated ISPN-6978:
--------------------------------
Fix Version/s: 9.0.0.Beta1
AffinityIndexManager does not work on transactional caches
----------------------------------------------------------
Key: ISPN-6978
URL:
https://issues.jboss.org/browse/ISPN-6978
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying
Affects Versions: 9.0.0.Alpha4
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
Fix For: 9.0.0.Beta1
Exception thrown:
{noformat}
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)
{noformat}
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