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 2020/06/13 04:24:28 UTC

[GitHub] [incubator-dolphinscheduler] Rubik-W commented on a change in pull request #2761: simply doExecute using RetryerUtils.retryCall

Rubik-W commented on a change in pull request #2761:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2761#discussion_r439707708



##########
File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/dispatch/executor/NettyExecutorManager.java
##########
@@ -133,26 +136,13 @@ public void executeDirectly(ExecutionContext context) throws ExecuteException {
      * @throws ExecuteException if error throws ExecuteException
      */
     private void doExecute(final Host host, final Command command) throws ExecuteException {
-        /**
-         * retry count,default retry 3
-         */
-        int retryCount = 3;
-        boolean success = false;
-        do {
-            try {
+        try {
+            RetryerUtils.retryCall(() -> {
                 nettyRemotingClient.send(host, command);
-                success = true;
-            } catch (Exception ex) {
-                logger.error(String.format("send command : %s to %s error", command, host), ex);
-                retryCount--;
-                try {
-                    Thread.sleep(100);

Review comment:
       this sleep 100, retryer sleep 1000, Does 1000 affect second-level tasks?




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

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