]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java
DB request scheduling scheme fails with district diagrams
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / QueryCacheBase.java
index 54efda83976d8255f549ec0cd1cf41df8fc07e6c..f80fb5098b847d9264768be6c833c39d38a7ac24 100644 (file)
@@ -106,7 +106,7 @@ public class QueryCacheBase {
 
        public <T> Object performQuery(ReadGraphImpl parentGraph, final AsyncMultiRead<T> query, final CacheEntryBase entry_, Object procedure_) throws DatabaseException {
 
-               ReadGraphImpl queryGraph = parentGraph.withParent(entry_);
+               ReadGraphImpl queryGraph = parentGraph.withParent(entry_, null, false);
 
                AsyncMultiReadEntry entry = (AsyncMultiReadEntry)entry_;
                AsyncMultiProcedure<T> procedure = (AsyncMultiProcedure<T>)procedure_;
@@ -169,7 +169,7 @@ public class QueryCacheBase {
 
        public <T> Object performQuery(ReadGraphImpl parentGraph, final MultiRead<T> query, final CacheEntryBase entry_, Object procedure_) throws DatabaseException {
 
-               ReadGraphImpl queryGraph = parentGraph.withParent(entry_);
+               ReadGraphImpl queryGraph = parentGraph.withParent(entry_, null, true);
 
                MultiReadEntry entry = (MultiReadEntry)entry_;
                SyncMultiProcedure<T> procedure = (SyncMultiProcedure<T>)procedure_;
@@ -421,7 +421,7 @@ public class QueryCacheBase {
                int counter = 0;
                while(entry.isPending()) {
                        try {
-                           boolean performed = graph.performPending();
+                           boolean performed = false;//graph.performPending();
                            if(!performed) {
                                        Thread.sleep(1);
                                        counter++;
@@ -905,10 +905,6 @@ public class QueryCacheBase {
                return wrap.get();
        }
 
-       public static <T> T resultReadEntry(ReadGraphImpl graph, Read r, CacheEntry parent, ListenerBase listener, AsyncProcedure<T> procedure) throws DatabaseException {
-               return (T)QueryCache.runnerReadEntry(graph, r, parent, listener, procedure, true);
-       }
-
        public static <T> T resultAsyncReadEntry(ReadGraphImpl graph, AsyncRead r, CacheEntry parent, ListenerBase listener, AsyncProcedure<T> procedure) throws DatabaseException {
                return (T)QueryCache.runnerAsyncReadEntry(graph, r, parent, listener, procedure, true);
        }