-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BREAKING]: Change how Badger handles WAL #1555
Conversation
…ed (#1549)" This reverts commit 5d1bab4. We'reverting this commit because it seems to cause a strange issue while writing data. Running `go run -tags main.go benchmark write --sorted --compression=true --block-cache-mb=100` creates a directory which does not have all the keys. I don't know why this would fix the issue but the test works fine after reverting this commit.
asdf seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This renders Badger completely unusable on iOS, as it attempts to mmap 2GB at once, and fails. |
FYI. This is not mentioned in the MR or commit message, but this also removed |
This is a leftover from when Badger supported different modes (#1555).
This PR significantly improves Badger's disk usage behavior.
Breaking: This PR increases the magic version from 7 to 8. So, no older Badger directories would work with this change.
With this PR, we no longer use value log as write-ahead log. Instead, each MemTable has its own WAL. Value logs now only write values which are greater than ValueThreshold, while MemTable WAL only writes smaller values and value pointers.
On a crash and restart, the MemTable WALs are replayed to apply updates to Skiplist. When MemTables are flushed to L0, the corresponding WALs are deleted.
This PR makes big changes to how value log GC works:
badger gc
tool.This PR also makes a bunch of other changes:
This change is