OneSizeFitsQuorum commented on code in PR #925:
URL: https://github.com/apache/ratis/pull/925#discussion_r1337970249
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java:
##########
@@ -1113,6 +1116,12 @@ CompletableFuture<Long> getReadIndex(Long
readAfterWriteConsistentIndex) {
new LeaderNotReadyException(server.getMemberId())));
}
+ // if lease is enabled, check lease first
+ if (hasLease()) {
Review Comment:
It seems that even though lease read is not enabled, we are still calling
`hasLease` frequently and attempting to extend lease many times. Maybe we could
use some optimization here, since it's a critical step in the query.
--
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]