X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FClusterTable.java;h=efb644acd78330df99bd86c305a1d21e73646ea7;hb=HEAD;hp=07df23df8a07a95527e40a4018c966bb4ed6ad1e;hpb=7e66fdd1670687a56d8ef980d14d83bfc5f16583;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java index 07df23df8..efb644acd 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java @@ -526,10 +526,11 @@ public final class ClusterTable implements IClusterTable { ArrayList toRelease = new ArrayList(); for (CollectorCluster cluster : support.getResidentClusters()) { - target -= support.getClusterSize(cluster); - if (target > 0) { - toRelease.add(cluster); - } else { + toRelease.add(cluster); + long clusterSize = support.getClusterSize(cluster); + //System.err.println("release cluster with " + (clusterSize/1024) + " kiB - " + cluster); + target -= clusterSize; + if (target <= 0) { break; } } @@ -781,9 +782,9 @@ public final class ClusterTable implements IClusterTable { th = new TaskHelper("Refresh"); session.writeState = new WriteState(writer, th.writeTraits, th.sema, th.proc); try { - session.getQueryProvider2().performDirtyUpdates(writer); + session.getQueryProvider2().propagateChangesInQueryCache(writer); session.fireMetadataListeners(writer, cs); - session.getQueryProvider2().performScheduledUpdates(writer); + session.getQueryProvider2().listening.fireListeners(writer); session.fireReactionsToSynchronize(cs); session.fireSessionVariableChange(SessionVariables.QUEUED_WRITES); session.printDiagnostics();