sundapeng commented on PR #10178:
URL: https://github.com/apache/paimon/pull/10178#issuecomment-5867085922

   Thanks, good catch. Instead of fixing the supplier's lifetime I removed the 
registry: `RESTTokenCredentialsProvider` is now built from the delegate's 
options and reloads the table's data token from the catalog on its own, like 
Iceberg's `VendedCredentialsProvider` for S3. Nothing ties it to 
`RESTTokenFileIO` or its cache, so a stream that outlives its cache entry keeps 
getting fresh tokens. `RESTTokenFileIOOnOSSTest` evicts the cache while a 
stream is open, crosses a reload and checks the next read is signed with the 
new token. CI is green on 002bdcc.
   
   The evicted OSS FileSystem not being closed predates this PR: 
`RESTTokenFileIO` sets `file-io.allow-cache=false` and `PluginFileIO.close()` 
is a no-op. Forwarding `close()` would close the FileSystem under open streams 
on eviction, for every plugin FileIO, and closing only after the last stream 
would need stream tracking in `RESTTokenFileIO` that hides `VectoredReadable` 
and misses callers of `fileIO()`. I'd like to handle it in a separate issue. 
Does that work for you?
   


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