mirror of
https://github.com/ceph/ceph
synced 2025-01-31 23:44:10 +00:00
osd/PG: do not publish_stats_to_osd in state exit() methods
exit() can happen due to AdvMap and a peering interval change, but it runs before we have updated any of our internal state about whether we are the primary, whether our pool is deleted and the pg no longer exists, and so on. The publish depends on (1) being primary, and (2) will crash if the pool is gone from the OSDMap. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b0874dca54
commit
5668dee0d0
@ -8125,7 +8125,6 @@ void PG::RecoveryState::GetInfo::exit()
|
||||
utime_t dur = ceph_clock_now() - enter_time;
|
||||
pg->osd->recoverystate_perf->tinc(rs_getinfo_latency, dur);
|
||||
pg->blocked_by.clear();
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
/*------GetLog------------*/
|
||||
@ -8260,7 +8259,6 @@ void PG::RecoveryState::GetLog::exit()
|
||||
utime_t dur = ceph_clock_now() - enter_time;
|
||||
pg->osd->recoverystate_perf->tinc(rs_getlog_latency, dur);
|
||||
pg->blocked_by.clear();
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
/*------WaitActingChange--------*/
|
||||
@ -8353,7 +8351,6 @@ void PG::RecoveryState::Down::exit()
|
||||
pg->osd->recoverystate_perf->tinc(rs_down_latency, dur);
|
||||
|
||||
pg->blocked_by.clear();
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
boost::statechart::result PG::RecoveryState::Down::react(const QueryState& q)
|
||||
@ -8431,7 +8428,6 @@ void PG::RecoveryState::Incomplete::exit()
|
||||
pg->osd->recoverystate_perf->tinc(rs_incomplete_latency, dur);
|
||||
|
||||
pg->blocked_by.clear();
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
/*------GetMissing--------*/
|
||||
@ -8576,7 +8572,6 @@ void PG::RecoveryState::GetMissing::exit()
|
||||
utime_t dur = ceph_clock_now() - enter_time;
|
||||
pg->osd->recoverystate_perf->tinc(rs_getmissing_latency, dur);
|
||||
pg->blocked_by.clear();
|
||||
pg->publish_stats_to_osd();
|
||||
}
|
||||
|
||||
/*------WaitUpThru--------*/
|
||||
|
Loading…
Reference in New Issue
Block a user