Skip to content

Commit

Permalink
Merge pull request ceph#60438 from xxhdx1985126/wip-68661
Browse files Browse the repository at this point in the history
crimson/osd/pg: make sure ops are sent to backfill targets if and only if the object has been pushed.

Reviewed-by: Samuel Just <[email protected]>
  • Loading branch information
Matan-B authored Nov 3, 2024
2 parents c89ab2c + 314c153 commit 17e86d1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/crimson/osd/pg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1621,14 +1621,21 @@ bool PG::should_send_op(
return true;
bool should_send =
(hoid.pool != (int64_t)get_info().pgid.pool() ||
(has_backfill_state() && hoid <= get_last_backfill_started()) ||
hoid <= peering_state.get_peer_info(peer).last_backfill);
// An object has been fully pushed to the backfill target if and only if
// either of the following conditions is met:
// 1. peer_info.last_backfill has passed "hoid"
// 2. last_backfill_started has passed "hoid" and "hoid" is not in the peer
// missing set
hoid <= peering_state.get_peer_info(peer).last_backfill ||
(has_backfill_state() && hoid <= get_last_backfill_started() &&
!peering_state.get_peer_missing(peer).is_missing(hoid)));
if (!should_send) {
ceph_assert(is_backfill_target(peer));
logger().debug("{} issue_repop shipping empty opt to osd."
"{}, object {} beyond std::max(last_backfill_started, "
"peer_info[peer].last_backfill {})",
peer, hoid, peering_state.get_peer_info(peer).last_backfill);
__func__, peer, hoid,
peering_state.get_peer_info(peer).last_backfill);
}
return should_send;
// TODO: should consider async recovery cases in the future which are not supported
Expand Down

0 comments on commit 17e86d1

Please sign in to comment.