yuqi1129 commented on code in PR #9803:
URL: https://github.com/apache/gravitino/pull/9803#discussion_r2735231952
##########
server-common/src/main/java/org/apache/gravitino/server/authorization/MetadataAuthzHelper.java:
##########
@@ -136,6 +137,7 @@ public static NameIdentifier[] filterByExpression(
String expression,
Entity.EntityType entityType,
NameIdentifier[] nameIdentifiers) {
+ preloadToCache(entityType, nameIdentifiers);
Review Comment:
Prefetching the tables is a nice optimization for Jcasbin. I have the
following points that need to be cleared up.
- It seems that we need to load all tables in a schema whenever calling
`filterByExpression`, Is there a way to cache them?
- Based on the code, although you just put tables in the entity cache, you
did not use any of them when executing `batchGet`, am I right?
```
@Override
public <E extends Entity & HasIdentifier> List<E> batchGet(
List<NameIdentifier> ident, Entity.EntityType entityType, Class<E>
clazz) {
List<E> entities = backend.batchGet(ident, entityType);
for (E entity : entities) {
cache.put(entity);
}
return entities;
}
```
--
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]