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

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

commit dc48f2a4ce58c417a35527f0d3deac93b1ded332
Author: OneSizeFitQuorum <[email protected]>
AuthorDate: Tue Jan 23 14:43:53 2024 +0800

    finish
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../java/org/apache/iotdb/db/service/DataNode.java | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 3e988256269..6c7110ffda5 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -124,7 +124,7 @@ public class DataNode implements DataNodeMBean {
    * When joining a cluster or getting configuration this node will retry at 
most "DEFAULT_RETRY"
    * times before returning a failure to the client.
    */
-  private static final int DEFAULT_RETRY = 10;
+  private static final int DEFAULT_RETRY = 50;
 
   private static final long DEFAULT_RETRY_INTERVAL_IN_MS = 
config.getJoinClusterRetryIntervalMs();
 
@@ -280,9 +280,11 @@ public class DataNode implements DataNodeMBean {
         || configurationResp.getStatus().getCode() != 
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
       // All tries failed
       logger.error(
-          "Cannot pull system configurations from ConfigNode-leader after {} 
retries",
+          "Cannot pull system configurations from ConfigNode-leader after {} 
retries.",
           DEFAULT_RETRY);
-      throw new StartupException("Cannot pull system configurations from 
ConfigNode-leader");
+      throw new StartupException(
+          "Cannot pull system configurations from ConfigNode-leader. "
+              + "Please check whether the dn_seed_config_node in 
iotdb-datanode.properties is correct or alive.");
     }
 
     /* Load system configurations */
@@ -399,11 +401,10 @@ public class DataNode implements DataNodeMBean {
     }
     if (dataNodeRegisterResp == null) {
       // All tries failed
-      logger.error(
-          "Cannot register into cluster after {} retries. "
-              + "Please check dn_seed_config_node in 
iotdb-datanode.properties.",
-          DEFAULT_RETRY);
-      throw new StartupException("Cannot register into the cluster.");
+      logger.error("Cannot register into cluster after {} retries.", 
DEFAULT_RETRY);
+      throw new StartupException(
+          "Cannot register into the cluster. "
+              + "Please check whether the dn_seed_config_node in 
iotdb-datanode.properties is correct or alive.");
     }
 
     if (dataNodeRegisterResp.getStatus().getCode() == 
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
@@ -462,10 +463,11 @@ public class DataNode implements DataNodeMBean {
     if (dataNodeRestartResp == null) {
       // All tries failed
       logger.error(
-          "Cannot send restart DataNode request to ConfigNode-leader after {} 
retries. "
-              + "Please check dn_seed_config_node in 
iotdb-datanode.properties.",
+          "Cannot send restart DataNode request to ConfigNode-leader after {} 
retries.",
           DEFAULT_RETRY);
-      throw new StartupException("Cannot send restart DataNode request to 
ConfigNode-leader.");
+      throw new StartupException(
+          "Cannot send restart DataNode request to ConfigNode-leader. "
+              + "Please check whether the dn_seed_config_node in 
iotdb-datanode.properties is correct or alive.");
     }
 
     if (dataNodeRestartResp.getStatus().getCode() == 
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {

Reply via email to