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/03/13 12:03:40 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a change in pull request #8707: [Fix][Master] Fix master-server execution logic thread unsafe problem

ruanwenjun commented on a change in pull request #8707:
URL: https://github.com/apache/dolphinscheduler/pull/8707#discussion_r825437439



##########
File path: dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
##########
@@ -886,11 +886,12 @@ private ProcessInstance constructProcessInstance(Command command, String host) {
         //reset command parameter
         if (processInstance.getCommandParam() != null) {
             Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam());
-            for (Map.Entry<String, String> entry : processCmdParam.entrySet()) {
-                if (!cmdParam.containsKey(entry.getKey())) {
-                    cmdParam.put(entry.getKey(), entry.getValue());
+            processCmdParam.forEach((k, v) -> {
+                String value = cmdParam.get(k);
+                if (StringUtils.isBlank(value)) {
+                    cmdParam.put(k, v);
                 }

Review comment:
       ```suggestion
   ```




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