]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: trigger PG::wait_for_active_blocker only when the pg is 60313/head
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 15 Oct 2024 05:59:50 +0000 (13:59 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Wed, 16 Oct 2024 07:08:18 +0000 (15:08 +0800)
going active

Fixes: https://tracker.ceph.com/issues/68541
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/pg.cc

index 97d48c1fa454c1d93438c0f7de83ff9a21a77369..d17577792be9d40bc33ec8c8fd2db361eb08680a 100644 (file)
@@ -389,7 +389,13 @@ void PG::on_replica_activate()
 
 void PG::on_activate_complete()
 {
-  wait_for_active_blocker.unblock();
+  /* Confusingly, on_activate_complete is invoked when the primary and replicas
+   * have recorded the current interval.  At that point, the PG may either become
+   * ACTIVE or PEERED, depending on whether the acting set is eligible for client
+   * IO.  Only unblock wait_for_active_blocker if we actually became ACTIVE */
+  if (peering_state.is_active()) {
+    wait_for_active_blocker.unblock();
+  }
 
   if (peering_state.needs_recovery()) {
     logger().info("{}: requesting recovery",