osd: Move the PG epoch only when reporting it for the first modification #219

Merged
vitalif merged 1 commits from koolkhel/vitastor:peering-flush-stale-release into master 2026-12-02 13:11:30 +03:00

1 Commits

Author SHA1 Message Date
e30b0dafd5 osd: Move the PG epoch only when reporting it for the first modification
A history report that only changes next_scrub or clears the history
(plan_scrub, the end of a scrub, the cleanup of a clean or left_on_dead
PG) also wrote pg.epoch and set reporting_epoch to it. If the PG
re-peered before that report landed, the new peering took the same
epoch, report_epoch() saw it as already being reported, and the old
report, without the new peering's OSD sets, released its flush. The
flush then stabilized versions whose holders were not in the history.

Only report_epoch(), which runs before the first write or flush of an
epoch, now writes the new epoch and moves reporting_epoch. Other history
updates keep the epoch etcd already has, or the one being reported.
2026-12-02 12:11:23 +03:00