You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/12/19 06:21:46 UTC
[iotdb] 01/01: add sleep time when the retry of pullAndCheckConfiguration
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch beyyes/1.0_fix
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 29465069a38060edd095b4c4afbf1f346973c02d
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Mon Dec 19 14:20:58 2022 +0800
add sleep time when the retry of pullAndCheckConfiguration
---
server/src/main/java/org/apache/iotdb/db/service/DataNode.java | 10 ++++++++++
1 file changed, 10 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 060f432b1a..181be061e3 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 {
@@ -230,6 +231,15 @@ public class DataNode implements DataNodeMBean {
} catch (Exception e) {
throw new StartupException(e.getMessage());
}
+
+ try {
+ TimeUnit.SECONDS.sleep(1);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ logger.warn("Unexpected interruption when getConfiguration from the ConfigNode.", e);
+ }
+
+ // start the next try
retry--;
}
// all tries failed