OneSizeFitsQuorum commented on code in PR #925:
URL: https://github.com/apache/ratis/pull/925#discussion_r1336569241
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderLease.java:
##########
@@ -34,11 +34,13 @@
class LeaderLease {
+ private final boolean enabled;
private final long leaseTimeoutMs;
// TODO invalidate leader lease when stepDown / transferLeader
private final AtomicReference<Timestamp> lease = new
AtomicReference<>(Timestamp.currentTime());
LeaderLease(RaftProperties properties) {
+ this.enabled = RaftServerConfigKeys.Read.leaderLeaseEnabled(properties);
final double leaseRatio =
RaftServerConfigKeys.Read.leaderLeaseTimeoutRatio(properties);
Preconditions.assertTrue(leaseRatio > 0.0 && leaseRatio <= 1.0,
Review Comment:
do we need to check this when lease read is disabled?
--
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]