This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new d426f7aaf5 Add sleep time in retry of pullAndCheckConfiguration (#8484)
d426f7aaf5 is described below

commit d426f7aaf558ae37b192c5c133c5dbb4b914ff66
Author: YongzaoDan <[email protected]>
AuthorDate: Fri Dec 16 13:22:54 2022 +0800

    Add sleep time in retry of pullAndCheckConfiguration (#8484)
---
 server/src/main/java/org/apache/iotdb/db/service/DataNode.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java 
b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 6607c5d8ac..8671ae4d0c 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -90,6 +90,7 @@ import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 public class DataNode implements DataNodeMBean {
@@ -231,6 +232,12 @@ public class DataNode implements DataNodeMBean {
         throw new StartupException(e.getMessage());
       }
       retry--;
+
+      try {
+        TimeUnit.SECONDS.sleep(1);
+      } catch (InterruptedException ignored) {
+        // ignored
+      }
     }
     // all tries failed
     logger.error("Cannot get configuration from ConfigNode after {} retries", 
DEFAULT_RETRY);

Reply via email to