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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1522,7 +1549,6 @@ private void deleteInternal(Container container, boolean 
force)
     }
     // Avoid holding write locks for disk operations
     container.delete();
-    sendICR(container);

Review Comment:
   I would just move the ICR sending immediately before `container.delete()`:
   ```
   sendICR(container);
   container.delete();
   ```
   
   This puts the ICR after the move to the tmp dir which is fast, but before 
the slower filesystem `rm`. The current implementation puts the ICR before 
moving to tmp which will cause problems if the move fails. SCM will not retry 
the delete after getting the ICR so it may at a later point try to re-import 
the container to this volume which will fail since the directory already exists.



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