discard op in the case where same_primary_since is later than
the MOSDOp's map epoch
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit
c6ab21791545598473bd044ce602eea2bba892d3)
}
bool PG::can_discard_op(const MOSDOp& m) const {
+ if (m.get_map_epoch() <
+ peering_state.get_info().history.same_primary_since) {
+ logger().debug("{} changed after {} dropping {} ",
+ __func__ , m.get_map_epoch(), m);
+ return true;
+ }
+
if ((m.get_flags() & (CEPH_OSD_FLAG_BALANCE_READS |
CEPH_OSD_FLAG_LOCALIZE_READS))
&& !is_primary()