Repository navigation
[Fix-18697][TaskPlugin] Fix DinkyTask worker interrupt leak - #18771
Merged
Merged
Conversation
- Remove spurious Thread.currentThread().interrupt() from submit failure paths - Add regression tests for dinky 0.x and 1.x submit failures
lihanyu1715446406-afk
requested review from
Gallardot,
SbloodyS and
caishunfeng
as code owners
November 5, 2026 07:43
|
Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was this PR generated or assisted by AI?
YES. The root-cause analysis, the regression tests and this description were drafted with AI assistance (Claude Code). The change was reviewed and verified locally by the submitter, including a before/after run of the new tests.
Purpose of the pull request
Fixes #18697.
DinkyTask.submitApplicationV0()andsubmitApplicationV1()restore the interrupt flag in acatch (Exception)block even though the try block only performs HTTP calls and JSON parsing. When a Dinky submit fails, the flag is set on the worker'sTaskExecutorWorkerthread. The nextCondition.await()then throwsInterruptedException, the worker breaks out of its loop and its slot is never submitted again. Repeating this eventually exhausts the fixed pool (All ExclusiveThreadTaskExecutorWorker are busy).Brief change log
Thread.currentThread().interrupt()calls from the submit-failure paths.trackApplicationStatusV0/V1still restore the flag in their realcatch (InterruptedException)blocks.DinkyTaskTestwith two regression tests (dinky 0.x and 1.x) that fail the submit call via a local HTTP server and assert that the task throwsTaskExceptionwhile the worker thread's interrupt flag stays clear.Verify this pull request
This change added tests and can be verified as follows:
./mvnw -pl dolphinscheduler-task-plugin/dolphinscheduler-task-dinky -Dtest=DinkyTaskTest testa failed submit must not leave the worker thread interrupted ==> expected: <false> but was: <true>.Tests run: 2, Failures: 0, Errors: 0, Skipped: 0.This PR intentionally stays scoped to the interrupt leak. The secondary defensive liveness check in
TaskExecutorWorkers#selectIdleWorker()is not changed here.