Skip to content

Commit

Permalink
crimson/osd/pg: trigger PG::wait_for_active_blocker only when the pg is
Browse files Browse the repository at this point in the history
going active

Fixes: https://tracker.ceph.com/issues/68541
Signed-off-by: Xuehan Xu <[email protected]>
  • Loading branch information
xxhdx1985126 committed Oct 16, 2024
1 parent 7e7aac1 commit 11e3eca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/crimson/osd/pg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 11e3eca

Please sign in to comment.