[JBoss JIRA] Created: (JBCACHE-1577) Cannot clear a distributed cache locally
by Nicolas Filotto (JIRA)
Cannot clear a distributed cache locally
----------------------------------------
Key: JBCACHE-1577
URL: https://jira.jboss.org/jira/browse/JBCACHE-1577
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.2.3.CR1
Reporter: Nicolas Filotto
Assignee: Manik Surtani
Attachments: removeNodeFix.diff
I have a distributed cache and I would like to be able to clear it locally so I used the following code:
{code}
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
cache.removeNode(Fqn.ROOT);
{code}
Unfortunatelly, all the nodes are removed in all the cache instances in my cluster. After a deeper investigation, it seems to be a bug in CacheInvocationDelegate.removeNode that doesn't properly set the option overrides since it reuse the same option object that is reset after each call.
I attached a unit test and a patch for this bug.
--
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
14 years, 8 months
[JBoss JIRA] Created: (JBCACHE-1565) Locking doesn't work when replication is used
by tbech (JIRA)
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
14 years, 8 months