- Notifications
You must be signed in to change notification settings - Fork5k
[Fix-17732] Change workflow instance status to failure when command handle failed#17745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR addresses issue#17732 by ensuring that workflow instance status is set to FAILURE when command handling fails during bootstrap. The changes introduce proper error handling and state management when command processing encounters exceptions, preventing workflow instances from being stuck in intermediate states.
Key Changes:
- Adds workflow instance state update to FAILURE in error handling path
- Makes error command movement transactional to ensure atomicity
- Enhances WorkflowGraph with duplicate task name/code validation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
CommandEngine.java | Adds logic to force update workflow instance state to FAILURE when command bootstrap fails, plus enhanced logging |
CommandServiceImpl.java | Adds@transactional annotation to ensure atomic error command insertion and command deletion |
WorkflowGraph.java | Replaces stream-based map creation with explicit loop to add duplicate task name/code validation |
WorkflowInstanceDao.java | Adds interface method for force updating workflow instance state without origin state check |
WorkflowInstanceDaoImpl.java | Implements force update method delegating to mapper |
WorkflowInstanceMapper.java | Adds mapper method signature for force state update |
WorkflowInstanceMapper.xml | Adds SQL update statement that updates state without checking current state |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
...heduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/WorkflowInstanceMapper.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...o/src/main/java/org/apache/dolphinscheduler/dao/repository/impl/WorkflowInstanceDaoImpl.javaShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...er/src/main/java/org/apache/dolphinscheduler/server/master/engine/command/CommandEngine.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...ster/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.javaShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
7da42ef toe248fddComparee248fdd to6ef9e79Compare6ef9e79 to82533fbCompare82533fb to6f87cebCompare
|
64d8d0e tocf58747Comparecf58747 toa5ae49aCompare




Uh oh!
There was an error while loading.Please reload this page.
Purpose of the pull request
fix#17732
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as(please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
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