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


##########
ratis-client/src/main/java/org/apache/ratis/client/api/BlockingApi.java:
##########
@@ -54,6 +54,17 @@ default RaftClientReply sendReadOnly(Message message) throws 
IOException {
    */
   RaftClientReply sendReadOnly(Message message, RaftPeerId server) throws 
IOException;
 
+  /**
+   * Send the given readonly message to the raft service.
+   *
+   * @param message The request message.
+   * @param server The target server.  When server == null, send the message 
to the leader.
+   * @param limitLog if server is follower, limitLog will be used to decide 
read from follower or not
+   * @param limitTimeMs if server is follower, limitTimeMs will be used to 
decide read from follower or not
+   * @return the reply.
+   */
+  RaftClientReply sendReadOnly(Message message, RaftPeerId server, int 
limitLog, long limitTimeMs) throws IOException;

Review Comment:
   > The addition of "okForLocalReadBounded" in RaftServer is for the follower 
OzoneManager to decide to use it's local data, because in Ozone, clients are 
not using ratis' client IO API.
   
   Could you add an example to show exactly how Ozone will use it?
   
   > The latest commit is for your last question: "Client builds a new server? 
How would it work".
   
   My question actually is how to use `okForLocalReadBounded`.
   
   If Ozone does not need this new `sendReadOnly(..., long limitTimeMs)` 
method.  Please don't add it.
   



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