You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/09/09 09:59:01 UTC

[GitHub] [iotdb] Beyyes commented on a diff in pull request #7264: [IOTDB-4361] Add a precheck in removing datanode

Beyyes commented on code in PR #7264:
URL: https://github.com/apache/iotdb/pull/7264#discussion_r966862872


##########
confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/DataNodeRemoveHandler.java:
##########
@@ -492,4 +524,21 @@ private Optional<TDataNodeLocation> filterDataNodeWithOtherRegionReplica(
     // TODO replace findAny() by select the low load node.
     return regionReplicaNodes.stream().filter(e -> !e.equals(filterLocation)).findAny();
   }
+
+  /**
+   * Check the protocol of the cluster, standalone is not supported to remove data node currently
+   *
+   * @return SUCCEED_STATUS if the Cluster is not standalone protocol, REMOVE_DATANODE_FAILED
+   *     otherwise
+   */
+  private TSStatus checkClusterProtocol() {
+    TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
+    if (CONF.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.StandAloneConsensus)
+        && CONF.getSchemaRegionConsensusProtocolClass()

Review Comment:
   ```suggestion
           || CONF.getSchemaRegionConsensusProtocolClass()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org