Dreaouth commented on a change in pull request #623:
URL: https://github.com/apache/rocketmq-externals/pull/623#discussion_r472294237



##########
File path: 
rocketmq-connect/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImpl.java
##########
@@ -141,4 +155,22 @@ public RemotingCommand workerChanged(ChannelHandlerContext 
ctx,
             return false;
         }
     }
+
+    /**
+     * Check whether the leader is down and the master-slave switch occurs
+     *
+     */
+    private void checkClusterLeader() {
+        if (connectConfig.getLeaderID() == null) return;
+        List<String> workers = getAllAliveWorkers();
+        if (connectConfig.getIsLeader() == 1 && 
!workers.contains(connectConfig.getLeaderID() + "")) {

Review comment:
       Updated. Its my careless mistake




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

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


Reply via email to