ivandika3 commented on code in PR #6768:
URL: https://github.com/apache/ozone/pull/6768#discussion_r1625729458


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java:
##########
@@ -275,39 +302,45 @@ public XceiverClientReply watchForCommit(long index)
     }
 
     try {
-      CompletableFuture<RaftClientReply> replyFuture = getClient().async()
-          .watch(index, RaftProtos.ReplicationLevel.ALL_COMMITTED);
+      CompletableFuture<RaftClientReply> replyFuture = 
getClient().async().watch(index, watchType);
       final RaftClientReply reply = replyFuture.get();
-      final long updated = updateCommitInfosMap(reply);
-      Preconditions.checkState(updated >= index);
-      return newWatchReply(index, ReplicationLevel.ALL_COMMITTED, updated);
+      if (!reply.isSuccess()) {
+        LOG.error("{} way commit failed", watchType, reply.getException());
+        throw reply.getException();
+      }

Review Comment:
   I think we can remove this. I think if `replyFuture#get` encountered an 
exception, it will throw the exception automatically and the user code cannot 
access the `RaftClientReply`. It's one of the main reason of RATIS-2089.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to