]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: remove bogus completed_non_primary_snapshots_exist check 47117/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 9 Jul 2022 11:35:04 +0000 (13:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 15 Jul 2022 14:07:05 +0000 (16:07 +0200)
commit6357026abba61f77bb298564752870c406bf438e
tree86eaf808ef3d42f4b578790436a75c0ed7a61390
parentea8bb0811b91fb31d4fe40292ad62b421cf74889
rbd-mirror: remove bogus completed_non_primary_snapshots_exist check

This check was added in commit ecd3778a6f9a ("rbd-mirror: ensure that
the last non-primary snapshot cannot be pruned") as an additional
safeguard against pruning an incomplete non-primary snapshot in case
there is no predecessor mirror snapshot.  However it still fires if the
predecessor is there but happens to be a primary demotion snapshot.
A bogus "incomplete local non-primary snapshot" error is reported and
the replayer gets stuck.

Remove completed_non_primary_snapshots_exist tracking as the presence
of the predecessor in the incomplete non-primary snapshot pruning arm
is already ensured by "m_local_snap_id_start > 0" condition.

Fixes: https://tracker.ceph.com/issues/56516
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit a581509381ba84b49c906a1fe440ca3ddcab418c)
src/test/rbd_mirror/image_replayer/snapshot/test_mock_Replayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc