mchades commented on code in PR #9569:
URL: https://github.com/apache/gravitino/pull/9569#discussion_r2660454764
##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -166,19 +173,14 @@ static class FileSystemCacheKey {
// authority are both null
@Nullable private final String scheme;
@Nullable private final String authority;
- private final Map<String, String> conf;
+ @Nullable private String locationName;
private final String currentUser;
- FileSystemCacheKey(String scheme, String authority, Map<String, String>
conf) {
+ FileSystemCacheKey(String scheme, String authority, String locationName) {
Review Comment:
This cache key is not well designed. Let's assume the following scenario:
filesetA has location:
- loc1 -> hdfs://cluster1/path1
- loc2 -> hdfs://cluster1/path2
filsetB has locations:
- loc1 -> hdfs://cluster1/path3
The access order: `filesetA.loc1`, `filesetA.loc2`, `filesetB.loc1`
At this point, the following issues will arise:
1. `filesetA.loc1` will generate a cache, but `filesetA.loc2` cannot hit the
cache (cause by different `locationName`)
2. The `filesetB.loc1` entry will hit the cache; however, the configuration
on `filesetB` may differ from that on `filesetA`. In such cases, the incorrect
cache will be utilized.
--
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]