]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: base past_interval_bounds on pool creation epoch 14989/head
authorSage Weil <sage@redhat.com>
Mon, 8 May 2017 02:47:47 +0000 (22:47 -0400)
committerSage Weil <sage@redhat.com>
Mon, 8 May 2017 02:47:47 +0000 (22:47 -0400)
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 <sage@redhat.com>
src/osd/PG.h

index 8397959f587e2ed7f9d009499497cd233d67bc11..260404dc18e6013415f44dd3f0321e96c0384443 100644 (file)
@@ -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;