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/12/09 01:56:02 UTC

[GitHub] [dolphinscheduler] jieguangzhou opened a new issue, #13140: [Improvement][Master] Get varPool from upstream tasks instead of processInstance if dag is incomplete

jieguangzhou opened a new issue, #13140:
URL: https://github.com/apache/dolphinscheduler/issues/13140

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   In restarting failed task, dag is incomplete, the failed task can not get preTask from dag. But in `getPreVarPool ` method, our implement method is to get the `varPool` from `processInstance` because preTask is empty. This will lead to some unknown errors. For example, ` varPool` in `processInstance` is updated by something else.
   
   I think we can find the actual upstream tasks from the database or other places.
   
   ```java
       public void getPreVarPool(TaskInstance taskInstance, Set<String> preTask) {
           Map<String, Property> allProperty = new HashMap<>();
           Map<String, TaskInstance> allTaskInstance = new HashMap<>();
           if (CollectionUtils.isNotEmpty(preTask)) {
               for (String preTaskCode : preTask) {
                   Integer taskId = completeTaskMap.get(Long.parseLong(preTaskCode));
                   if (taskId == null) {
                       continue;
                   }
                   TaskInstance preTaskInstance = taskInstanceMap.get(taskId);
                   if (preTaskInstance == null) {
                       continue;
                   }
                   String preVarPool = preTaskInstance.getVarPool();
                   if (StringUtils.isNotEmpty(preVarPool)) {
                       List<Property> properties = JSONUtils.toList(preVarPool, Property.class);
                       for (Property info : properties) {
                           setVarPoolValue(allProperty, allTaskInstance, preTaskInstance, info);
                       }
                   }
               }
               if (allProperty.size() > 0) {
                   taskInstance.setVarPool(JSONUtils.toJsonString(allProperty.values()));
               }
           } else {
               if (StringUtils.isNotEmpty(processInstance.getVarPool())) {
                   taskInstance.setVarPool(processInstance.getVarPool());
               }
           }
       }
   ```
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] caishunfeng closed issue #13140: [Improvement][Master] Get varPool from upstream tasks instead of processInstance if dag is incomplete

Posted by GitBox <gi...@apache.org>.
caishunfeng closed issue #13140: [Improvement][Master] Get varPool from upstream tasks instead of processInstance if dag is incomplete
URL: https://github.com/apache/dolphinscheduler/issues/13140


-- 
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


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13140: [Improvement][Master] Get varPool from upstream tasks instead of processInstance if dag is incomplete

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13140:
URL: https://github.com/apache/dolphinscheduler/issues/13140#issuecomment-1343734450

   Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can [join our slack](https://s.apache.org/dolphinscheduler-slack) and send your question to channel `#troubleshooting`


-- 
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