Skip to content

[opt](point query) reduce short circuit lookup cache usage (#67228) - #69020

Merged
yiguolei merged 1 commit into
apache:branch-4.2from
HonestManXin:cherry-67228
Oct 15, 2026
Merged

yiguolei merged 1 commit into
apache:branch-4.2from
HonestManXin:cherry-67228

Conversation

@HonestManXin

Copy link
Copy Markdown
Contributor

)

LookupConnectionCache preallocates 32 reusable Blocks for each cached
point-query context. For wide tables, these Blocks dominate the cache
memory usage, and the overhead grows significantly with the number of
client connections.
In the current implementation, a Reusable instance is not shared across
client connections, and requests within the same connection are executed
serially. Therefore, the concurrency of each Reusable instance does not
exceed one, making it unnecessary to preallocate 32 Blocks.
This change makes the Block pool size configurable and reduces the
default size from 32 to 1. If concurrent access is introduced in the
future, additional Blocks can still be allocated on demand, while the
pool retains only the configured number of idle Blocks.
In a real production online point-query workload querying a wide table
with about 80 columns through approximately 8,000 client connections,
the LookupConnectionCache memory usage on a single BE was reduced from
about 10 GB to 1.8 GB.

Co-authored-by: TRAE CLI <[email protected]>
@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?

@yiguolei

Copy link
Copy Markdown
Contributor

run buildall

@yiguolei
yiguolei merged commit 03b7020 into apache:branch-4.2 Oct 15, 2026
27 of 28 checks passed
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