[jbosscache-issues] [JBoss JIRA] Assigned: (JBCACHE-1359) Nodes are not removed during commit if new children have been added to their parents
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Mon Sep 15 06:58:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBCACHE-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mircea Markus reassigned JBCACHE-1359:
--------------------------------------
Assignee: Mircea Markus (was: Manik Surtani)
> Nodes are not removed during commit if new children have been added to their parents
> ------------------------------------------------------------------------------------
>
> Key: JBCACHE-1359
> URL: https://jira.jboss.org/jira/browse/JBCACHE-1359
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.4.1.SP9
> Reporter: Kai Blankenhorn
> Assignee: Mircea Markus
> Fix For: 1.4.X
>
> Attachments: ParentNodesNotUnmarkedTest.java, TreeCache_JBCACHE-1359.diff
>
>
> Say we have a cache instance called "cache" that is configured to use a custom CacheLoader that always returns "value from CacheLoader". Now we call:
> cache.put("/a/b/c", "key", "cachedValue");
> cache.remove(Fqn.ROOT);
> cache.put("/a/B/c", "key", "cachedValue");
>
> commitTx();
> String val = (String) cache.get("/a/b/c", "key");
> assertEquals("value from CacheLoader", val);
> The result will be null instead of "value from CacheLoader".
> The problem is that the parent nodes (for instance, "/a/b") are marked for removal. In the same transaction after removing "/a/b", "/a" is readded and thus unmarked. When the transaction is committed, "/a" is about to be realRemove()d. But this method skips the node and its children, as it is no longer marked for removal. This way "/a/b" is never removed and stays marked for removal.
> When reading "/a/b/c", the iteration over the fqn elements in TreeCache.findInternal() skips all nodes marked for removal, never reaching the requested node.
--
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