suxiaogang223 opened a new pull request, #63677:
URL: https://github.com/apache/doris/pull/63677
### What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
The Hive write partition regression can fail while reading table files with
`DFSFileSystem is closed`. The shared external filesystem cache could close an
evicted filesystem immediately, even when a caller was still using the cached
instance for Hive file listing or split calculation.
This PR changes `FileSystemCache` to return leased filesystem wrappers.
Cache eviction marks the underlying filesystem as retiring, and the real
filesystem is closed only after all active leases are released. Hive external
metadata file loading now uses try-with-resources when borrowing filesystem
instances from the cache so leases are released deterministically.
A unit test covers the eviction path and verifies that an active leased
filesystem remains usable until the lease is closed.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]