[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1565) Locking doesn't work when replication is used

Manik Surtani (JIRA) jira-events at lists.jboss.org
Tue Jan 19 04:53:47 EST 2010


    [ https://jira.jboss.org/jira/browse/JBCACHE-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12506813#action_12506813 ] 

Manik Surtani commented on JBCACHE-1565:
----------------------------------------

Hi there.  In addition to this, you may want to take a look at http://cachebenchfwk.sourceforge.net - the benchmark framework has been moved to its own project on SourceForge and has been heavily modernized (including using Maven to build, which makes updating versions of products trivial).  The framework itself is much more robust too, so despite the current "Alpha" tag on the project page, we use it extensively to benchmark JBoss Cache and Infinispan.



> Locking doesn't work when replication is used
> ---------------------------------------------
>
>                 Key: JBCACHE-1565
>                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1565
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.2.1.GA
>         Environment: Linux, Sun Java 5.0
>            Reporter: tbech
>            Assignee: Manik Surtani
>            Priority: Critical
>         Attachments: ConcurrentWritersTest.java, exc.txt, GetPutCachebenchCluster.xml, GetPutTest.java, JBossCache321Wrapper.java, mvcc-repl-sync.xml
>
>
> During performance tests of JBossCache, I've tried to test transactions with  cache.getInvocationContext().getOptionOverrides().setForceWriteLock operation ('select-for-update'). I've used standard jbosscache benchmark from svn. I've created new product jbosscache3.2.1 based on 3.1.0 and new test. Basicaly it did:
>          try
>          {
>             long startTime = System.nanoTime();
>             if (concurrentWrites) {
> 	            cacheWrapper.startTransaction();
> 	            cacheWrapper.setForceWriteLock(true);
>             }
>             ObjectInCache o = (ObjectInCache) cacheWrapper.get(path, key);
>             o = new ObjectInCache(Integer.valueOf(o.getVal().intValue() + 1), randStr[taskNumber%randStr.length]);
>             cacheWrapper.put(path, key, o);
>             if (concurrentWrites) {
>             	cacheWrapper.endTransaction(true);
>             }
>             long statValue = (System.nanoTime() - startTime);
>             descriptiveStatistics.addValue(statValue);
>          }
>          catch (Throwable e)
>          {
>             log.error("Error appeared whilst writing to cache:" + e.getMessage(), e);
>             try {
>                 if (concurrentWrites) {
>                 	cacheWrapper.endTransaction(false);
>                 }
>             } finally {
>             	
>             }
>          } finally {
>             logRunCount(taskNumber);
>          }
>  concurrentWrites was set to true.
> This tests passes nicely in one node (local mode). However in 2,3,4 nodes it fails after first usage of the same object by different node with exception:
> org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/concurrent/Intermediate-0/Node 0] after [240000] milliseconds for requestor [GlobalTransaction:<10.118.236.212:40325>:0]! Lock held by [GlobalTransaction:<10.118.236.211:8112>:40]
>         at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:159)
> It looks like, in replication the node is not beeing releases after transaction commit.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosscache-issues mailing list