errose28 commented on code in PR #7065:
URL: https://github.com/apache/ozone/pull/7065#discussion_r1737640241


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1259,16 +1283,18 @@ public void quasiCloseContainer(Container container, 
String reason)
                 .getContainerID() + " while in " + state + " state.", error);
       }
       container.quasiClose();
-      ContainerLogger.logQuasiClosed(container.getContainerData(), reason);
-      sendICR(container);
     } finally {
       container.writeUnlock();
     }
+    createContainerMerkleTree(container);
+    ContainerLogger.logQuasiClosed(container.getContainerData(), reason);
+    sendICR(container);
   }
 
   @Override
   public void closeContainer(Container container)
       throws IOException {
+    createContainerMerkleTree(container);

Review Comment:
   Why does this method not follow the same pattern as the others for when to 
call tree creation? Usually it won't be necessary since `markContainerForClose` 
would already be called but it's still nice to have since we already have a 
file existence check to remove duplicate work.



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