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


##########
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:
   It will be set back to original value if we failed transferring leadership. 
In other situations (stepDown / successful transferring), the LeaderStateImpl 
will be stopped and the `enabled` will stay in false.



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