yuqi1129 commented on code in PR #7476:
URL: https://github.com/apache/gravitino/pull/7476#discussion_r2189064750
##########
core/src/main/java/org/apache/gravitino/tag/TagManager.java:
##########
@@ -226,6 +227,42 @@ public MetadataObject[] listMetadataObjectsForTag(String
metalake, String name)
});
}
+ public MetadataObject[] listMetadataObjectsForTags(String metalake, String[]
names)
+ throws NoSuchTagException {
+ if (names == null || names.length == 0) {
+ return new MetadataObject[0];
+ }
+ NameIdentifier[] tagIds =
+ Arrays.stream(names)
+ .map(name -> NameIdentifierUtil.ofTag(metalake, name))
+ .toArray(NameIdentifier[]::new);
+ NameIdentifier lockId = tagIds[0];
+ return TreeLockUtils.doWithTreeLock(
+ lockId,
+ LockType.READ,
Review Comment:
In this case, we may need to use the `read` lock of tag's parent.
--
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]