dragonknightk commented on PR #14975:
URL: https://github.com/apache/gravitino/pull/14975#issuecomment-6921935161
@mchades Thanks, all three points are fixed in the latest commit.
1. With the metadata cache enabled, the default `getFilesetCatalog` calls
`cache.getFilesetCatalog(id)` again, so the scope only dedups the uncached
path. I checked the other cache reads (`getFileset`, `getCatalog` in the
property lookup, `getSchema`) and they already go through the cache as before.
`testMetadataCacheFilesetCatalogOverride` uses a cache subclass that overrides
`getFilesetCatalog` and asserts that open reads the overridden location.
2. The `ThreadLocal` is now an instance field, so each operations instance
has its own scope. Only the outermost scope of an instance sets and removes the
value, so nothing is left on the thread after an operation. The field carries
`@SuppressWarnings("ThreadLocalUsage")` with a comment explaining why.
`testNestedOperationsInstancesDoNotShareScope` now asserts that the inner
instance loads the catalog once and the fileset once.
3. `testCustomOperationsResolutionHooks` now pins the metadata cache
disabled and location auto-creation enabled.
I also widened `testMetadataRestCallsPerOperation` to run all 11 operations
on the default location, on a non-default current location, and with the
metadata cache enabled. The new tests point the current location name env
variable at a name that is never set, so a `CURRENT_LOCATION_NAME` in the build
environment does not change their results.
(๑•̀ㅂ•́)و✧
--
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]