jerryshao commented on code in PR #9430:
URL: https://github.com/apache/gravitino/pull/9430#discussion_r2650643139
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java:
##########
@@ -125,13 +119,31 @@ public FilesetEntity
getFilesetByIdentifier(NameIdentifier identifier) {
public List<FilesetEntity> listFilesetsByNamespace(Namespace namespace) {
NamespaceUtil.checkFileset(namespace);
- Long schemaId =
- EntityIdService.getEntityId(
- NameIdentifier.of(namespace.levels()), Entity.EntityType.SCHEMA);
-
- List<FilesetPO> filesetPOs =
- SessionUtils.getWithoutCommit(
- FilesetMetaMapper.class, mapper ->
mapper.listFilesetPOsBySchemaId(schemaId));
+ List<FilesetPO> filesetPOs;
+ if (GravitinoEnv.getInstance().config().get(Configs.CACHE_ENABLED)) {
Review Comment:
It is too complex that you need to check cache to use different code path, I
think it is better to have a unified solution, also hide the details of check
cache. Otherwise, it is hard to maintain and only the developers who understand
this part very well can change the code here.
--
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]