Skip to content

Propagate request-task cancellation into the analytics PPL route - #5563

Merged
Swiddis merged 1 commit into
opensearch-project:mainfrom
mch2:fix-analytics-parent-task-cancel
Jun 18, 2026
Merged

Propagate request-task cancellation into the analytics PPL route#5563
Swiddis merged 1 commit into
opensearch-project:mainfrom
mch2:fix-analytics-parent-task-cancel

Conversation

@mch2

@mch2 mch2 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

PPL analytics queries ran detached from the request task, so client disconnects never cancelled them. Dispatch via RestCancellableNodeClient, thread the PPL task through QueryRequestContext on execute/explain (asserted non-null), and pass it from TransportPPLQueryAction. The analytics engine links it as the query-task parent so cancellation cascades to fragments.

core PR required before this can be merged - opensearch-project/OpenSearch#22229

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Swiddis Swiddis added the bugFix label Jun 17, 2026
@mengweieric mengweieric added the PPL Piped processing language label Jun 17, 2026

@Swiddis Swiddis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it doesn't compile

@mch2
mch2 force-pushed the fix-analytics-parent-task-cancel branch from 9c90dc9 to 3e60ea5 Compare June 18, 2026 00:02
PPL analytics queries ran detached from the request task, so client
disconnects never cancelled them. Dispatch via RestCancellableNodeClient,
thread the PPL task through QueryRequestContext on execute/explain (asserted
non-null), and pass it from TransportPPLQueryAction. The analytics engine links
it as the query-task parent so cancellation cascades to fragments.

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
@mch2
mch2 force-pushed the fix-analytics-parent-task-cancel branch from 3e60ea5 to d2991ca Compare June 18, 2026 00:04
@mch2

mch2 commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

it doesn't compile

yes, needed core change to analytics-api, this is merged and published now.

@Swiddis Swiddis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

doctest passes, ship it

@Swiddis
Swiddis merged commit 8d18065 into opensearch-project:main Jun 18, 2026
28 of 32 checks passed
asifabashar pushed a commit to asifabashar/sql that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugFix PPL Piped processing language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants