Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make ListKV non-blocking by returning stream directly #16868

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Nov 19, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

perf: make ListKV non-blocking by returning stream directly

Return Stream to client instead of collecting results into Vec first.
This change eliminates unnecessary buffering of ListKV results in
databend-meta server, reducing memory usage and improving response
times. The direct streaming approach better matches current usage
patterns and removes legacy collection behavior.

Although a large ListKV response body won't block the databend-meta
server, but it will still block on the client side.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Other

Related Issues


This change is Reviewable

Return Stream to client instead of collecting results into Vec first.
This change eliminates unnecessary buffering of ListKV results in
databend-meta server, reducing memory usage and improving response
times. The direct streaming approach better matches current usage
patterns and removes legacy collection behavior.

Although a large ListKV response body won't block the databend-meta
server, but it will still block on the client side.
@drmingdrmer drmingdrmer changed the title perf: make ListKV non-blocking by returning stream directly refactor: make ListKV non-blocking by returning stream directly Nov 19, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review November 19, 2024 03:23
@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Nov 19, 2024
@drmingdrmer drmingdrmer merged commit 357404c into databendlabs:main Nov 19, 2024
81 of 84 checks passed
@drmingdrmer drmingdrmer deleted the 169-stream-list branch November 19, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant