]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: discard ops from before the last split
authorSage Weil <sage@redhat.com>
Thu, 2 Feb 2017 03:59:31 +0000 (22:59 -0500)
committerSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 04:03:49 +0000 (23:03 -0500)
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 <sage@redhat.com>
src/osd/PG.cc

index c0d88fdcba600da1614e684eb3e54942f2c32840..ee092b61d2514e5ca006f56fce643c6979a222d6 100644 (file)
@@ -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 "