r10010 - helma/helma/trunk/src/helma/objectmodel/db
[email protected] Tue, 26 Jan 2010 17:18:58 +0100 (CET)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20100126161858.5BB9B3D0E2@mia> |
Author: hannes
Date: 2010-01-26 17:18:58 +0100 (Tue, 26 Jan 2010)
New Revision: 10010
Modified:
helma/helma/trunk/src/helma/objectmodel/db/NodeManager.java
Log:
Do not use child collection timestamp as cache guard for object references.
Proper fix for bug 697 <http://dev.helma.org/bugs/show_bug.cgi?id=697>
Details at http://dev.helma.org/trac/helma/changeset/10010
Modified: helma/helma/trunk/src/helma/objectmodel/db/NodeManager.java
===================================================================
--- helma/helma/trunk/src/helma/objectmodel/db/NodeManager.java 2010-01-26 15:56:18 UTC (rev 10009)
+++ helma/helma/trunk/src/helma/objectmodel/db/NodeManager.java 2010-01-26 16:18:58 UTC (rev 10010)
@@ -201,7 +201,7 @@
Key key;
DbMapping otherDbm = rel == null ? null : rel.otherType;
- // check what kind of object we're looking for and make an apropriate key
+ // check what kind of object we're looking for and make an appropriate key
if (rel.isComplexReference()) {
// a key for a complex reference
key = new MultiKey(rel.otherType, rel.getKeyParts(home));
@@ -278,7 +278,9 @@
} else {
// node fetched from db is null, cache result using nullNode
synchronized (cache) {
- cache.put(key, new Node(home.getLastSubnodeChange()));
+ // do not use child collection timestamp as cache guard for object references
+ long lastchange = rel.isComplexReference() ? 0 : home.getLastSubnodeChange();
+ cache.put(key, new Node(lastchange));
// we ignore the case that onother thread has created the node in the meantime
return null;