[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1577) Cannot clear a distributed cache locally
Galder Zamarreno (JIRA)
jira-events at lists.jboss.org
Mon Apr 19 12:20:50 EDT 2010
[ https://jira.jboss.org/jira/browse/JBCACHE-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12526500#action_12526500 ]
Galder Zamarreno commented on JBCACHE-1577:
-------------------------------------------
The issue only affects removeNode(Fqn.ROOT);, any other local node remove works fine.
The fix looks fine although the null check is not necessary since getOptionOverrides() always returns non null.
> 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
> Fix For: 3.2.3.GA
>
> Attachments: removeNodeFix.diff, TestRemoveNode.java
>
>
> 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
More information about the jbosscache-issues
mailing list