SzyWilliam commented on code in PR #700:
URL: https://github.com/apache/ratis/pull/700#discussion_r936630199
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -831,7 +831,7 @@ public CompletableFuture<RaftClientReply>
submitClientRequestAsync(
if (type.is(TypeCase.READ)) {
// TODO: We might not be the leader anymore by the time this completes.
// See the RAFT paper section 8 (last part)
- replyFuture =
processQueryFuture(stateMachine.query(request.getMessage()), request);
+ replyFuture = readOnlyAsync(request);
Review Comment:
I'll add a ReadOption, which has 3 enum values:
1. default: use the current read path.
2. safe: use read index.
3. lease: use leader lease (this will be implemented later).
--
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]