suxiaogang223 opened a new pull request, #61553:
URL: https://github.com/apache/doris/pull/61553
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
This PR migrates `ThriftHMSCachedClient` from a self-managed queue-based HMS
client pool to `commons-pool2` while keeping the external FE interface
unchanged.
It also clarifies the responsibility boundary of the HMS pool:
- The pool only manages FE-side client lifecycle, including create,
borrow/return, invalidate on failure, and destroy on close.
- Hive-side socket lifetime and reconnect remain handled by
`RetryingMetaStoreClient`.
- The pool does not interpret `hive.metastore.client.socket.lifetime` or
probe remote socket health.
Additional changes in this PR:
- Preserve throwable-based invalidation so failed borrowers are not returned
to the pool.
- Fix nested borrow hazards in `updateTableStatistics` and lock polling
paths under strict pool limits.
- Add FE unit coverage for normal return, invalidation, blocking borrow
reuse, close behavior, and single-client nested-call behavior.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [x] 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 <!-- Add your reason? -->
Manual verification:
- FE compilation passed locally after the pool migration changes.
- Re-ran `bash run-fe-ut.sh --run
org.apache.doris.datasource.hive.ThriftHMSCachedClientTest`; the run entered
the FE unit-test build flow and reached `fe-core` compilation, but I did not
wait for the full end-to-end completion in this environment.
- Behavior changed:
- [ ] No.
- [x] Yes. The HMS client pool implementation now uses `commons-pool2`
internally, while the pool scope is explicitly limited to FE-side lifecycle
management.
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]