This is an automated email from the ASF dual-hosted git repository.
tanxinyu 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 5c6c9727648 Enhance DataNode startup probing logic (#11957)
5c6c9727648 is described below
commit 5c6c972764888f675ba8ab5472e1d2e20312fc4c
Author: Potato <[email protected]>
AuthorDate: Tue Jan 23 21:50:58 2024 +0800
Enhance DataNode startup probing logic (#11957)
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()) {