This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.2 by this push:
new 8eec792045e The ConfigNode should restore cluster_name and
config_node_id at the first step of restart. (#10280)
8eec792045e is described below
commit 8eec792045e0abce29e5c052c8aa8e92efddab99
Author: YongzaoDan <[email protected]>
AuthorDate: Fri Jun 23 17:31:51 2023 +0800
The ConfigNode should restore cluster_name and config_node_id at the first
step of restart. (#10280)
---
.../java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java | 4 ++++
.../src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
index 96198e96205..ba3fc56ceed 100644
---
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
+++
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
@@ -74,6 +74,10 @@ public class ConfigNodeStartupCheck extends StartupChecks {
checkGlobalConfig();
createDirsIfNecessary();
if (SystemPropertiesUtils.isRestarted()) {
+ /* Always restore ClusterName and ConfigNodeId first */
+
CONF.setClusterName(SystemPropertiesUtils.loadClusterNameWhenRestarted());
+
CONF.setConfigNodeId(SystemPropertiesUtils.loadConfigNodeIdWhenRestarted());
+
SystemPropertiesUtils.checkSystemProperties();
}
}
diff --git
a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
index 9b6dad567f3..b0889ad9cf9 100644
---
a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
+++
b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
@@ -109,10 +109,6 @@ public class ConfigNode implements ConfigNodeMBean {
if (SystemPropertiesUtils.isRestarted()) {
LOGGER.info("{} is in restarting process...",
ConfigNodeConstant.GLOBAL_NAME);
- /* Always restore ClusterName and ConfigNodeId first */
-
CONF.setClusterName(SystemPropertiesUtils.loadClusterNameWhenRestarted());
-
CONF.setConfigNodeId(SystemPropertiesUtils.loadConfigNodeIdWhenRestarted());
-
if (!SystemPropertiesUtils.isSeedConfigNode()) {
// The non-seed-ConfigNodes should send restart request
sendRestartConfigNodeRequest();