From: Tuukka Lehtonen Date: Mon, 28 Dec 2020 12:46:39 +0000 (+0200) Subject: Fix ClusterSmall.forEachObject implementation X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=2fbeec65ab886c89f0d7bfe401744531ebf233f4;p=simantics%2Fplatform.git Fix ClusterSmall.forEachObject implementation gitlab #661 Change-Id: I7d95bf51d97d7cb8352646f306927ed26ec80db0 --- diff --git a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java index c8309c6bf..b7f097db3 100644 --- a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java +++ b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java @@ -441,15 +441,16 @@ final public class ClusterSmall extends ClusterImpl { int hashBase = predicateIndex + predicateTable.offset; if (predicateTable.table[hashBase-1] < 0) { int objectIndex = TableIntArraySet2.get(predicateTable.table, hashBase, pRef & 0xFFFF); - //int objectIndex = predicateTable.getObjectIndex(predicateIndex, pRef & 0xFFFF); SessionImplSocket session = (SessionImplSocket)graph.getSession(); ClusterSupport support = session.clusterTranslator; forObjects(graph, resourceKey, predicateKey, objectIndex, procedure, support); } else { - procedure.finished(graph); -// graph.dec(); + int objectIndex = TableIntSet2.get(predicateTable.table, hashBase, pRef & 0xFFFF); + SessionImplSocket session = (SessionImplSocket)graph.getSession(); + ClusterSupport support = session.clusterTranslator; + forObjects(graph, resourceKey, predicateKey, objectIndex, procedure, support); } -} + } public void forObjects(ReadGraphImpl graph, int resourceKey, C context, ForEachObjectContextProcedure procedure) throws DatabaseException { if (deleted) return;