You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2025/01/23 10:02:00 UTC
[jira] [Assigned] (IGNITE-23792) Sql. Cleanup the query cancellation handling
[ https://issues.apache.org/jira/browse/IGNITE-23792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov reassigned IGNITE-23792:
-----------------------------------------
Assignee: Konstantin Orlov
> Sql. Cleanup the query cancellation handling
> --------------------------------------------
>
> Key: IGNITE-23792
> URL: https://issues.apache.org/jira/browse/IGNITE-23792
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Pavel Pereslegin
> Assignee: Konstantin Orlov
> Priority: Major
> Labels: ignite-3
>
> h4. 1. Cleanup query timeout handling
> Currently, the action to close the cursor is added to CursorInitializationPhaseHandler#handle. But this "action" ignores cancellation by timeout.
> {code:java}
> query.cancel.add(timeout -> {
> if (!timeout) {
> cursor.closeAsync(true);
> }
> });
> {code}
> It is necessary to handle timeout similarly to handling user cancellation and clean up the extra code where this action is added specifically for timeout (search for "{{scheduleTimeout(}}" and "{{queryCancel.add(timeout}}).
> -Instead of {{AsyncCursor.close(boolean cancelled)}} we can use {{AsyncCursor.close(QueryCompletionReason reason)}}, for example- (already done in IGNITE-24005).
> h4.
> h4. 2. Cleanup error handling in MultiStatementHandler
> Currently the method {{ScriptTransactionWrapperImpl#rollback(Throwable)}} closes opened cursors (related to script transaction). But it should not do that. The logic for rolling back the script transaction is already contained in {{TxAwareAsyncCursor#closeAsync(cancelled=true)}}.
> The only problem that remains is the internal error handling when executing the script (see the places where {{ScriptTransactionContext#onError(Throwable)}} is called).
> It is necessary to correctly terminate the child query in case of an error. Example of "internal error" test - {{dmlFailsOnReadOnlyTransaction}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)