osd: Test a rewrite after a delete that missed a down OSD #147

Open
koolkhel wants to merge 2 commits from koolkhel/vitastor:pg-epoch-rewrite-test into master
Contributor

Description

A delete reaches the live OSDs only, the degraded PG re-peers, the object is written again and the down OSD returns. The rewrite must get a version newer than the copy that OSD kept, or peering takes the stale copy for current. Covers b1fd7548 end to end for a replicated and an EC 2+1 pool.

The test runs the legacy delete (pg.enable_tombstones off: Store v1, or a PG with a member without tombstone support), which doesn't report the epoch. A tombstone delete allocates a version and reports its epoch like a write, and the tombstone stays listed while the PG is left on dead, so the test leaves that path out.

Tested on master 36e38503: osd_test passes; with the osd_peering_pg.cpp change of b1fd7548 reverted, both cases fail (the rewrite reuses the deleted chain's version 7:1).

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description A delete reaches the live OSDs only, the degraded PG re-peers, the object is written again and the down OSD returns. The rewrite must get a version newer than the copy that OSD kept, or peering takes the stale copy for current. Covers b1fd7548 end to end for a replicated and an EC 2+1 pool. The test runs the legacy delete (`pg.enable_tombstones` off: Store v1, or a PG with a member without tombstone support), which doesn't report the epoch. A tombstone delete allocates a version and reports its epoch like a write, and the tombstone stays listed while the PG is left on dead, so the test leaves that path out. Tested on master 36e38503: osd_test passes; with the `osd_peering_pg.cpp` change of b1fd7548 reverted, both cases fail (the rewrite reuses the deleted chain's version 7:1). ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-22 17:39:19 +03:00
A delete reaches the live OSDs only, the degraded PG re-peers, the
object is written again and the down OSD returns. The rewrite must get
a version newer than the copy that OSD kept, or peering takes the stale
copy for current. Covers b1fd7548 end to end for a replicated and an
EC 2+1 pool.
koolkhel added 1 commit 2026-11-22 22:15:21 +03:00
A tombstone delete allocates and reports a version like a write, so
the epoch can't regress after it. The test runs the legacy delete,
which Store v1 and a PG with a member lacking tombstone support use.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u pg-epoch-rewrite-test:koolkhel-pg-epoch-rewrite-test
git checkout koolkhel-pg-epoch-rewrite-test
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#147
No description provided.