Abyss-lord commented on code in PR #7459:
URL: https://github.com/apache/gravitino/pull/7459#discussion_r2168042046
##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -217,28 +213,24 @@ public NameIdentifier[] listFilesets(Namespace namespace)
throws NoSuchSchemaExc
@Override
public Fileset loadFileset(NameIdentifier ident) throws
NoSuchFilesetException {
- return filesetCache.get(
- ident,
- k -> {
- try {
- FilesetEntity filesetEntity =
- store.get(ident, Entity.EntityType.FILESET,
FilesetEntity.class);
-
- return FilesetImpl.builder()
- .withName(ident.name())
- .withType(filesetEntity.filesetType())
- .withComment(filesetEntity.comment())
- .withStorageLocations(filesetEntity.storageLocations())
- .withProperties(filesetEntity.properties())
- .withAuditInfo(filesetEntity.auditInfo())
- .build();
-
- } catch (NoSuchEntityException exception) {
- throw new NoSuchFilesetException(exception,
FILESET_DOES_NOT_EXIST_MSG, ident);
- } catch (IOException ioe) {
- throw new RuntimeException("Failed to load fileset %s" + ident,
ioe);
- }
- });
+ try {
+ FilesetEntity filesetEntity =
+ store.get(ident, Entity.EntityType.FILESET, FilesetEntity.class);
Review Comment:
> so the current cache is behind the store?
Yes — the cache is embedded inside `EntityStore` via the `get()` logic.
It handles caching transparently, so callers like `FilesetCatalogOperations`
don’t need to manage caching themselves.
--
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]