You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/09/09 04:17:43 UTC
[GitHub] [ratis] szetszwo commented on a diff in pull request #738: RATIS-1701. Add new Server RPC: readIndex
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org