Skip to content

branch-4.0: [improvement](fe) Migrate HMS client pool to Commons Pool #61553#61975

Open
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-61553-branch-4.0
Open

branch-4.0: [improvement](fe) Migrate HMS client pool to Commons Pool #61553#61975
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-61553-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Cherry-picked from #61553

### What problem does this PR solve?

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.
@github-actions github-actions bot requested a review from yiguolei as a code owner March 31, 2026 22:58
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Mar 31, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants