tisonkun commented on a change in pull request #13055:
URL: https://github.com/apache/flink/pull/13055#discussion_r615882602



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java
##########
@@ -193,14 +185,20 @@ protected void handleStateChange(ConnectionState 
newState) {
                                break;
                        case SUSPENDED:
                                LOG.warn("Connection to ZooKeeper suspended. 
Can no longer retrieve the leader from " +
-                                       "ZooKeeper.");
+                                               "ZooKeeper.");
+                               synchronized (lock) {
+                                       notifyLeaderLoss();

Review comment:
       Will if the leadership changed, it will generate a new id




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