From: Sage Weil Date: Thu, 2 Feb 2017 03:59:31 +0000 (-0500) Subject: osd/PG: discard ops from before the last split X-Git-Tag: v12.0.1~383^2~29 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=36d3a29ef570e51dc948936d9717f9791a070c10;p=ceph-ci.git osd/PG: discard ops from before the last split New clients will resend. Old clients will see a last_force_op_resend (now named last_force_op_resend_preluminous in latest code) and resend. We know this because we require that the monitors upgrade to luminous before the OSDs, and the new mon code sets this field on split. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c0d88fdcba6..ee092b61d25 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5474,6 +5474,11 @@ bool PG::can_discard_op(OpRequestRef& op) << pool.info.last_force_op_resend << ", dropping" << *m << dendl; return true; } + if (m->get_map_epoch() < info.history.last_epoch_split) { + dout(7) << __func__ << " pg split in " + << info.history.last_epoch_split << ", dropping" << dendl; + return true; + } } else if (m->get_connection()->has_feature(CEPH_FEATURE_OSD_POOLRESEND)) { if (m->get_map_epoch() < pool.info.get_last_force_op_resend_preluminous()) { dout(7) << __func__ << " sent before last_force_op_resend_preluminous "