Do not issue a getNodeByKey() if we get a node by relation, just because it's not

a complex reference or create-one-demand relation! This was introduced because
we assumed that the calling code would know what it was doing, i.e. only call this for
objects contained in its subnode index, but as it seems to turn out it didn't, and this isn't
really necessary after all.
This commit is contained in:
hns 2003-12-03 11:58:36 +00:00
parent 2a8a21f822
commit 0f77c3461b

View file

@ -202,14 +202,10 @@ public final class NodeManager {
public Node getNode(Key key) throws Exception { public Node getNode(Key key) throws Exception {
Transactor tx = (Transactor) Thread.currentThread(); Transactor tx = (Transactor) Thread.currentThread();
// tx.timer.beginEvent ("getNode "+kstr);
// it would be a good idea to reuse key objects one day.
// Key key = new Key (dbmap, kstr);
// See if Transactor has already come across this node // See if Transactor has already come across this node
Node node = tx.getVisitedNode(key); Node node = tx.getVisitedNode(key);
if ((node != null) && (node.getState() != Node.INVALID)) { if ((node != null) && (node.getState() != Node.INVALID)) {
// tx.timer.endEvent ("getNode "+kstr);
return node; return node;
} }
@ -279,9 +275,9 @@ public final class NodeManager {
// generated on the fly // generated on the fly
key = new SyntheticKey(home.getKey(), kstr); key = new SyntheticKey(home.getKey(), kstr);
} else { } else {
// refers to a node through its primary database key // Not a relation we use can use getNodeByRelation() for
key = new DbKey(rel.otherType, kstr); System.err.println(" WOMBAT: "+home+" ° "+kstr);
return getNode(key); return null;
} }
// See if Transactor has already come across this node // See if Transactor has already come across this node