hemantk-12 commented on code in PR #4428:
URL: https://github.com/apache/ozone/pull/4428#discussion_r1142691066


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -198,8 +205,13 @@ void assertOpen() throws IOException {
   @Override
   public void close() throws IOException {
     if (closed.compareAndSet(false, true)) {
-      putBlockRequest.set(closeBuffers(buffers, super::writeFileChannel));
-      super.close();
+      try {
+        putBlockRequest.set(closeBuffers(buffers, super::writeFileChannel));
+        super.close();

Review Comment:
   Should `super.close()` be out of the try-catch?



##########
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() {

Review Comment:
   nit: I don't think it is ideal to create function for one liner.



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