summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXuehan Xu <xuxuehan@qianxin.com>2024-12-05 06:17:55 +0100
committerMatan Breizman <mbreizma@redhat.com>2025-01-05 15:47:48 +0100
commit59377c6eb22f58358f12932b3c6a915de8550159 (patch)
tree8ce76bb5a0f1fb17f44b097b31beced4f956971d /src
parentMerge pull request #59593 from xxhdx1985126/wip-67888 (diff)
downloadceph-59377c6eb22f58358f12932b3c6a915de8550159.tar.xz
ceph-59377c6eb22f58358f12932b3c6a915de8550159.zip
crimson/osd/backfill_state: recheck whether needs to scan the primary at
the end of Enqueuing::Enqueuing Fixes: https://tracker.ceph.com/issues/69120 Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
Diffstat (limited to 'src')
-rw-r--r--src/crimson/osd/backfill_state.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/crimson/osd/backfill_state.cc b/src/crimson/osd/backfill_state.cc
index 1392ee330ac..ce8811c4ba2 100644
--- a/src/crimson/osd/backfill_state.cc
+++ b/src/crimson/osd/backfill_state.cc
@@ -380,16 +380,25 @@ BackfillState::Enqueuing::Enqueuing(my_context ctx)
}
} while (!all_emptied(primary_bi, backfill_state().peer_backfill_info));
- if (backfill_state().progress_tracker->tracked_objects_completed()
- && Enqueuing::all_enqueued(peering_state(),
- backfill_state().backfill_info,
- backfill_state().peer_backfill_info)) {
- backfill_state().last_backfill_started = hobject_t::get_max();
- backfill_listener().update_peers_last_backfill(hobject_t::get_max());
+ if (should_rescan_primary(backfill_state().peer_backfill_info,
+ primary_bi)) {
+ // need to grab one another chunk of the object namespace and restart
+ // the queueing.
+ DEBUGDPP("reached end for current local chunk", pg());
+ post_event(RequestPrimaryScanning{});
+ return;
+ } else {
+ if (backfill_state().progress_tracker->tracked_objects_completed()
+ && Enqueuing::all_enqueued(peering_state(),
+ backfill_state().backfill_info,
+ backfill_state().peer_backfill_info)) {
+ backfill_state().last_backfill_started = hobject_t::get_max();
+ backfill_listener().update_peers_last_backfill(hobject_t::get_max());
+ }
+ DEBUGDPP("reached end for both local and all peers "
+ "but still has in-flight operations", pg());
+ post_event(RequestWaiting{});
}
- DEBUGDPP("reached end for both local and all peers "
- "but still has in-flight operations", pg());
- post_event(RequestWaiting{});
}
// -- PrimaryScanning