ayushtkn commented on a change in pull request #1814:
URL: https://github.com/apache/ozone/pull/1814#discussion_r563259710



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java
##########
@@ -431,10 +432,11 @@ public boolean addAcl(OzoneObj obj, OzoneAcl acl) throws 
IOException {
             BUCKET_NOT_FOUND);
       }
 
-      changed = bucketInfo.addAcl(acl);
-      if (changed) {
-        metadataManager.getBucketTable().put(dbBucketKey, bucketInfo);
+      if (!bucketInfo.addAcl(acl)) {
+        throw new OMException("Add acl operation failed" + bucket,
+            ACL_ADD_FAILED);

Review comment:
       So, will returning false cause any issue?
   We are catching exception bellow at L440, For that we can throw this 
ACL_ADD_FAILED exception. does that make sense?




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

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