[infinispan-issues] [JBoss JIRA] (ISPN-9412) HotRod Transaction Cache PESSIMISTIC locking mode is not locking the key in another transaction

Diego Lovison (JIRA) issues at jboss.org
Wed Aug 8 09:41:01 EDT 2018


Diego Lovison created ISPN-9412:
-----------------------------------

             Summary: HotRod Transaction Cache PESSIMISTIC locking mode is not locking the key in another transaction
                 Key: ISPN-9412
                 URL: https://issues.jboss.org/browse/ISPN-9412
             Project: Infinispan
          Issue Type: Bug
            Reporter: Diego Lovison
            Priority: Critical


I am expecting the thread 2 be blocked in `cache.put(k1, v1)` until thread 1 has committed the transaction

According to the docs, using Pessimistic transactional cache, when cache.put(k1,v1) returns, k1 is locked and no other transaction running anywhere in the cluster can write to it. Reading k1 is still possible. The lock on k1 is released when the transaction completes (commits or rollbacks).

Cache Configuration
{code:java}
      return new org.infinispan.configuration.cache.ConfigurationBuilder()
         .clustering().cacheMode(CacheMode.DIST_SYNC)
         .jmxStatistics().enable()
         .transaction()
            .cacheStopTimeout(0L)
            .transactionManagerLookup(new EmbeddedTransactionManagerLookup())
            .lockingMode(LockingMode.PESSIMISTIC)
            .locking().isolationLevel(IsolationLevel.REPEATABLE_READ)

      .build();
{code}




--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list