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


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java:
##########
@@ -1091,7 +1091,7 @@ public boolean checkLeadership() {
    * 4. If majority respond success, returns readIndex.
    * @return current readIndex.
    */
-  CompletableFuture<Long> getReadIndex(Long readAfterWriteConsistentIndex) {
+  CompletableFuture<Long> getReadIndex(RaftServerConfigKeys.Read.Option 
option, Long readAfterWriteConsistentIndex) {

Review Comment:
   They both need to confirm leader **and obtain readIndex** first. 
ReadOnly(ReadIndex based) uses majority heartbeats to obtain the readIndex 
while ReadOnly(Lease based) uses leader lease. I think readIndex is a shared 
step



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