]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: fix tracking of last_epoch_split
authorSage Weil <sage@redhat.com>
Thu, 2 Feb 2017 20:07:48 +0000 (15:07 -0500)
committerSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 04:03:49 +0000 (23:03 -0500)
Note that it is only (currently) important that this value be accurate
on the current OSD since we only use this value (currently) to discard
ops sent before the split.  If we are getting the history from a different
OSD in the cluster that doesn't have an up to date value it doesn't matter
because that implies a primary change and also a client resend.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index ee092b61d2514e5ca006f56fce643c6979a222d6..03dc1c3152de220c149f73550f67acd8d2d3e295 100644 (file)
@@ -5211,6 +5211,11 @@ void PG::start_peering_interval(
       dirty_info = true;
       dirty_big_info = true;
       info.history.same_interval_since = osdmap->get_epoch();
+      if (info.pgid.pgid.is_split(lastmap->get_pg_num(info.pgid.pgid.pool()),
+                                 osdmap->get_pg_num(info.pgid.pgid.pool()),
+                                 nullptr)) {
+       info.history.last_epoch_split = osdmap->get_epoch();
+      }
     }
   }