]
Krzysztof Sobolewski updated JBCACHE-1552:
------------------------------------------
Attachment: DeletedNodesLoadTest.java
The test case.
Cache.removeNode(Fqn) does not affect cache loading until commit
----------------------------------------------------------------
Key: JBCACHE-1552
URL:
https://jira.jboss.org/jira/browse/JBCACHE-1552
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Cache loaders
Affects Versions: 3.2.1.GA
Reporter: Krzysztof Sobolewski
Assignee: Manik Surtani
Attachments: DeletedNodesLoadTest.java
A sequence of operations like this:
// we have something in the cache
cache.put(fqn, key, value);
// but it's not in memory right now
cache.evict(Fqn.ROOT, true);
tm.begin();
// I want to remove it
cache.removeNode(Fqn.ROOT); // returns false, BTW
// and expect it to not be there
assert cache.get(fqn, key) == null; // fails
tm.commit();
assert cache.get(fqn, key) == null; // passes if no get() in transaction
The problem is that the failing get() loads the node from cache loader. The second
assertion passes, because the modification is recorded in the transaction and carried out
on the cache loader during commit (it is also replicated across the cluster). But
otherwise the cache does not notice the remove().
I think it can also lead to inconsistency between cache loader and transient state (the
get() in transaction loads to memory and commit removes from cache loader).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: