]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/backfill_state: push peer pg infos' last_backfills only when 59878/head
authorXuehan Xu <xuxuehan@qianxin.com>
Thu, 19 Sep 2024 09:30:01 +0000 (17:30 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Thu, 19 Sep 2024 09:33:52 +0000 (17:33 +0800)
all objects before them are backfilled

Fixes: https://tracker.ceph.com/issues/68147
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/backfill_state.cc

index 70c43f49faf72ff9eba5fecd64a4db784305d2be..172c5e9cb0c1fe1ab40beed189adbfc0c169fa4c 100644 (file)
@@ -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);
   }
 }