hemantk-12 commented on code in PR #7434:
URL: https://github.com/apache/ozone/pull/7434#discussion_r1843038013


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4925,7 +4940,9 @@ public List<SnapshotDiffJob> listSnapshotDiffJobs(String 
volume,
                                                     String jobStatus,
                                                     boolean listAll)
       throws IOException {
-
+    ResolvedBucket resolvedBucket = this.resolveBucketLink(Pair.of(volume, 
bucket), false);

Review Comment:
   Add the check in `cancelSnapshotDiff` as well.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -656,7 +657,12 @@ private ReferenceCounted<OmSnapshot> getSnapshot(
       // don't allow snapshot indicator without snapshot name
       throw new OMException(INVALID_KEY_NAME);
     }
-
+    // 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:
   Do we need to have it here? I think we should change it on the entry point 
in OzoneManager for the read operations and others in the corresponding 
`preExecute`.



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