diff options
author | Sage Weil <sage@newdream.net> | 2012-04-27 16:01:43 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 07:46:42 -0700 |
commit | 0c6914039cf818d9336b7db9f313bf71b1096c46 (patch) | |
tree | 96614e40fa83917c38c74a963ce403d471c07347 | |
parent | db8e20b211d62b3be04caff08ff04b319b01452c (diff) | |
download | ceph-0c6914039cf818d9336b7db9f313bf71b1096c46.tar.gz |
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 <sage@newdream.net>
-rw-r--r-- | src/osd/PG.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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; |