]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java
DB client state gets corrupted
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / State.java
index f30418a6a32869bf009fc661baa47244a4679a1b..70e2cb10dd603122da7737bab85a2ea88bdc631a 100644 (file)
@@ -327,17 +327,9 @@ class State {
                 if (vg != null && clusterStream.isDirty())
                     new Exception("Internal error: virtual transaction committed changes into core (" + request + ")").printStackTrace();
 
                 if (vg != null && clusterStream.isDirty())
                     new Exception("Internal error: virtual transaction committed changes into core (" + request + ")").printStackTrace();
 
-//                long start = System.nanoTime();
-                if (null == vg) {
-                    clusterStream.reallyFlush();
-                    // This was fired just before in handleUpdatesAndMetadata
-//                    if (!writeOnly)
-//                        session.fireMetadataListeners(graph, cs);
-                } else
-                    clusterStream.clear();
-
-//                long duration = System.nanoTime() - start;
-//                System.out.println("reallyFlush " + 1e-9*duration + "s. ");
+                // This is needed even when the write targets a virtual graph -
+                // deny can always remove a persistent statement. 
+                clusterStream.reallyFlush();
 
                 session.clientChanges = new ClientChangesImpl(session);
 
 
                 session.clientChanges = new ClientChangesImpl(session);