-
Notifications
You must be signed in to change notification settings - Fork 643
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
Update doc that db might be corrupted when power failure during initialization #567
Comments
@mj-ramos I've been playing around with the lazyfs and the torn writes today. One thing I wanted to try is to write all four init pages and immediately fsync them: IMHO, this should fix the issues described in etcd-io/etcd#16596 Yet, the lazyfs config crashes on the very first page write (seems at half the 4k page size).
Mounting the file and reading it again with hexdump yields an empty / zeroed file:
Can I reconfigure lazyfs somehow to abide by the 4k page sizes? |
Hi! [[injection]]
type="split_write"
file="/home/data-r/data.etcd/member/snap/db"
persist=[1]
parts=4
occurrence=1 The only change needed is the mvcc/backend: cannot open database at data/data.etcd/member/snap/db (file size too small)
panic: cannot open database at data/data.etcd/member/snap/db (file size too small) This means that if a crash occurs after persisting the first 4096 bytes, etcd still fails to start. However, I might have found a possible fix for this problem. With LazyFS, I injected a
This fault simulates a power failure before the first write to the So, this problem is easily solved by adding some extra system calls and using the write to temporary file and rename strategy:
|
See etcd-io/etcd#16596 (comment)
The text was updated successfully, but these errors were encountered: