]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: prune obsolete primary mirror snapshots after relocation 68161/head
authorMiki Patel <miki.patel132@gmail.com>
Sun, 19 Apr 2026 06:29:40 +0000 (11:59 +0530)
committerSuper User <root@li-4c4c4544-0051-4710-8053-c6c04f423534.ibm.com>
Wed, 17 Jun 2026 10:47:27 +0000 (16:17 +0530)
commita10f58df8cb95deae899f35562bd024ad0c2bae9
tree58c17cf24bd7885a8acba0426bbb793747cfe311
parente98037a639cec14dd9d70b9938b961da0df18cd2
rbd-mirror: prune obsolete primary mirror snapshots after relocation

Previously, obsolete primary and demoted primary snapshots on the
secondary cluster were not cleaned up immediately after relocation.
Instead, old primary snapshots remained until a subsequent promote
operation triggered their cleanup, while old demoted primary snapshots
persisted until a later demote operation removed them.

Adding changes for proactive cleanup of obsolete primary and demoted
primary snapshots that are no longer required after relocation.

Also adding test coverage to validate the cleanup behavior.

Fixes: https://tracker.ceph.com/issues/76154
Signed-off-by: Miki Patel <miki.patel132@gmail.com>
13 files changed:
qa/workunits/rbd/rbd_mirror.sh
qa/workunits/rbd/rbd_mirror_helpers.sh
src/test/rbd_mirror/image_replayer/snapshot/test_mock_Replayer.cc
src/test/rbd_mirror/test_mock_ImageReplayer.cc
src/tools/rbd_mirror/ImageReplayer.cc
src/tools/rbd_mirror/Types.h
src/tools/rbd_mirror/image_replayer/StateBuilder.h
src/tools/rbd_mirror/image_replayer/journal/StateBuilder.cc
src/tools/rbd_mirror/image_replayer/journal/StateBuilder.h
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.h
src/tools/rbd_mirror/image_replayer/snapshot/StateBuilder.cc
src/tools/rbd_mirror/image_replayer/snapshot/StateBuilder.h