LuciferYang commented on code in PR #13851:
URL: https://github.com/apache/gravitino/pull/13851#discussion_r4560879314
##########
clients/client-python/gravitino/filesystem/gvfs_base_operations.py:
##########
@@ -525,13 +525,26 @@ def _merge_fileset_properties(
:param actual_location: The actual storage location
: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_gravitino_client().load_catalog(catalog_name)
- schema = catalog.as_schemas().load_schema(schema_name)
- fileset = catalog.as_fileset_catalog().load_fileset(
- NameIdentifier.of(schema_name, fileset_ident.name())
- )
+ if self._enable_fileset_metadata_cache:
+ # Go through the metadata cache so that an operation does not
reload the
+ # catalog, schema and fileset. Secrets are not cached and are still
+ # fetched on every call.
+ catalog = self._get_fileset_catalog(
+ NameIdentifier.of(metalake_name, catalog_name)
+ )
+ schema = self._get_fileset_schema(
+ NameIdentifier.of(metalake_name, catalog_name, schema_name)
+ )
+ fileset = self._get_fileset(fileset_ident)
Review Comment:
Thanks, fixed in 8cba966c6. `_merge_fileset_properties` now skips `******`
values in the catalog, schema and fileset properties, as
`omitStaticCredentialProperties` does in the Java client, so a masked override
left in the cached fileset no longer overwrites the catalog secret.
`test_removed_fileset_secret_falls_back_to_catalog_secret_with_cache` removes
the override between two merges and checks that `S3StorageHandler` gets the
catalog key and secret; it fails without the fix.
--
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]