sumitagrawl commented on code in PR #7434:
URL: https://github.com/apache/ozone/pull/7434#discussion_r1844253931


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -624,7 +625,12 @@ public ReferenceCounted<IOmMetadataReader> 
getActiveFsMetadataOrSnapshot(
     String[] keyParts = keyName.split(OM_KEY_PREFIX);
     if (isSnapshotKey(keyParts)) {
       String snapshotName = keyParts[1];
-
+      // Updating the volumeName & bucketName in case the bucket is a linked 
bucket. We need to do this before a
+      // permission check, since linked bucket permissions and source bucket 
permissions could be different.
+      ResolvedBucket resolvedBucket = 
ozoneManager.resolveBucketLink(Pair.of(volumeName,

Review Comment:
   respective caller already have acl check, do this acl check additionally 
while getting snapshot db reference is required? It may be redundant, as used 
while getting metadaReader.
   IMO, should be done at entry point, not in some common methods.



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