hemantk-12 commented on code in PR #7434:
URL: https://github.com/apache/ozone/pull/7434#discussion_r1843042848
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2968,6 +2968,11 @@ public ListKeysLightResult listKeysLight(String
volumeName,
public SnapshotInfo getSnapshotInfo(String volumeName, String bucketName,
String snapshotName) throws IOException {
metrics.incNumSnapshotInfos();
+ // 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 = resolveBucketLink(Pair.of(volumeName,
bucketName), false);
+ volumeName = resolvedBucket.realVolume();
Review Comment:
nit: we should just pass the resolved bucket and volume to the downstream
method or create local variables without updating the `volumeName` and
`bucketName`.
--
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]