diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 07:37:15 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 07:46:42 -0700 |
commit | 944a431177564400f2fab1fed7d5ef7fe5066955 (patch) | |
tree | c28eaf853636518574033dd9f14eb800899cba2a | |
parent | 0c65ac6f4e79ee014a61c706dae5e5225cca1d7f (diff) | |
download | ceph-944a431177564400f2fab1fed7d5ef7fe5066955.tar.gz |
osd: fill in past intervals during advance_map
If ceph-osd is way behind, we will advance through past maps before we
mark ourselves up. This avoids the slow recalculation once we are up, and
the ensuing badness.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/PG.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index ef3a005de19..32aa25c80d3 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3835,6 +3835,11 @@ boost::statechart::result PG::RecoveryState::Reset::react(const AdvMap& advmap) { PG *pg = context< RecoveryMachine >().pg; dout(10) << "Reset advmap" << dendl; + + // make sure we have past_intervals filled in. hopefully this will happen + // _before_ we are active. + pg->generate_past_intervals(); + pg->remove_down_peer_info(advmap.osdmap); if (pg->acting_up_affected(advmap.newup, advmap.newacting)) { dout(10) << "up or acting affected, calling start_peering_interval again" |