From: Kefu Chai Date: Wed, 20 May 2026 04:03:12 +0000 (+0800) Subject: crimson/osd: only unblock wait_for_active_blocker on replica when ACTIVE X-Git-Tag: v21.0.1~150^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F69020%2Fhead;p=ceph.git crimson/osd: only unblock wait_for_active_blocker on replica when ACTIVE ReplicaActive::react(ActivateCommitted) sets ACTIVE or PEERED before calling on_activate_committed(). Without a guard, an unconditional unblock() on the PEERED path resets the promise, causing ops that arrive afterward to park indefinitely (until the next on_change()). The primary already has this guard in on_activate_complete(); mirror it on the replica side. See-also: 2389c32d517e Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index bb7c20dfd99..231421cec4e 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -544,7 +544,11 @@ public: } Context *on_clean() final; void on_activate_committed() final { - if (!is_primary()) { + // As in on_activate_complete(): ActivateCommitted may have left + // the PG in PG_STATE_PEERED (acting_set_writeable() returned + // false) rather than PG_STATE_ACTIVE. Only unblock when we + // actually became ACTIVE. + if (!is_primary() && peering_state.is_active()) { wait_for_active_blocker.unblock(); } }