adoroszlai commented on code in PR #4981:
URL: https://github.com/apache/ozone/pull/4981#discussion_r1260720086


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java:
##########
@@ -766,14 +766,22 @@ private void deleteBucketFromVolume(Path f, OFSPath 
ofsPath)
       throws IOException {
     OzoneVolume volume =
         adapterImpl.getObjectStore().getVolume(ofsPath.getVolumeName());
-    try {
-      volume.deleteBucket(ofsPath.getBucketName());
-    } catch (OMException ex) {
-      // bucket is not empty
-      if (ex.getResult() == BUCKET_NOT_EMPTY) {
-        throw new PathIsNotEmptyDirectoryException(f.toString());
-      } else {
-        throw ex;
+    int retryCount = 3;
+    int count = 0;
+    while (count < retryCount) {

Review Comment:
   Why do we need to retry `deleteBucket`?  Is the goal to fix intermittent 
"bucket not empty" problem (e.g. HDDS-8526, HDDS-8912)?  If so, I think it 
should be fixed separately.



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