xunliu commented on code in PR #8297:
URL: https://github.com/apache/gravitino/pull/8297#discussion_r2313997092
##########
core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java:
##########
@@ -117,6 +118,23 @@ public <E extends Entity & HasIdentifier> void put(E e,
boolean overwritten)
}
@Override
+ public <E extends Entity & HasIdentifier> E update(
+ NameIdentifier ident,
+ Class<E> type,
+ Entity.EntityType entityType,
+ List<String> roles,
+ Function<E, E> updater)
+ throws IOException, NoSuchEntityException, EntityAlreadyExistsException {
+ roles.forEach(
+ roleName -> {
+ Namespace namespaceRole =
NamespaceUtil.ofRole(ident.namespace().level(0));
+ NameIdentifier nameIdentifierRole = NameIdentifier.of(namespaceRole,
roleName);
+ cache.invalidate(nameIdentifierRole, Entity.EntityType.ROLE);
+ });
+
+ return update(ident, type, entityType, updater);
+ }
+
Review Comment:
Fixed.
Base offline discussion, use all fields to cache.
--
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]