[Fix-18338] check task if it's waiting for TaskGroup slot when pause/kill#18344
Open
eye-gu wants to merge 4 commits into
Open
[Fix-18338] check task if it's waiting for TaskGroup slot when pause/kill#18344eye-gu wants to merge 4 commits into
eye-gu wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes issue #18338 by ensuring tasks that are waiting for a TaskGroup slot can be paused/killed directly (instead of entering a retry loop), and adds unit coverage for the new behavior.
Changes:
- Add
ITaskGroupCoordinator#isTaskWaitingForTaskGroupSlotand implement it inTaskGroupCoordinator. - Update
TaskSubmittedStateActionpause/kill handling to release TaskGroup queue entries and publish paused/killed events immediately when the task is waiting for a TaskGroup slot. - Add unit tests for both the new coordinator query and the submitted-state pause/kill behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/ITaskGroupCoordinator.java | Adds API to detect whether a task is currently waiting for a TaskGroup slot. |
| dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/TaskGroupCoordinator.java | Implements the runtime “waiting for slot” check used by pause/kill handling. |
| dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/TaskSubmittedStateAction.java | Pauses/kills tasks immediately when they’re waiting for a TaskGroup slot (avoids retry loop). |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/engine/TaskGroupCoordinatorTest.java | Adds unit test coverage for isTaskWaitingForTaskGroupSlot. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/TaskSubmittedStateActionTest.java | Adds unit tests validating pause/kill behavior for tasks waiting on TaskGroup slots. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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?
Add unit tests.
Purpose of the pull request
fix #18338
Brief change log
Verify this pull request
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md