swamirishi commented on code in PR #5326:
URL: https://github.com/apache/ozone/pull/5326#discussion_r1379012280


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketDeleteRequest.java:
##########
@@ -141,6 +142,16 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
             OMException.ResultCodes.BUCKET_NOT_EMPTY);
       }
 
+      // Check if bucket does not contain incomplete MPUs
+      if (omMetadataManager.containsIncompleteMPUs(volumeName, bucketName)) {
+        LOG.debug("Volume '{}', Bucket '{}' can't be deleted when it has " +
+                "incomplete multipart uploads", volumeName, bucketName);
+        throw new OMException(

Review Comment:
   nit: Using String.format would be better than concat in this case. 
String.format would use stringbuilder internally which would be better in this 
case. Here there would be 9 string instances while string builder will only 
have 4 instances.



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