yuqi1129 commented on code in PR #8297:
URL: https://github.com/apache/gravitino/pull/8297#discussion_r2318946204
##########
core/src/main/java/org/apache/gravitino/authorization/PermissionManager.java:
##########
@@ -81,6 +85,17 @@ User grantRolesToUser(String metalake, List<String> roles,
String user) {
UserEntity.class,
Entity.EntityType.USER,
userEntity -> {
+ if (store instanceof EntityCache) {
Review Comment:
@xunliu , please check it.
##########
core/src/main/java/org/apache/gravitino/authorization/PermissionManager.java:
##########
@@ -81,6 +85,17 @@ User grantRolesToUser(String metalake, List<String> roles,
String user) {
UserEntity.class,
Entity.EntityType.USER,
userEntity -> {
+ if (store instanceof EntityCache) {
Review Comment:
After checking the code, it is indeed that `store` will never be an
instance of `EntityCache`.
##########
core/src/main/java/org/apache/gravitino/authorization/PermissionManager.java:
##########
@@ -81,6 +85,17 @@ User grantRolesToUser(String metalake, List<String> roles,
String user) {
UserEntity.class,
Entity.EntityType.USER,
userEntity -> {
+ if (store instanceof EntityCache) {
Review Comment:
Another point is that since `RelationalEntityStore` already performed
invalidation operations, it seems that there is no need to do the same thing
again here.
https://github.com/apache/gravitino/blob/a9a43808cc18bad12d7fb76930a7ea6470b96180/core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java#L120-L124
--
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]