]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: remove bogus completed_non_primary_snapshots_exist check 47126/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 9 Jul 2022 11:35:04 +0000 (13:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Aug 2022 15:34:02 +0000 (17:34 +0200)
commit13848320c2d718d6e554e93f826834e8c85d274e
tree7b29eaf2274c9a48b2985c03649bc6fbd6cf7ef8
parenteae6db04ba08c0a6df64f8df98b161ad74184f14
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