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

Cancel a running query. #139

Closed
mingmwang opened this issue Aug 15, 2022 · 0 comments · Fixed by #146
Closed

Cancel a running query. #139

mingmwang opened this issue Aug 15, 2022 · 0 comments · Fixed by #146
Labels
enhancement New feature or request

Comments

@mingmwang
Copy link
Contributor

mingmwang commented Aug 15, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)

In current Ballista implementation, when a SQL is submitted, there is no way to cancel it. We need to implement a way to cancel a running SQL, and if there are running tasks scheduled to run on Executors, those running tasks should be cancelled as well.
I'm not sure whether DataFusion can cancel a running query or not. For Ballista, it needs additional communication to cancel running queries.

  1. Add cancel_query rpc call to Scheduler grpc protocol
    rpc CancelQuery (CancelQueryParams) returns (CancelQueryResult) {}

  2. Add cancel job logic to query stage scheduler

  3. Cancel the running task on Executor

  4. Cancel the running Futures on Executor's Tokio queue

  5. Check all the Datafusion async spawn logic, make sure the spawned future can be cancelled.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@mingmwang mingmwang added the enhancement New feature or request label Aug 15, 2022
@Dandandan Dandandan mentioned this issue Oct 15, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant