diff --git a/src/osd/PG.cc b/src/osd/PG.cc index d0783a6eed6..c8b02b0dbfd 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1857,12 +1857,6 @@ void PG::all_activated_and_committed() assert(!actingbackfill.empty()); assert(blocked_by.empty()); - // info.last_epoch_started is set during activate() - info.history.last_epoch_started = info.last_epoch_started; - state_clear(PG_STATE_CREATING); - - share_pg_info(); - queue_peering_event( CephPeeringEvtRef( new CephPeeringEvt( @@ -6510,9 +6504,17 @@ boost::statechart::result PG::RecoveryState::Active::react(const AllReplicasActi { PG *pg = context< RecoveryMachine >().pg; all_replicas_activated = true; + pg->state_clear(PG_STATE_ACTIVATING); + pg->state_clear(PG_STATE_CREATING); pg->state_set(PG_STATE_ACTIVE); + // info.last_epoch_started is set during activate() + pg->info.history.last_epoch_started = pg->info.last_epoch_started; + + pg->share_pg_info(); + pg->publish_stats_to_osd(); + pg->check_local(); // waiters