Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6978

AffinityIndexManager does not work on transactional caches

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.Beta1
    • 9.0.0.Alpha4
    • Embedded Querying
    • 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

      Attachments

        Activity

          People

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: