]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
DB client state gets corrupted 24/1324/2
authorAntti Villberg <antti.villberg@semantum.fi>
Sat, 16 Dec 2017 20:57:10 +0000 (22:57 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 16 Dec 2017 22:29:53 +0000 (00:29 +0200)
refs #7685

Change-Id: Ic6a8b7f2f9e327c8aba774a86f834d160a9c4c66

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();
 
-//                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);