jerryshao commented on code in PR #7796:
URL: https://github.com/apache/gravitino/pull/7796#discussion_r2253521381


##########
core/src/main/java/org/apache/gravitino/policy/PolicyManager.java:
##########
@@ -222,17 +229,71 @@ public boolean deletePolicy(String metalake, String 
policyName) {
 
   @Override
   public MetadataObject[] listMetadataObjectsForPolicy(String metalake, String 
policyName) {
-    throw new UnsupportedOperationException("Not implemented yet");
-  }
+    NameIdentifier policyIdent = NameIdentifierUtil.ofPolicy(metalake, 
policyName);
+    return TreeLockUtils.doWithTreeLock(
+        policyIdent,
+        LockType.READ,
+        () -> {
+          checkMetalake(NameIdentifier.of(metalake), entityStore);

Review Comment:
   As I mentioned in another PR, I think we can move this out of the lock to 
increase the performance.



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

Reply via email to