You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/10/10 14:31:20 UTC
[GitHub] [flink] TisonKun commented on a change in pull request #9813:
[FLINK-14287] Decouple leader address from LeaderContender
TisonKun commented on a change in pull request #9813: [FLINK-14287] Decouple leader address from LeaderContender
URL: https://github.com/apache/flink/pull/9813#discussion_r333555485
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
##########
@@ -233,15 +241,20 @@ public void isLeader() {
}
}
+ private void clearConfirmedLeaderInformation() {
+ confirmedLeaderSessionID = null;
+ confirmedLeaderAddress = null;
+ }
+
@Override
public void notLeader() {
synchronized (lock) {
if (running) {
issuedLeaderSessionID = null;
- confirmedLeaderSessionID = null;
+ clearConfirmedLeaderInformation();
if (LOG.isDebugEnabled()) {
- LOG.debug("Revoke leadership of {}.", leaderContender.getAddress());
+ LOG.debug("Revoke leadership of {}.", leaderContender);
}
Review comment:
fair enough it could be `leaderContender.getDescription` which also includes leader address.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services