}
pg.get_perf_logger().inc(l_osd_replica_read);
- if (pg.is_unreadable_object(m->get_hobj())) {
- DEBUGDPP("{}.{}: {} missing on replica, bouncing to primary",
- pg, *this, this_instance_id, m->get_hobj());
+ if (pg.is_missing_head_and_clones(m->get_hobj())) {
+ DEBUGDPP("{}.{}: {} possibly missing head or clone object on replica,"
+ " bouncing to primary",
+ pg, *this, this_instance_id, m->get_hobj());
pg.get_perf_logger().inc(l_osd_replica_read_redirect_missing);
co_await reply_op_error(pgref, -EAGAIN);
co_return;
}
}
+bool PG::is_missing_head_and_clones(const hobject_t &hoid) {
+ return peering_state.is_missing_any_head_or_clone_of(hoid);
+}
+
bool PG::can_discard_op(const MOSDOp& m) const {
if (m.get_map_epoch() <
peering_state.get_info().history.same_primary_since) {
!peering_state.get_missing_loc().readable_with_acting(
oid, get_actingset(), v);
}
+
+ // check if any head or clone of this object is missing
+ bool is_missing_head_and_clones(const hobject_t &hoid);
+
bool is_missing_on_peer(
const pg_shard_t &peer,
const hobject_t &soid) const {