]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: group-replayer check for remote demote state
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 20 Mar 2025 05:44:48 +0000 (11:14 +0530)
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 24 Apr 2025 15:56:35 +0000 (21:26 +0530)
commit0bf8b5ef4494c5f91bb29b903ae70641921a2deb
tree87b34acbfe53046d7b58506dcc607ee637da6b81
parentadd81a538bd8564e7ee890e42ca05f46e0b7cd67
rbd-mirror: group-replayer check for remote demote state

I'm seeing a possibility for 3 situations here for resync flagging and
rbd-mirror daemon working on it:

1. No Demotion on Primary while/just-before resync is play'ed
    there is no demote snap along side resync, we can cancel syncing other
    snaps, and start resync as soon as resync is flagged, because there is
    no point syncing snaps that we are anyway going to delete the whole
    group and resync fresh.

2. first Demote + immediately Resync
    demote came first, this mean before proceeding with resync, we should
    always see if the last remote snap is PRIMARY (validate if the remote
    is still primary, which is on point) and only proceed

3. first Resync + immediately Demote
    resync Came first, so we head straight to resync.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
src/tools/rbd_mirror/group_replayer/Replayer.cc