Store v1: Fix two flusher hangs with deletions #114
Open
koolkhel
wants to merge 3 commits from
koolkhel/vitastor:v1-lost-flush into master
pull from: koolkhel/vitastor:v1-lost-flush
merge into: vitalif:master
vitalif:master
vitalif:tombstones
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
3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
80cd77c09d |
Store v1: Wake up the flusher when journal sectors are written (test_blockstore_chaos --seed 5 --config 12 --p-delete 30)
The flusher puts back the entries whose journal sector isn't written yet and stops when it finds nothing else to flush. Writing the sector moves dirty_start and makes them flushable, but nothing woke the flusher then: when the writes waiting for journal space or for a deletion were the only thing left, they hung forever, with the queue full of flushable entries and a trim requested. Happens with immediate_commit=all too. |
||
|
|
c9e29f666c |
Store v1: Do not queue a deletion for flushing again while it is being flushed (test_blockstore_chaos --hardened --seed 285 --config 21 --p-delete 30)
A write over a deletion asks the flusher to flush the deletion first. If the deletion is being flushed already, that queues it a second time, and the queued entry outlives the deletion. Versions restart from 1 after a deletion, so once the write is renumbered and becomes stable, queueing it is ignored because the stale queued version is higher. The flusher then skips the deletion it can't find, the write is never flushed, and the journal can't be trimmed past it: it fills up and every write fails with EAGAIN until a restart. Let the flush in progress requeue the deletion when it finishes instead, as it already does for versions which come up while an object is being flushed. |
||
|
|
857ddc298e |
Check that stable versions get flushed in test_blockstore_chaos --hardened
A store v1 stable version that no flush reaches pins the journal for good, and the store only shows it as writes refused with EAGAIN, which the test takes for journal pressure. With --hardened, check after every drain that the newest stable version of every object is being flushed, or queued under a version that is still in dirty_db and not older than it. The check scans all of dirty_db, so it is off by default. |