XComp commented on code in PR #21737:
URL: https://github.com/apache/flink/pull/21737#discussion_r1082408148


##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElectionService.java:
##########
@@ -48,9 +48,11 @@
     private final LeaderElectionDriverFactory leaderElectionDriverFactory;
 
     /** The leader contender which applies for leadership. */
+    @GuardedBy("lock")
     private volatile LeaderContender leaderContender;

Review Comment:
   I know, I just hesitated to add this annotation because it would generate 
warnings in several locations within the class. But I added `@Nullable` now for 
the other two fields as well to make it consistent.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to