xtern commented on code in PR #4799:
URL: https://github.com/apache/ignite-3/pull/4799#discussion_r1876059129


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/fsm/Query.java:
##########
@@ -137,4 +137,10 @@ void onError(Throwable th) {
 
         resultHolder.completeExceptionally(th);
     }
+
+    CompletableFuture<Void> cancel() {
+        cancel.cancel();
+
+        return onPhaseStarted(ExecutionPhase.TERMINATED);

Review Comment:
   I hope I fixed it.
   I introduced new methods in Query
   
   `register(runningQueries)` -> self registration of a query in the queries 
registry :thinking:
   and
   `cancel()` -> cancels the query and `CancellationToken` now also uses this 
method to cancel the query.
   



-- 
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