From: Xuehan Xu Date: Thu, 19 Sep 2024 09:30:01 +0000 (+0800) Subject: crimson/osd/backfill_state: push peer pg infos' last_backfills only when X-Git-Tag: v20.0.0~858^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5d0f546807311d3fc37facd0b4acc98009a6271;p=ceph.git crimson/osd/backfill_state: push peer pg infos' last_backfills only when all objects before them are backfilled Fixes: https://tracker.ceph.com/issues/68147 Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/backfill_state.cc b/src/crimson/osd/backfill_state.cc index 70c43f49faf7..172c5e9cb0c1 100644 --- a/src/crimson/osd/backfill_state.cc +++ b/src/crimson/osd/backfill_state.cc @@ -570,6 +570,7 @@ void BackfillState::ProgressTracker::complete_to( } else { ceph_abort_msg("completing untracked object shall not happen"); } + auto new_last_backfill = peering_state().earliest_backfill(); for (auto it = std::begin(registry); it != std::end(registry) && it->second.stage != op_stage_t::enqueued_push; @@ -579,6 +580,8 @@ void BackfillState::ProgressTracker::complete_to( peering_state().update_complete_backfill_object_stats( soid, *item.stats); + assert(soid > new_last_backfill); + new_last_backfill = soid; } if (Enqueuing::all_enqueued(peering_state(), backfill_state().backfill_info, @@ -587,7 +590,7 @@ void BackfillState::ProgressTracker::complete_to( backfill_state().last_backfill_started = hobject_t::get_max(); backfill_listener().update_peers_last_backfill(hobject_t::get_max()); } else { - backfill_listener().update_peers_last_backfill(obj); + backfill_listener().update_peers_last_backfill(new_last_backfill); } }