Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-23441 Sql. Cancellation of script execution #4706

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

xtern
Copy link
Contributor

@xtern xtern commented Nov 12, 2024

@xtern xtern force-pushed the ignite-23441 branch 2 times, most recently from 3e323aa to c942ddd Compare November 14, 2024 10:52
@xtern xtern changed the title IGNITE-23441 IGNITE-23441 Sql. Cancellation of script execution Nov 14, 2024
@xtern xtern marked this pull request as ready for review November 15, 2024 15:12
@xtern xtern marked this pull request as draft November 15, 2024 15:58
@xtern xtern marked this pull request as ready for review November 18, 2024 07:47
@@ -543,7 +543,7 @@ public int openedCursors() {
}

return (int) executor.runningQueries().stream()
.filter(info -> info.phase() == ExecutionPhase.EXECUTING)
.filter(info -> info.phase() == ExecutionPhase.EXECUTING && !info.script())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not quite correct - the script itself does not open the cursor

@@ -202,14 +202,16 @@ CompletableFuture<AsyncSqlCursor<InternalSqlRow>> executeChildQuery(
}

try {
trackQuery(query, null);
trackQuery(query, parent.cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems we need not register additional cancel actions for childs ? i.e. we need different trackQuery implementation without "addCancelAction" actions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Reverted this change.
From my point of view, it is enough to pass null for the child query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants