Skip to content

fix: stop query planning compute jobs when parent task cancelled#8741

Merged
rohan-b99 merged 3 commits intodevfrom
rohan-b99/stop-compute-jobs-when-task-cancelled
Dec 16, 2025
Merged

fix: stop query planning compute jobs when parent task cancelled#8741
rohan-b99 merged 3 commits intodevfrom
rohan-b99/stop-compute-jobs-when-task-cancelled

Conversation

@rohan-b99
Copy link
Contributor

@rohan-b99 rohan-b99 commented Dec 9, 2025


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

To test locally, run a query that currently causes OOM with this in the config:

supergraph:
  listen: 0.0.0.0:4000
  introspection: true
  early_cancel: true
  query_planning:
    experimental_cooperative_cancellation:
      mode: enforce
      timeout: 1s

Check the memory usage of the router process, it should not continue to increase after the request/query planning is cancelled

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@rohan-b99 rohan-b99 requested a review from a team December 9, 2025 15:16
@github-actions

This comment has been minimized.

@apollo-librarian
Copy link

apollo-librarian bot commented Dec 9, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: ad1d178a8faaf73a42992c1f
Build Logs: View logs

@rohan-b99 rohan-b99 changed the title fix: stop compute jobs when parent task cancelled fix: stop query planning compute jobs when parent task cancelled Dec 9, 2025
@rohan-b99 rohan-b99 requested a review from a team as a code owner December 9, 2025 15:48
Copy link
Contributor

@aaronArinder aaronArinder left a comment

Choose a reason for hiding this comment

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

lgtm! I haven't tested it locally, but if you'd like me to, let me know; looks pretty safe overall, so didn't feel the need to hunt down an oom query for validation

@rohan-b99
Copy link
Contributor Author

lgtm! I haven't tested it locally, but if you'd like me to, let me know; looks pretty safe overall, so didn't feel the need to hunt down an oom query for validation

I think it should be pretty safe as it requires experimental config, I've been testing a bunch more locally with the memory limit branch as well so confident it works

@rohan-b99 rohan-b99 merged commit 6025b97 into dev Dec 16, 2025
15 checks passed
@rohan-b99 rohan-b99 deleted the rohan-b99/stop-compute-jobs-when-task-cancelled branch December 16, 2025 16:07
@abernix abernix mentioned this pull request Jan 27, 2026
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.

2 participants