Store v1: Fix three journal replay bugs #157
Open
koolkhel
wants to merge 4 commits from
koolkhel/vitastor:v1-replay-fixes into master
pull from: koolkhel/vitastor:v1-replay-fixes
merge into: vitalif:master
vitalif:master
vitalif:primary-stickiness
vitalif:libvfn
vitalif:canceling
vitalif:immediate-repeering
vitalif:rdma-close-tcp
vitalif:use-degraded-writes
vitalif:fix-write-delete-flow
vitalif:openssl-3.0.12
vitalif:openssl-capture-secrets
vitalif:ignore-small-rdma-end
vitalif:encrypt-batch
vitalif:faster-peering-calc
vitalif:http-hello
vitalif:xxh3-bench
vitalif:create-user-etcd-based
vitalif:aesxts_streaming_nosupport
vitalif:refactor-heap-continue-write
vitalif:ston3lu-patch-0127
vitalif:rdma-credits
vitalif:heap-meta
vitalif:sendmsg-zc-no-more-error
vitalif:fix-clear-refs
vitalif:veeam-trick
vitalif:test-etcd-schizo
vitalif:test
vitalif:test1
vitalif:test2
vitalif:cow-meta
vitalif:kv-readahead
vitalif:qemu-fix-crash-idea
vitalif:eventloop-auto-init-trigger
vitalif:hugo-docs
vitalif:node-mutex-and-postpone
vitalif:check-writeback
vitalif:msgr-iothreads-v2
vitalif:antietcd
vitalif:rel-1.4
vitalif:test-fix-ec-unknown-state-51
vitalif:kv-update
vitalif:kv-debug
vitalif:hotfix-1.2.0
vitalif:rdma-simple-nodp
vitalif:zerocopy-tcp-send
vitalif:csi-staging
vitalif:hotfix-1.1.0
vitalif:hotfix-1.0.0
vitalif:fsync-feedback
vitalif:cached-reads
vitalif:qemu-send-loop
vitalif:test-double-alloc
vitalif:hier-failure-domains
vitalif:mon-self-restart
vitalif:epoch-deletions
vitalif:rdma-flow-control
vitalif:csi-use-vitastor-cli
vitalif:rdma-v2
vitalif:etcd-hide-base64
vitalif:lrc-matrix
vitalif:rm-left-on-dead
vitalif:nfs-proxy-old
vitalif:non-odp-rdma
vitalif:test-zctr
vitalif:separate-data-connections
vitalif:sec_osd_msgr
vitalif:test-assert
vitalif:nbd-vmsplice
vitalif:allow-etcd-address-option
vitalif:rdma-zerocopy
vitalif:rel-0.5
vitalif:openonload
vitalif:sync-io-test
vitalif:trace-sync
vitalif:trace-sqes
vitalif:test-submit-and-wait
vitalif:test-sq-poll
vitalif:blocking-uring-test
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8e03e581ff |
Store v1: Test that a new journal does not chain to an old one
Preparing an OSD again zeroes only the first block of its journal, so the sectors of the previous OSD stay behind it. A start entry that is the same every time would let the replay chain into them; the random version of the start entry is what prevents it. |
||
|
|
2cfd9ab240 |
Store v1: Do not replay an earlier pass of the journal (test_blockstore_chaos --seed 350 --config 21 --steps 30000 --p-delete 30)
A trim can point the superblock at a sector whose latest write is not durable yet, or not written at all when the journal is emptied. That sector then holds an earlier pass of the ring, and replay, which never checked the first entry, took it for live entries: old deletions and writes came back over renumbered objects. Keep what the first entry chains to in the superblock's reserved field and stop the replay, in the store and in vitastor-disk, on a mismatch (0 from older versions skips the check). Never trim past a sector still open for appends. |
||
|
|
94227e9a67 |
Store v1: Keep journaled small writes under a deletion (test_blockstore_chaos --seed 553 --config 22 --steps 30000 --p-delete 30)
A deletion forgot every unsynced version before it, small writes too. Their entries are already in the journal and may reach the disk with any later fsync, yet forgetting them released their sectors, so a trim could cut between an object's small writes while the deletion was not durable: after a power outage recovery replayed the later ones without their base. Forget only unsynced big writes, which are not journaled yet. |
||
|
|
d9289b8bbb |
Store v1: Start each instance with a journal entry of its own (test_blockstore_chaos --seed 61 --config 14 --steps 30000 --p-delete 30)
Journal entries chain only by checksums. After a power outage left a hole with written sectors behind it, the same entries written into the hole again (a retried write, delete or stabilize) made those sectors a valid continuation, and the next restart replayed lost operations. Write a no-op rollback of the absent object 0:0 to a random version at start, so nothing written later matches what a crashed instance wrote. |