bshashikant commented on a change in pull request #54: HDDS-2281. 
ContainerStateMachine#handleWriteChunk should ignore close container exception
URL: https://github.com/apache/hadoop-ozone/pull/54#discussion_r337403878
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
 ##########
 @@ -460,6 +460,10 @@ private ExecutorService getCommandExecutor(
             LOG.error(gid + ": writeChunk writeStateMachineData failed: 
blockId"
                 + write.getBlockID() + " logIndex " + entryIndex + " chunkName 
"
                 + write.getChunkData().getChunkName() + e);
+            metrics.incNumWriteDataFails();
+            // write chunks go in parallel. It's possible that one write chunk
+            // see the stateMachine is marked unhealthy by other parallel 
thread.
+            stateMachineHealthy.set(false);
 
 Review comment:
   > So question; if a thread has marked the container as unhealthy why should 
a write be successful at all ?
   
   If a container is marked unhealthy, write will marked fail and log Append 
wlll fail in ratis. This is juts incrementing fail count metrics here and 
marking the stateMachine for the pipeline unhealthy so that now new ratis 
snapshots can be taken .

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to