From: Sage Weil Date: Mon, 8 May 2017 02:47:47 +0000 (-0400) Subject: osd/PG: base past_interval_bounds on pool creation epoch X-Git-Tag: v12.1.0~10^2~107^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bd912d2c57adfd3caf211205e4443187cd81e879;p=ceph.git osd/PG: base past_interval_bounds on pool creation epoch The base case for the past_intervals bounds is the creation epoch for the pool, not the PG. Otherwise, a pool that is created, does not go active, and then splits will not include the pre-split history. For example, - pg A is created in epoch X - pg A does not go active - pg A splits into pg B in epoch Y but then, - pg B has past intervals from [X,Y) - pg B epoch_created is Y *** - pg B required past intervals is [Y,Y) - fails check_past_interval_bounds check Fixes: http://tracker.ceph.com/issues/19877 Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.h b/src/osd/PG.h index 8397959f587e..260404dc18e6 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -975,11 +975,11 @@ public: epoch_t oldest_map) { epoch_t start = MAX( info.history.last_epoch_clean ? info.history.last_epoch_clean : - info.history.epoch_created, + info.history.epoch_pool_created, oldest_map); epoch_t end = MAX( info.history.same_interval_since, - info.history.epoch_created); + info.history.epoch_pool_created); return make_pair(start, end); } void check_past_interval_bounds() const;