osd: Use role 0 for tombstone copies in replicated pools, revert the stripes guard #161
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:tomb-replica-role"
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
Root cause of the replica-pool overflow that
3e4aa533guarded against, plus the revert of that guard, as discussed.register_tombstone(..., all_applied=true)took the copy roles frompg.cur_loc_set. That set holds the index in the target set even in a replicated pool, so the copies got roles 1 and 2. Every other replicated object state uses role 0: theall_applied=falsebranch doesrep ? 0 : ..., and the delete paths compare withrep || c.role == loc.role.mark_object_corrupted()over such a tombstone state indexed its one-elementstripesarray by that role. The roles also broke the(role, osd)dedupe of outdated copies inregister_tombstone().stripes[chunk.role]isstripes[0]again.Tested:
osd_testcasetest_tombstone_replicated_roles: a delete in a replicated x3 pool, where the tombstone is registered for a later cleanup, must leave every copy at role 0. On master it fails with roles 1 and 2. The wholeosd_testpasses with both commits.test_pg_chaos --replicated [--recovery]ran 9000 seeds on master with an assert onrole != 0inmark_object_corrupted(). It never fired, so the chaos test doesn't reach this path by itself; the new unit test does.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA