Skip to content

feat: Wait for gracefulShutdownTimeout in DartWorkerRunner#stop.#19538

Open
gianm wants to merge 1 commit into
apache:masterfrom
gianm:dart-graceful-restart
Open

feat: Wait for gracefulShutdownTimeout in DartWorkerRunner#stop.#19538
gianm wants to merge 1 commit into
apache:masterfrom
gianm:dart-graceful-restart

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Jun 1, 2026

This patch adjusts DartWorkerRunner to wait for gracefulShutdownTimeout before canceling workers.

The default gracefulShutdownTimeout is changed from 0s to 30s to match the documentation, and also, it is believed, to match actual behavior.

This patch adjusts DartWorkerRunner to wait for gracefulShutdownTimeout
before canceling workers.

The default gracefulShutdownTimeout is changed from 0s to 30s to match
the documentation, and also, it is believed, to match actual behavior.
@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Jun 1, 2026
Copy link
Copy Markdown
Member

@FrankChen021 FrankChen021 left a comment

Choose a reason for hiding this comment

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

Severity Findings
P0 0
P1 0
P2 1
P3 0
Total 1
Severity Findings
P0 0
P1 0
P2 1
P3 0
Total 1

Reviewed 6 of 6 changed files.


This is an automated review by Codex GPT-5.5

holder.runRef.awaitStop();
}
}
catch (InterruptedException e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Cancel remaining workers when shutdown wait is interrupted

If the lifecycle stop thread is interrupted while waiting for a worker, awaitStop now throws and this catch exits without canceling the current or remaining runningWorkers. Since stopped is already true and workerMap has been cleared, a later stop() call returns immediately, leaving background worker threads running instead of forcing cancellation. The interruption path should cancel the copied workers before returning or rethrowing.

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