databendlabs / databend

๐——๐—ฎ๐˜๐—ฎ, ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ & ๐—”๐—œ. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.87k stars 751 forks source link

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

Closed drmingdrmer closed 3 days ago

drmingdrmer commented 3 days ago

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

Type of change

Related Issues


This change isโ€‚Reviewable