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


##########
ratis-server-api/src/main/java/org/apache/ratis/server/protocol/RaftServerProtocol.java:
##########
@@ -38,4 +40,6 @@ enum Op {REQUEST_VOTE, APPEND_ENTRIES, INSTALL_SNAPSHOT}
   InstallSnapshotReplyProto installSnapshot(InstallSnapshotRequestProto 
request) throws IOException;
 
   StartLeaderElectionReplyProto 
startLeaderElection(StartLeaderElectionRequestProto request) throws IOException;
+
+  ReadIndexReplyProto readIndex(ReadIndexRequestProto request) throws 
IOException;

Review Comment:
   @SzyWilliam , thanks a lot for working on this! Just have the following 
comment:
   
   Since `LeaderStateImpl.getReadIndex()` is asynchronous, let define the this 
method in `RaftServerAsynchronousProtocol` instead.  Otherwise, it requires a 
thread to `waitForReadIndex(..)`.  It will limit the number of concurrent 
requests and potentially block the server when all the threads are calling 
`waitForReadIndex(..)`.



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