]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix ClusterSmall.forEachObject implementation 34/4634/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 28 Dec 2020 12:46:39 +0000 (14:46 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 28 Dec 2020 12:46:39 +0000 (14:46 +0200)
gitlab #661

Change-Id: I7d95bf51d97d7cb8352646f306927ed26ec80db0

bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java

index c8309c6bf5303a2909564de1a2f29637a8a34534..b7f097db3796f925f23e7d7414e582529aa47639 100644 (file)
@@ -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 <C> void forObjects(ReadGraphImpl graph, int resourceKey, C context, ForEachObjectContextProcedure<C> procedure) throws DatabaseException {
         if (deleted) return;