}
}
-template <typename MsgType>
-bool PG::can_discard_replica_op(const MsgType& m) const
+bool PG::can_discard_replica_op(const Message& m, epoch_t m_map_epoch) const
{
// if a repop is replied after a replica goes down in a new osdmap, and
// before the pg advances to this new osdmap, the repop replies before this
// sent by replicas not in the acting set, since
// if such a replica goes down it does not cause
// a new interval.
- if (osdmap->get_down_at(from_osd) >= m.map_epoch) {
+ if (osdmap->get_down_at(from_osd) >= m_map_epoch) {
return true;
}
// same pg?
// if pg changes *at all*, we reset and repeer!
if (epoch_t lpr = peering_state.get_last_peering_reset();
- lpr > m.map_epoch) {
+ lpr > m_map_epoch) {
logger().debug("{}: pg changed {} after {}, dropping",
- __func__, get_info().history, m.map_epoch);
+ __func__, get_info().history, m_map_epoch);
return true;
}
return false;
return seastar::now();
}
+ template <typename MsgType>
+ bool can_discard_replica_op(const MsgType& m) const {
+ return can_discard_replica_op(m, m.map_epoch);
+ }
+
private:
// instead of seastar::gate, we use a boolean flag to indicate
// whether the system is shutting down, as we don't need to track
return seastar::make_ready_future<bool>(true);
}
- template <typename MsgType>
- bool can_discard_replica_op(const MsgType& m) const;
+ bool can_discard_replica_op(const Message& m, epoch_t m_map_epoch) const;
bool can_discard_op(const MOSDOp& m) const;
bool is_missing_object(const hobject_t& soid) const {
return peering_state.get_pg_log().get_missing().get_items().count(soid);