amaliujia commented on code in PR #1490:
URL: https://github.com/apache/ratis/pull/1490#discussion_r3479167714
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -1113,11 +1113,12 @@ private CompletableFuture<RaftClientReply>
readAsync(RaftClientRequest request)
if (request.getType().getRead().getPreferNonLinearizable()
|| readOption == RaftServerConfigKeys.Read.Option.DEFAULT) {
final CompletableFuture<RaftClientReply> reply =
checkLeaderState(request);
- if (reply != null) {
- return reply;
- }
- return queryStateMachine(request);
- } else if (readOption == RaftServerConfigKeys.Read.Option.LINEARIZABLE){
+ if (reply != null) {
+ return reply;
+ }
+ return isDummyRead(request) ?
CompletableFuture.completedFuture(newSuccessReply(request))
Review Comment:
Just to learn the context, why do we need this dummy read in Ratis streaming
read while we do not have it for Ratis streaming write?
--
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]