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/08/12 07:52:33 UTC

[GitHub] [iotdb] Beyyes commented on a diff in pull request #6979: [IOTDB-4112] Decoupling heartbeat scheduled executor service from LoadManager

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


##########
confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/PartitionRegionStateMachine.java:
##########
@@ -141,13 +141,15 @@ public void notifyLeaderChanged(ConsensusGroupId groupId, TEndPoint newLeader) {
     if (currentNode.equals(newLeader)) {
       LOGGER.info("Current node {} becomes Leader", newLeader);
       configManager.getProcedureManager().shiftExecutor(true);
-      configManager.getLoadManager().start();
+      configManager.getLoadManager().startLoadBalancingService();
+      configManager.getNodeManager().startHeartbeatService();

Review Comment:
   What about moving `startHeartbeatService` in front of `startLoadBalancingService`



##########
confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java:
##########
@@ -203,9 +203,6 @@ public void removeConfigNodePeer(TConfigNodeLocation tConfigNodeLocation)
     try {
       // Execute removePeer
       if (getConsensusManager().removeConfigNodePeer(tConfigNodeLocation)) {
-        configManager
-            .getLoadManager()
-            .removeNodeHeartbeatHandCache(tConfigNodeLocation.getConfigNodeId());

Review Comment:
   Why remove this



-- 
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