Skip to content

Commit 17e86d1

Browse files
authored
Merge pull request ceph#60438 from xxhdx1985126/wip-68661
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]>
2 parents c89ab2c + 314c153 commit 17e86d1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/crimson/osd/pg.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,14 +1621,21 @@ bool PG::should_send_op(
16211621
return true;
16221622
bool should_send =
16231623
(hoid.pool != (int64_t)get_info().pgid.pool() ||
1624-
(has_backfill_state() && hoid <= get_last_backfill_started()) ||
1625-
hoid <= peering_state.get_peer_info(peer).last_backfill);
1624+
// An object has been fully pushed to the backfill target if and only if
1625+
// either of the following conditions is met:
1626+
// 1. peer_info.last_backfill has passed "hoid"
1627+
// 2. last_backfill_started has passed "hoid" and "hoid" is not in the peer
1628+
// missing set
1629+
hoid <= peering_state.get_peer_info(peer).last_backfill ||
1630+
(has_backfill_state() && hoid <= get_last_backfill_started() &&
1631+
!peering_state.get_peer_missing(peer).is_missing(hoid)));
16261632
if (!should_send) {
16271633
ceph_assert(is_backfill_target(peer));
16281634
logger().debug("{} issue_repop shipping empty opt to osd."
16291635
"{}, object {} beyond std::max(last_backfill_started, "
16301636
"peer_info[peer].last_backfill {})",
1631-
peer, hoid, peering_state.get_peer_info(peer).last_backfill);
1637+
__func__, peer, hoid,
1638+
peering_state.get_peer_info(peer).last_backfill);
16321639
}
16331640
return should_send;
16341641
// TODO: should consider async recovery cases in the future which are not supported

0 commit comments

Comments
 (0)