test_pg_chaos: Check a recovered object only while nothing is in flight on it #210
Open
koolkhel
wants to merge 1 commits from
koolkhel/vitastor:pg-chaos-busy-recover into master
pull from: koolkhel/vitastor:pg-chaos-busy-recover
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
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "koolkhel/vitastor:pg-chaos-busy-recover"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
flush_recover_pending() read an object as soon as the PG was active again, even while a write to it was still in flight. A read racing a write may return a mixture of the old and the new data when the store writes the new version in place under it: store v1 flushes a stable small write into the clean block (v1/flush.cpp:529, 611) while a read planned before it is still reading that block, and the new store's compaction does the same (blockstore_flush.cpp:482). v1/read.cpp:441 states this outright: "Reads running parallel to flushes of the same clean block may read a mixture of old and new data". check_recovered() then reported content no recorded version explains ("came back from an outage holding content, which no world of the recorded versions explains").
The change leaves such objects pending; the convergence loop checks them after drain(), as it already does for repeated deletions. read_object() waits for its own read and starts nothing else, so busy[obj] == 0 means nothing is in flight under the check.
Found: by a chaos test, test_pg_chaos --seed 766023370 (replicated, fsync=0, csum none) on an older tree: a recovery read planned while a small write was in flight returned the previous version number with the new write's bytes at 24576.. and a hole at 8192, because compaction wrote the new version into the block before the read completed. Master takes another path for this seed and passes it.
Tested: the seed passes with the change on that tree; on master the default run (100 seeds) and seeds 1000000-1000299 give the same result with and without the change (all pass).
Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.