You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/24 03:13:34 UTC
[GitHub] [dolphinscheduler] someorz commented on a diff in pull request #10586: [Fix-9938][master] Fix 9938 query environment config set to task instance
someorz commented on code in PR #10586:
URL: https://github.com/apache/dolphinscheduler/pull/10586#discussion_r905682905
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -1115,6 +1115,12 @@ private TaskInstance findTaskIfExists(Long taskCode, int taskVersion) {
private TaskInstance createTaskInstance(ProcessInstance processInstance, TaskNode taskNode) {
TaskInstance taskInstance = findTaskIfExists(taskNode.getCode(), taskNode.getVersion());
if (taskInstance != null) {
+ if (!taskInstance.getEnvironmentCode().equals(-1L)) {
+ Environment environment = processService.findEnvironmentByCode(taskInstance.getEnvironmentCode());
Review Comment:
This bug will not appear in new tasks. This bug is that existing tasks will appear during fault tolerance.
` TaskInstance taskInstance = findTaskIfExists(taskNode.getCode(), taskNode.getVersion());`
findTaskIfExists return instance EnvironmentConfig is null at version 2.0.5 if new version findTaskIfExists method return TaskInstance EnvironmentConfig is not null no need to query again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org