[
https://jira.jboss.org/jira/browse/JBCACHE-1565?page=com.atlassian.jira.p...
]
Manik Surtani reassigned JBCACHE-1565:
--------------------------------------
Assignee: Mircea Markus (was: Manik Surtani)
May be a useful configuration option, if supported by the cache product, to have this
switched on in the wrapper. I wouldn't put it on the wrapper interface though since
that forces impls that do not support such a feature to somehow implement it.
Mircea, do you want to port this issue to the new cache bench fwk's TRAC issue
tracker?
Thanks
Manik
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: Mircea Markus
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