brucearctor commented on code in PR #13891:
URL: https://github.com/apache/gravitino/pull/13891#discussion_r4608288794


##########
clients/client-python/gravitino/filesystem/gvfs_base_operations.py:
##########
@@ -526,37 +530,39 @@ def _merge_fileset_properties(
 
         :param fileset_ident: The fileset identifier
         :param actual_location: The actual storage location
+        :param fileset: The pre-loaded fileset if already available
         :return: Merged properties dictionary
         """
         metalake_name = fileset_ident.namespace().level(0)
         catalog_name = fileset_ident.namespace().level(1)
         schema_name = fileset_ident.namespace().level(2)
+        catalog = self._get_fileset_catalog(

Review Comment:
   Addressed in aa45b0890 — left the metadata-cache-enabled path unchanged from 
#13851 and added a `threading.local()` `_OperationScope` for `_load_catalog` 
and `_load_fileset` when metadata caching is disabled (opened around 
`DefaultGVFSOperations` methods and `_get_actual_filesystem_by_location_name`). 
`_merge_fileset_properties` loads via `_load_catalog` / `_load_fileset` when 
caching is off so `_get_fileset` and `_get_fileset_catalog` overrides select 
locations without changing backend properties/secrets. Added regression tests 
in `test_gvfs_merge_secrets.py`.



##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/BaseGVFSOperations.java:
##########
@@ -139,6 +140,12 @@ public abstract class BaseGVFSOperations implements 
Closeable {
   // Lazy initialization of GravitinoClient, see getGravitinoClient() for 
details.
   private volatile GravitinoClient gravitinoClient;
 
+  // Per-resolution catalog cache used when metadata caching is disabled so 
hooks and helpers share
+  // a single loadCatalog RPC within one getActualFileSystemByLocationName 
call.
+  private static final ThreadLocal<
+          IdentityHashMap<BaseGVFSOperations, Map<NameIdentifier, Catalog>>>
+      RESOLUTION_CATALOG_CACHE = new ThreadLocal<>();

Review Comment:
   Addressed in aa45b0890 — rebased onto `main`, dropped 
`RESOLUTION_CATALOG_CACHE`, and reused `OperationScope` (`loadCatalog` / 
`loadFileset`), while keeping the `getFilesetMetadataCache()` 
lazy-initialization fix in `getSchema()`, the `FilesetMetadataCache` 
catalog-lookup skips on cache hits, and the `docs/how-to-use-gvfs.md` key 
correction.



-- 
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]

Reply via email to