]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: only generate missing intervals in generate_past_intervals
authorSage Weil <sage@newdream.net>
Fri, 27 Apr 2012 23:01:43 +0000 (16:01 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 28 Apr 2012 14:46:42 +0000 (07:46 -0700)
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>
src/osd/PG.cc

index 549f0434402ffd47c4740105d6f6069b7f08eb44..7c758453f698922bf0e1f93b183bb213818da110 100644 (file)
@@ -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;