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

DartSqlResource: Return HTTP 202 on cancellation even if no such query. #17278

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Oct 8, 2024

Return HTTP 202 (Accepted) on cancellation, even if the requested query ID was not found.

The main reason for this is that when the Router broadcasts DELETE requests to all Brokers, it returns the response from one of them randomly. If we return 404 when a query ID isn't found, then the Router randomly returns 404s even when the query really was found and canceled.

This is also arguably still correct behavior. The cancellation request was accepted, it just won't do anything because the query was not in fact running.

Return HTTP 202 (Accepted) on cancellation, even if the requested query
ID was not found.

The main reason for this is that when the Router broadcasts DELETE requests
to all Brokers, it returns the response from one of them randomly. If we
return 404 when a query ID isn't found, then the Router randomly returns 404s
even when the query really was found and canceled.

This is also arguably still correct behavior. The cancellation request
*was* accepted, it just won't do anything because the query was not in
fact running.
@github-actions github-actions bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 8, 2024
@gianm gianm added the Bug label Oct 8, 2024
@cryptoe cryptoe added this to the 31.0.0 milestone Oct 8, 2024
@cryptoe cryptoe merged commit 0a279e6 into apache:master Oct 8, 2024
56 checks passed
cryptoe pushed a commit to cryptoe/druid that referenced this pull request Oct 8, 2024
…y. (apache#17278)

Return HTTP 202 (Accepted) on cancellation, even if the requested query
ID was not found.

The main reason for this is that when the Router broadcasts DELETE requests
to all Brokers, it returns the response from one of them randomly. If we
return 404 when a query ID isn't found, then the Router randomly returns 404s
even when the query really was found and canceled.

This is also arguably still correct behavior. The cancellation request
*was* accepted, it just won't do anything because the query was not in
fact running.

(cherry picked from commit 0a279e6)
kfaraz pushed a commit that referenced this pull request Oct 8, 2024
…7282) (#17283) (#17277) (#17285)

* MSQ: Allow for worker gaps. (#17277)
* DartSqlResource: Sort queries by start time. (#17282)
* DartSqlResource: Add controllerHost to GetQueriesResponse. (#17283)
* DartWorkerModule: Replace en dash with regular dash. (#17281)
* DartSqlResource: Return HTTP 202 on cancellation even if no such query. (#17278)
* Upgraded Protobuf to 3.25.5 (#17249)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 7d9e6d3)
---------
Co-authored-by: Gian Merlino <gianmerlino@gmail.com>
Co-authored-by: Shivam Garg <shigarg@visa.com>
@gianm gianm deleted the dart-rsrc-cancellation branch October 10, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants