wombatu-kun opened a new pull request, #9471: URL: https://github.com/apache/paimon/pull/9471
### Purpose Split out of #8962 at @JingsongLi's request. Answers [this review comment](https://github.com/apache/paimon/pull/8962#discussion_r3703449629). `FileIO.get` probes a loader by calling `load(path)`, configuring the result and calling `exists`, then discards it and calls `load` again for the instance it returns. Every `FileIO.get` therefore builds the file system twice for the same path, and with `fs.<scheme>.impl.disable.cache=true` the first one is unreachable afterwards. `checkAccess` now returns the instance it checked and `get` hands that one back, releasing it if the candidate is rejected or the selection throws. That also covers the reviewer's point that `FileIOLoader.load` is `@Public` and may return a cached instance, so closing the probe and reloading could hand back a closed one. Its return type changes from `FileIOLoader` to `FileIO`, a `@Public` signature change with no other caller in the repo. ### Tests `FileIOTest`: the checked instance is handed back rather than reloaded and configured twice, and it is released when its loader is dropped for missing options or when `requiredOptions()` throws. -- 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]
