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

tbech (JIRA) jira-events at lists.jboss.org
Tue Jan 19 04:35:48 EST 2010


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: exc.txt

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