-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix flushing of dynamic mmap flags #6966
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
Conversation
// Explicitly flush so we don't lose dirty pages | ||
self.flusher()()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- because all set functions require
&mut
we are guaranteed to have exclusive access here, we're therefore safe to flush - we now flush both flags and the status file, we probably only need to flush flags
Note that we should assume that we can flush this structure at any time. New writes to the bool/null index should not be written to this structure directly and should be deferred until we flush, that will be implemented in a separate PR.
Let's finalize and merge https://github.com/qdrant/qdrant/pull/6954/files first, and see what parts of this remain relevant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commited a change which flushes flags only before reopening the mmap
Note: we should still merge this to satisfy #6954 (comment) |
77dff49
to
c596a83
Compare
This comment was marked as resolved.
This comment was marked as resolved.
* Directly flush flags, don't use single-use flusher * Explicitly flush before resizing flags file, prevent losing dirty pages * Don't create now obsolete flusher when opening mmap * clippy * Move flush call * flush before resizing only --------- Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Fix flushing behavior in the dynamic mmap flags structure, affecting the null and boolean indices.
This makes two changes:
All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?