ajayydv commented on a change in pull request #885: HDDS-1541. Implement 
addAcl,removeAcl,setAcl,getAcl for Key. Contributed by Ajay Kumat.
URL: https://github.com/apache/hadoop/pull/885#discussion_r290507665
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java
 ##########
 @@ -466,26 +486,29 @@ public boolean removeAcl(OzoneObj obj, OzoneAcl acl) 
throws IOException {
         throw new OMException("Bucket " + bucket + " is not found",
             BUCKET_NOT_FOUND);
       }
-      List<OzoneAcl> list = bucketInfo.getAcls();
-      if (!list.contains(acl)) {
-        // Return false if acl doesn't exist in current ACLs.
-        LOG.info("Acl:{} not found in existing ACLs:{}.", acl,
-            StringUtils.join(",", list));
-        return false;
+
+      // When we are removing subset of rights from existing acl.
+      for(OzoneAcl a: bucketInfo.getAcls()) {
+        if(a.getName().equals(acl.getName()) &&
 
 Review comment:
   Had offline discussion with @xiaoyuyao , we will change log statement in 
VolumeManagerImpl to debug.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to