From: Sage Weil Date: Fri, 27 Apr 2012 23:01:43 +0000 (-0700) Subject: osd: only generate missing intervals in generate_past_intervals X-Git-Tag: v0.47~80^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c6914039cf818d9336b7db9f313bf71b1096c46;p=ceph.git osd: only generate missing intervals in generate_past_intervals We can (currently) get into a situation where we don't have the full history back to last_epoch_clean because non-primaries record past intervals but don't initially have the full history, resulting in a partial recent history. If this happens, only fill in what's missing; no need to rebuild the recent parts too. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 549f0434402..7c758453f69 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -698,8 +698,8 @@ void PG::generate_past_intervals() << stop << dendl; return; } - dout(10) << __func__ << " only have past intervals back to " << pif->first << ", recalculating" << dendl; - past_intervals.clear(); + dout(10) << __func__ << " only have past intervals back to " << pif->first << dendl; + last_epoch = pif->first - 1; } dout(10) << __func__ << " over epochs " << stop << "-" << last_epoch << dendl;