]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: only unblock wait_for_active_blocker on replica when ACTIVE 69020/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 20 May 2026 04:03:12 +0000 (12:03 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 20 May 2026 11:37:04 +0000 (19:37 +0800)
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 <k.chai@proxmox.com>
src/crimson/osd/pg.h

index bb7c20dfd99f62b51da16a6f3302e094f9678f7a..231421cec4ef4acaf55c6464a3e8541e44043945 100644 (file)
@@ -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();
     }
   }