-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Lost writes after 5M unique keys are inserted in two partions. #112
Comments
confirmed the above repro also on macos 14.7.1 / rust 1.81, so it's not only due to my machine being old and sad. edit: also confirmed with fjall 2.4.2 on the old machine. edit 2: also confirmed repro on my next-most-convenient machine... a raspberry pi 4b (linux raspberrypi) on an XFS volume. (mac machines were APFS). so likely not FS, OS, or architecture specific. |
@uniphil I think I tracked it down to the journal truncation, which is kind of too convoluted anyway. Can you try this branch? https://github.com/fjall-rs/fjall/tree/fix/journal-truncation |
yup it worked! 🎉
|
Describe the bug
Fjall appears to sometimes lose writes after closing and reopening a keyspace with two partitions.
To Reproduce
My repro is here: https://github.com/uniphil/kv-for-likes-test/blob/fjall-lost-write-repro/fjall/src/lost-write.rs
With data file here: https://github.com/uniphil/kv-for-likes-test/blob/fjall-lost-write-repro/likes5M-anon.txt
It has 5M entries total between the two partitions -- at 4M it wasn't reliably reproducing.
Run with
cargo run --release --bin lost-write
It fails every time for me with an output like
with this size of data file, it's always the
unlikes
count that's wrong after reopening. with the full 17.5M set i think both were wrong (but i'd need to confirm). The number of lost writes tounlikes
varies across runs.I wasn't seeing this issue before when I had set a larger block size.
Expected behavior
The number of keys in a partition shouldn't change after closing and reopening it.
Screenshots
n/a
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: