]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: remove bogus completed_non_primary_snapshots_exist check 47118/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:08:10 +0000 (16:08 +0200)
commit00b04b5352e06b3a12cec539da34812970e033c1
treed9c1de7594af2bd2dcd46cc0b38c125342bb820f
parent78fd88cb538e9103e7df350e28f8d8836bc4b681
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