Skip to content

Gridstore non-blocking flush#8188

Merged
IvanPleshkov merged 2 commits into
devfrom
gridstore-unblocked-flush
Feb 23, 2026
Merged

Gridstore non-blocking flush#8188
IvanPleshkov merged 2 commits into
devfrom
gridstore-unblocked-flush

Conversation

@IvanPleshkov

@IvanPleshkov IvanPleshkov commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

This PR fixes search spikes while intensive upsert-search on low-IO configuration.
Spike appears when gridstore flush blocks writing by RwLock::read. Writing blocks searches - spike appears because of waiting of flush.

The solution is non-blocking flush, where flush does not block writes.
To achieve it, this PR changes MmapMut into MmapSlice<u8> which can be created from MmapMut and has Flusher support.

@IvanPleshkov IvanPleshkov marked this pull request as ready for review February 20, 2026 12:11
coderabbitai[bot]

This comment was marked as resolved.

@qdrant qdrant deleted a comment from coderabbitai Bot Feb 20, 2026

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I really like that we utilize the existing flushers here, keeping these changes relatively minimal.

Could you share some benchmarks results for this one.

Comment thread lib/gridstore/src/page.rs
///
/// Best suited for random reads.
mmap: MmapMut,
mmap: MmapSlice<u8>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why swap the type here? Is it just so that we have a premade .flusher()?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is fine, we are going to change this to universal file interface anyway

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because MmapSlice has a ready-to-use flusher(). MmapMut is an external crate type without flusher.

Comment thread lib/gridstore/src/gridstore.rs Outdated
@IvanPleshkov IvanPleshkov marked this pull request as draft February 20, 2026 16:10
@timvisee

Copy link
Copy Markdown
Member

Thanks! I like this a lot better

f5d4678

@IvanPleshkov IvanPleshkov marked this pull request as ready for review February 23, 2026 10:59
@IvanPleshkov IvanPleshkov merged commit 9f1a6be into dev Feb 23, 2026
15 checks passed
@IvanPleshkov IvanPleshkov deleted the gridstore-unblocked-flush branch February 23, 2026 11:18
generall pushed a commit that referenced this pull request Mar 26, 2026
* gridstore unblocked flush

* review remarks
KShivendu pushed a commit that referenced this pull request Mar 30, 2026
* gridstore unblocked flush

* review remarks
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