zentol commented on code in PR #21742:
URL: https://github.com/apache/flink/pull/21742#discussion_r1163817204


##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElectionService.java:
##########
@@ -205,20 +208,7 @@ public void onGrantLeadership(UUID newLeaderSessionId) {
     public void onRevokeLeadership() {
         synchronized (lock) {
             if (running) {
-                LOG.debug(
-                        "Revoke leadership of {} ({}@{}).",
-                        leaderContender.getDescription(),
-                        confirmedLeaderInformation.getLeaderSessionID(),
-                        confirmedLeaderInformation.getLeaderAddress());
-
-                issuedLeaderSessionID = null;
-                clearConfirmedLeaderInformation();
-
-                leaderContender.revokeLeadership();
-
-                LOG.debug("Clearing the leader information on {}.", 
leaderElectionDriver);
-                // Clear the old leader information on the external storage
-                
leaderElectionDriver.writeLeaderInformation(LeaderInformation.empty());

Review Comment:
   Why is it fine to remove this? The test states that this is done because 
leadership was already lost.
   Does that imply that from the perspective of a TM there is always a leader 
(after leadership was acquired at least once), because this information is 
never _cleared_ but only over-written?



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