-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix-#13045] fix endless loop #15092
Conversation
@zhuangchong PTAL. cc @huage1994 |
processInstance.getState(), workflowStateEvent.getStatus()); | ||
|
||
if (workflowExecuteRunnable.processComplementData()) { | ||
return true; |
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.
Will this patch fix the endless loop when completing data?
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.
Will this patch fix the endless loop when completing data?
yes ,in #13051 ,forgot to add the corresponding event processing class, resulting in the status of the process instance not being updated
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.
I'm still a little confused here. If a workflow instance fails to get submitted in data complement mode
, in line 45, we directly return true
without doing anything else to it. What will the state of the workflow instance become? Failure or just hanging there?
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.
I'm still a little confused here. If a workflow instance fails to get submitted in
data complement mode
, in line 45, we directlyreturn true
without doing anything else to it. What will the state of the workflow instance become? Failure or just hanging there?
You are right, whatever type, as long as an error occurs during the submission phase, the status should be updated to failure
Codecov Report
@@ Coverage Diff @@
## dev #15092 +/- ##
============================================
- Coverage 38.19% 38.17% -0.02%
+ Complexity 4686 4682 -4
============================================
Files 1280 1281 +1
Lines 45325 45347 +22
Branches 4938 4941 +3
============================================
Hits 17312 17312
- Misses 26126 26148 +22
Partials 1887 1887
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
@huage1994 PTAL cc @ruanwenjun |
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.
BTW, you need to change the log information here:
Lines 70 to 79 in 8c01fcf
} else if (WorkflowStartStatus.FAILED == workflowStartStatus) { | |
log.error( | |
"Failed to submit the workflow instance, will resend the workflow start event: {}", | |
workflowEvent); | |
WorkflowStateEvent stateEvent = WorkflowStateEvent.builder() | |
.processInstanceId(processInstance.getId()) | |
.type(StateEventType.PROCESS_SUBMIT_FAILED) | |
.status(WorkflowExecutionStatus.FAILURE) | |
.build(); | |
workflowExecuteRunnable.addStateEvent(stateEvent); |
If DS fails to submit a workflow instance, it no more resends the start event.
done |
4578402
to
f651677
Compare
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.
LGTM
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Purpose of the pull request
This PR is complementary to issue #13045
PR #13051
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.