From: Sage Weil Date: Thu, 2 Feb 2017 20:07:48 +0000 (-0500) Subject: osd/PG: fix tracking of last_epoch_split X-Git-Tag: v12.0.1~383^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e9cfeedb5dfd63e4a8cbfda7ed8b8bb953fc2668;p=ceph.git osd/PG: fix tracking of last_epoch_split 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index ee092b61d2514..03dc1c3152de2 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(); + } } }