sumitagrawl commented on code in PR #8022:
URL: https://github.com/apache/ozone/pull/8022#discussion_r1986258363


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -528,6 +557,15 @@ private ContainerCommandResponseProto dispatchCommand(
   private CompletableFuture<Message> writeStateMachineData(
       ContainerCommandRequestProto requestProto, long entryIndex, long term,
       long startTime) {
+    if (writeChunkFutureMap.containsKey(entryIndex)) {
+      // generally state machine will wait forever, for precaution, a check is 
added if retry happens.
+      return writeChunkFutureMap.get(entryIndex).getRaftFuture();
+    }
+    try {
+      validateLongRunningWrite(entryIndex);
+    } catch (IOException e) {

Review Comment:
   from exception perspective, its more clear here why exception has happened, 
later for further write(), it will throw unhealty exception by 
checkStateMachineUnhealthy. So difference in exception will provide clarity.
   IMO, no need change this.



-- 
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-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to