OSD: Pass max_stripe = UINT64_MAX to the store in primary LIST #187
Open
koolkhel
wants to merge 1 commits from
koolkhel/vitastor:osd-primary-list-max-stripe into master
pull from: koolkhel/vitastor:osd-primary-list-max-stripe
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:osd-primary-list-max-stripe"
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
continue_primary_list()set the store LIST upper bound only whenmax_stripe != UINT64_MAX. A primary LIST (OSD_OP_SEC_LISTwithOSD_LIST_PRIMARY) up tomax_stripe = UINT64_MAXtherefore gave the storemax_oid = {inode, 0}, which is belowmin_oidas soon asmin_stripe > 0:min_oid(blockstore/v1/impl.cpp, the clean_db and dirty_db loops) and lists the rest of the PG shard: objects of every higher-numbered inode of the pool in that PG, at any stripe;The client passes the reply on as is (
cluster_client_list.cpp), andrm-datafilters only by stripe and deletesobj_pos->inode, i.e. the listed object's own inode, withOSD_OP_IGNORE_READONLY. Sovitastor-cli rm-data --inode N --min-offset X --max-offset 18446744073709551615(also--max-offset -1, whichuint64_value()turns into the same number) deletes objects of other inodes at offsets >= X on store v1, or reports success without deleting anything on the new store. Otherlist_inode()callers pass no upper bound and are not affected.This sets the bound the same way as the non-primary LIST in
osd_secondary.cpp. It also fixes the protocol comment inosd_ops.h: sinceb8eaaabfthe non-primary LIST no longer treatsmax_stripe = UINT64_MAXas 0, and with this change the primary one does not either.Tested: new
test_primary_list_max_stripe_boundinosd_test(a primary LIST withmin_stripe=0x20000,max_stripe=UINT64_MAXmust give the storemax_oid = {inode, UINT64_MAX}). It fails without the fix; with the fix the wholeosd_testpasses.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
A primary LIST up to max_stripe = UINT64_MAX left the store LIST upper bound at {inode, 0}, below min_oid as soon as min_stripe > 0. Store v1 then dropped the bound and listed the rest of the PG, objects of other inodes included, and the new store listed nothing. rm-data with such a --max-offset deleted objects of other inodes, or nothing at all. Set the bound the same way as the non-primary LIST does.88edafa39bto8976896866Ты ж там вроде где-то делал чтобы EINVAL ругалось на запросы где max < min?
Да, это #176: он отклоняет с EINVAL запросы с
max_stripe != 0 && min_stripe > max_stripe. Здесь другой случай:max_stripe = UINT64_MAXэту проверку проходит, но из-за условияmax_stripe != UINT64_MAXвcontinue_primary_list()хранилище получаетmax_oid = {inode, 0}, нижеmin_oid. Store v1 такую границу отбрасывает и отдаёт весь остаток PG с объектами других инодов, аvitastor-cli rm-data --min-offset X --max-offset -1их удаляет.Перебазировал на master с #176:
test_primary_list_max_stripe_boundбез этой правки падает (store получаетmax_oid.stripe = 0), с ней весьosd_testпроходит.8976896866to6529a09341View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.