ivandika3 commented on code in PR #1707:
URL: https://github.com/apache/ratis/pull/1707#discussion_r4676008334


##########
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServer.java:
##########
@@ -147,30 +146,39 @@ default RaftGroup getGroup() {
     StateMachine getStateMachine();
 
     /**
-     * Execute a local read-only query after applying the configured
-     * {@link RaftServerConfigKeys.Read.Option} consistency checks.
+     * Establish a local read barrier using the default read request semantics.
+     * Remote clients should use
+     * {@link 
org.apache.ratis.client.api.AsyncApi#sendReadOnly(org.apache.ratis.protocol.Message)}.
      *
-     * <p>This API is intended for embedded users that already have a local
-     * server division.  Applications may use local {@link Message}
-     * implementations so that their state machine can avoid materializing
-     * application request bytes.  Remote clients should continue to use
-     * {@link org.apache.ratis.client.api.AsyncApi#sendReadOnly(Message)}.
+     * @see #readIndexAsync(ClientId, ReadRequestTypeProto)
      */
-    default CompletableFuture<Message> readOnlyAsync(Message queryMessage) 
throws IOException {
-      return readOnlyAsync(ClientId.randomId(), 
ReadRequestTypeProto.getDefaultInstance(), queryMessage);
+    default CompletableFuture<Long> readIndexAsync() throws IOException {

Review Comment:
   Thanks @amaliujia for the review.
   
   > This is public API. Can we change it freely like this?
   
   In the ticket, I indicated "since the readOnlyAsync is not in any Ratis 
release, I propose to simply replace it.". Please let me know what you think. 
   
   It is odd for a new release to introduce a new deprecated API.
   
   



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