OneSizeFitsQuorum commented on code in PR #925:
URL: https://github.com/apache/ratis/pull/925#discussion_r1336682780


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderLease.java:
##########
@@ -49,12 +49,12 @@ class LeaderLease {
         .toIntExact(TimeUnit.MILLISECONDS);
   }
 
-  boolean isEnabled() {
-    return enabled;
+  boolean getAndSetEnabled(boolean enabled) {

Review Comment:
   when you set this field to true?
   
   It looks like now it won't be true as long as it's set to false



##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderLease.java:
##########
@@ -49,12 +49,12 @@ class LeaderLease {
         .toIntExact(TimeUnit.MILLISECONDS);
   }
 
-  boolean isEnabled() {
-    return enabled;
+  boolean getAndSetEnabled(boolean enabled) {

Review Comment:
   when you set this field to true?
   
   It looks like now it won't be true as long as it's set to false once



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