ivandasch commented on a change in pull request #9767:
URL: https://github.com/apache/ignite/pull/9767#discussion_r800983787



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/QueryRegistryImpl.java
##########
@@ -21,50 +21,85 @@
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-
-import org.apache.ignite.IgniteLogger;
+import java.util.stream.Collectors;
+import org.apache.calcite.util.Pair;
+import org.apache.ignite.cache.query.QueryCancelledException;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.cache.query.GridCacheQueryType;
+import org.apache.ignite.internal.processors.query.GridQueryCancel;
+import org.apache.ignite.internal.processors.query.GridRunningQueryManager;
 import org.apache.ignite.internal.processors.query.RunningQuery;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.ddl.RunningQueryManagerWrapper;
+import 
org.apache.ignite.internal.processors.query.calcite.util.AbstractService;
 import org.apache.ignite.internal.util.IgniteUtils;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Registry of the running queries.
  */
-public class QueryRegistryImpl implements QueryRegistry {
+public class QueryRegistryImpl extends AbstractService implements 
QueryRegistry {
     /** */
-    private final ConcurrentMap<UUID, RunningQuery> runningQrys = new 
ConcurrentHashMap<>();
+    private final ConcurrentMap<UUID, Pair<Long, RunningQuery>> runningQrys = 
new ConcurrentHashMap<>();
 
     /** */
-    private final IgniteLogger log;
+    private final GridRunningQueryManager runningQryMgr;
 
     /** */
-    public QueryRegistryImpl(IgniteLogger log) {
-        this.log = log;
+    public QueryRegistryImpl(GridKernalContext ctx) {
+        super(ctx);
+
+        runningQryMgr = new RunningQueryManagerWrapper(ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public RunningQuery register(RunningQuery qry) {
-        return runningQrys.computeIfAbsent(qry.id(), k -> qry);
+    @Override public RunningQuery register(String sql, String schema, 
RunningQuery qry) {

Review comment:
       But it is not possible when we start query on not originated nodes on 
StartQueryRequest...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to