133tosakarin commented on code in PR #13178:
URL: https://github.com/apache/iotdb/pull/13178#discussion_r1718093684


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RegionMaintainHandler.java:
##########
@@ -693,11 +703,22 @@ public void transferRegionLeader(TConsensusGroupId 
regionId, TDataNodeLocation o
           (CONF.getSchemaRegionRatisRpcLeaderElectionTimeoutMaxMs()
                   + CONF.getSchemaRegionRatisRpcLeaderElectionTimeoutMinMs())
               / 2;
+      Integer leaderId = 
configManager.getLoadManager().getRegionLeaderMap().get(regionId);
+
+      if (leaderId != -1) {
+        // The migrated node is not leader, so we specify the transfer leader 
to current leader node

Review Comment:
   I think so, we can report success



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to