szetszwo commented on code in PR #1295:
URL: https://github.com/apache/ratis/pull/1295#discussion_r2395379069


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -1087,7 +1090,8 @@ private CompletableFuture<RaftClientReply> 
readAsync(RaftClientRequest request)
 
       return replyFuture
           .thenCompose(readIndex -> getReadRequests().waitToAdvance(readIndex))
-          .thenCompose(readIndex -> queryStateMachine(request))
+          .thenComposeAsync(ignored -> 
stateMachine.query(request.getMessage()), readAsyncExecutor)

Review Comment:
   @symious , Since it is calling stateMachine.query(..), the `StateMachine` 
implementation could choose to run it with its own executor.  If we use an 
executor here, then the stateMachine has no choice and is forced to run it with 
Ratis executor.  So I suggest not to make this change.
   



-- 
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: issues-unsubscr...@ratis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to