You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "szetszwo (via GitHub)" <gi...@apache.org> on 2023/03/21 02:05:15 UTC

[GitHub] [ozone] szetszwo commented on a diff in pull request #4428: HDDS-8220. [Ozone-Streaming] KeyValueStreamDataChannel add write data exception handling

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: issues-unsubscribe@ozone.apache.org

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


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