dolphinscheduler
dolphinscheduler copied to clipboard
[Bug] [dolphinscheduler-master] fix WorkflowExecuteRunnable's executeTask method return incorrect value
Purpose of the pull request
This pull request to fix #15740 , fix the method return incorrect value problem.
please check the issue out for details
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)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md
Right now, pause task will also use this method to submit, and should return false, this change will influence the whole process. Is there a case to reproduce this bug?
to executeTask method's logic, I can understand the logic intention. Only executeTask success will return true, and if write the taskInstance to db fail or throw Exception will return false.
But in the follow code:
it is incorrect. the log ("Submit standby task: {} failed")also can express this. when taskInstance write to db unsuccessfully.processService.submitTask
will return false, it let into the code block. and return true
. this incorrect boolean value will cause the out layer caller who call executeTask
method think the task is executed successfully, but in the fact, the task do not write into database's table
if taskInstanceDao.submitTaskInstanceToDB
do not success, the taskinstance will do not submit to db.
and return false.here is correct. But its caller executeTask
will return true in its code, it will cause this problem
you can use my unit test to reproduce this bug, or close the db or simulate the db Fault when call submitTask in debug mode
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.