Pavel Pereslegin created IGNITE-20078:
-----------------------------------------
Summary: Sql. Improve (or remove) CancellationException handling.
Key: IGNITE-20078
URL: https://issues.apache.org/jira/browse/IGNITE-20078
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Pavel Pereslegin
At the moment, users are allowed to cancel queries using Session#close* methods.
But we also partially implemented the logic to allow users to cancel queries
using the {{CompletableFuture#cancel}} method.
For example, internal {{SqlQueryProcessor#querySingleAsync}} returns a future,
which allows the queryCancel handler to be called, which releases the resources
associated with the query.
But the public method {{Session#executeAsync}} returns a child future,
canceling which, at the moment, will not release the resources.
At the same time, the implementation of the public method
{{Session#executeBatchAsync}} handles {{CancellationException}} and can cancel
batch tasks, but currently incorrectly cancels the future returned from
{{querySingleAsync}}.
We need to fix the {{CancellationException}} handling logic or clean up our
code of these complexities if we don't want to allow users to cancel requests
using such approach.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)