]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: remove bogus completed_non_primary_snapshots_exist check 47035/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 9 Jul 2022 11:35:04 +0000 (13:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 10 Jul 2022 09:03:22 +0000 (11:03 +0200)
commita581509381ba84b49c906a1fe440ca3ddcab418c
tree63504d74849b7e07b70b9dde4aeffc33046fbc66
parent13aa47ae2ee89babca7571165ac88eaa665d2fc0
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>
src/test/rbd_mirror/image_replayer/snapshot/test_mock_Replayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc