Skip to content

make flush worker loop async#7405

Merged
timvisee merged 4 commits intodevfrom
async-flush-worker
Oct 15, 2025
Merged

make flush worker loop async#7405
timvisee merged 4 commits intodevfrom
async-flush-worker

Conversation

@generall
Copy link
Member

One less thread per shard.

@generall generall requested a review from ffuugoo October 14, 2025 16:34
Comment on lines +949 to +957
tokio::task::spawn_blocking(move || {
Self::flush_worker_internal(
segments_clone,
wal_clone,
wal_keep_from_clone,
clocks_clone,
shard_path_clone,
)
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the main change, not time is async, but we spawn thread on wach timeout. (actually, thread keep-alive is higher than that, only one thread is spawned per multiple collections)

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@generall generall mentioned this pull request Oct 14, 2025
@qdrant qdrant deleted a comment from coderabbitai bot Oct 15, 2025
@qdrant qdrant deleted a comment from coderabbitai bot Oct 15, 2025
coderabbitai[bot]

This comment was marked as resolved.

@qdrant qdrant deleted a comment from coderabbitai bot Oct 15, 2025
@timvisee timvisee merged commit 0101822 into dev Oct 15, 2025
15 checks passed
@timvisee timvisee deleted the async-flush-worker branch October 15, 2025 09:23
timvisee added a commit that referenced this pull request Nov 14, 2025
* make flush worker loop async

* await flush worker properly finishes

* simplify flush await

* Improved future select, inline return

---------

Co-authored-by: timvisee <tim@visee.me>
@timvisee timvisee mentioned this pull request Nov 14, 2025
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