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,
because this information is never _cleared_ but only over-written?
##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElectionService.java:
##########
@@ -104,10 +104,18 @@ public final void stop() throws Exception {
synchronized (lock) {
if (!running) {
+ LOG.debug("DefaultLeaderElectionService is already stopped. No
action necessary.");
Review Comment:
nit: clarify that we attempted to stop the service?
--
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]