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/11/18 14:55:56 UTC

[iotdb] branch master updated: [IOTDB-4959] Remove createPeer state when confignode restart (#8051)

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 5a6b4081de [IOTDB-4959] Remove createPeer state when confignode restart (#8051)
5a6b4081de is described below

commit 5a6b4081de2218f215fff3027564e87973794f55
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Fri Nov 18 22:55:47 2022 +0800

    [IOTDB-4959] Remove createPeer state when confignode restart (#8051)
---
 .../org/apache/iotdb/confignode/manager/ConsensusManager.java  | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
index 3de783f000..735e16e04c 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
@@ -23,7 +23,6 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
 import org.apache.iotdb.commons.consensus.ConfigNodeRegionId;
 import org.apache.iotdb.commons.consensus.ConsensusGroupId;
-import org.apache.iotdb.commons.exception.BadNodeUrlException;
 import org.apache.iotdb.commons.utils.TestOnly;
 import org.apache.iotdb.confignode.conf.ConfigNodeConfig;
 import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
@@ -181,13 +180,8 @@ public class ConsensusManager {
     }
     consensusImpl.start();
     if (SystemPropertiesUtils.isRestarted()) {
-      try {
-        // Create ConsensusGroup from confignode-system.properties file when restart
-        // TODO: Check and notify if current ConfigNode's ip or port has changed
-        createPeerForConsensusGroup(SystemPropertiesUtils.loadConfigNodeList());
-      } catch (BadNodeUrlException e) {
-        throw new IOException(e);
-      }
+      // TODO: Check and notify if current ConfigNode's ip or port has changed
+      LOGGER.info("Init ConsensusManager successfully when restarted");
     } else if (ConfigNodeDescriptor.getInstance().isSeedConfigNode()) {
       // Create ConsensusGroup that contains only itself
       // if the current ConfigNode is Seed-ConfigNode