szetszwo commented on code in PR #4428:
URL: https://github.com/apache/ozone/pull/4428#discussion_r1142828919


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -274,4 +286,8 @@ private static ContainerCommandRequestProto 
readPutBlockRequest(ByteBuffer b)
     }
     return request;
   }
+
+  private void volumeOnFailure() {
+    onFailure(getContainerData().getVolume());

Review Comment:
   @guohao-rosicky , thanks for working on this!
   
   Let's move this method up and rename it to `checkVolume`.
   ```java
   +++ 
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/StreamDataChannelBase.java
   @@ -22,6 +22,7 @@
    import 
org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException;
    import org.apache.hadoop.ozone.container.common.helpers.ContainerMetrics;
    import org.apache.hadoop.ozone.container.common.impl.ContainerData;
   +import org.apache.hadoop.ozone.container.common.utils.StorageVolumeUtil;
    import org.apache.ratis.statemachine.StateMachine;
    
    import java.io.File;
   @@ -64,6 +65,10 @@ private FileChannel getChannel() {
        return randomAccessFile.getChannel();
      }
    
   +  void checkVolume() {
   +    StorageVolumeUtil.onFailure(containerData.getVolume());
   +  }
   +
      @Override
      public final void force(boolean metadata) throws IOException {
        getChannel().force(metadata);
   ```



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