From 0c6914039cf818d9336b7db9f313bf71b1096c46 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 27 Apr 2012 16:01:43 -0700 Subject: [PATCH] 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 --- src/osd/PG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 549f0434402ff..7c758453f6989 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; -- 2.39.5