From: Aishwarya Mathuria Date: Fri, 1 Aug 2025 10:06:19 +0000 (+0000) Subject: crimson/osd/pg: discard ops in case of split X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=769f5e1f4f9b51c87de8da0f0fccf8622352719c;p=ceph.git crimson/osd/pg: discard ops in case of split Clients will take care of re-sending the ops. We can discard it here. Signed-off-by: Aishwarya Mathuria --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index f85ee660abb..c7ae18d2f25 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1617,6 +1617,15 @@ bool PG::can_discard_op(const MOSDOp& m) const { // (us). return true; } + + // Note: the Objecter will resend on pg split + // hence we can discard ops here. + // Refer: https://github.com/ceph/ceph/pull/13235 + if (m.get_map_epoch() < peering_state.get_info().history.last_epoch_split) { + logger().debug("{} pg split in {} dropping!", __func__, + peering_state.get_info().history.last_epoch_split); + return true; + } return __builtin_expect(m.get_map_epoch() < peering_state.get_info().history.same_primary_since, false); }