Merge pull request #60313 from xxhdx1985126/wip-68541

crimson/osd/pg: trigger PG::wait_for_active_blocker only when the pg is going active

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
Matan Breizman 2024-11-03 16:32:39 +02:00 committed by GitHub
commit b98ebf78e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -392,7 +392,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",