Skip to content

fix: Avoid early cleanup of Dart workers.#19341

Merged
gianm merged 1 commit intoapache:masterfrom
gianm:dart-worker-cancel-fix
Apr 17, 2026
Merged

fix: Avoid early cleanup of Dart workers.#19341
gianm merged 1 commit intoapache:masterfrom
gianm:dart-worker-cancel-fix

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Apr 16, 2026

In #19233 controllers were updated to be canceled using a combination of stop + direct thread interrupt. This patch makes worker cancellation work the same way.

The change is necessary to fix a problem where the worker context could be closed before the worker finishes running, since the worker context is closed using a listener on the run future. To ensure proper sequencing, the run future must not be directly cancelable, since that would cause the listener to fire too early.

In apache#19233 controllers were updated to be canceled using a combination
of stop + direct thread interrupt. This patch makes worker cancellation
work the same way.

The change is necessary to fix a problem where the worker context could
be closed before the worker finishes running, since the worker context
is closed using a listener on the run future. To ensure proper
sequencing, the run future must not be directly cancellable, since that
would cause the listener to fire too early.
@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

@Fly-Style Fly-Style left a comment

Choose a reason for hiding this comment

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

Good finding!

@gianm gianm merged commit c69933b into apache:master Apr 17, 2026
63 of 65 checks passed
@gianm gianm deleted the dart-worker-cancel-fix branch April 17, 2026 22:14
@github-actions github-actions Bot added this to the 38.0.0 milestone Apr 17, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants