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



##########
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:
       This seems to be a behavior change. Client previous expect false without 
exception for add existing acl or 
   remove non-existing acl now need to handle the exception. 




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