ChenSammi commented on code in PR #10199:
URL: https://github.com/apache/ozone/pull/10199#discussion_r3205743685


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -664,15 +664,20 @@ private void cleanupFailedImport() {
       if (containerData.hasSchema(OzoneConsts.SCHEMA_V3)) {
         BlockUtils.removeContainerFromDB(containerData, config);
       }
-      FileUtils.deleteDirectory(new File(containerData.getMetadataPath()));

Review Comment:
   @devmadhuu , we can first move the container directory to tmp, and then 
delete it. If any deletion in between failed, the residual will not impact 
normal flow, and it will be deleted on DN restart or next time this container 
is downloaded for import. 



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