JingsongLi commented on code in PR #10350:
URL: https://github.com/apache/paimon/pull/10350#discussion_r4375398854
##########
paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java:
##########
@@ -247,13 +297,13 @@ private FileIOWithToken fileIOWithToken(long
minimumValidityMillis) throws IOExc
FileIO fileIO = FILE_IO_CACHE.getIfPresent(currentToken);
if (fileIO != null) {
- return new FileIOWithToken(fileIO, currentToken);
+ return new FileIOWithToken(viewOf(fileIO), currentToken);
Review Comment:
[P2] Scope cached endpoint routing to the effective catalog configuration
The new origin/target options may be supplied in the catalog, but this cache
is keyed only by the vended RESTToken. In one JVM I created two production
RESTTokenFileIO instances for the same table/token/expiry, both enabled, with
catalog-only `io-cache.origin.endpoint` and `io-cache.endpoint` set to A and B
respectively. B reused A’s already configured JindoFileIO: `hadoopOptions`
returned origin-A and `routedHadoopOptions` selected cache-A, although B
requested origin-B/cache-B. Changing only the token cache key made B correctly
select its own endpoints. `viewOf` adjusts table roots/prefixes, not the cached
endpoint configuration. Please include the effective catalog routing
configuration in the FileIO cache scope, so the newly supported catalog
endpoint settings cannot silently select another context’s backend. This probe
used real REST cache and Jindo configure/router code, with backend existence
overridden to avoid the local native-platform limitation.
--
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]