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


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

Review Comment:
   If the delete operation fails, does it cause a resource leak, since the ICR 
have sent to SCM, then the SCM will not retry to delete the Container again?



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1490,6 +1509,13 @@ private void deleteInternal(Container container, boolean 
force)
         // 4. container moved to tmp folder
         // 5. container content deleted from tmp folder
         try {
+          long waitTime = clock.millis() - startTime;
+          if (waitTime > maxDeleteLockWaitMs) {

Review Comment:
   How about to check the SCM command's deadline time too in here, We can wait 
longer if the SCM deadline time is not exceeded here.



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