diff options
author | Matan Breizman <mbreizma@redhat.com> | 2025-01-12 08:54:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-12 08:54:39 +0100 |
commit | eb5422801884a11ff80dccebbc53f472daf13c34 (patch) | |
tree | e67184d6e09765573fad0e547746d2594c2c7304 | |
parent | Merge pull request #60803 from xxhdx1985126/wip-69027 (diff) | |
parent | crimson/osd/backfill_state: recheck whether needs to scan the primary at (diff) | |
download | ceph-eb5422801884a11ff80dccebbc53f472daf13c34.tar.xz ceph-eb5422801884a11ff80dccebbc53f472daf13c34.zip |
Merge pull request #60958 from xxhdx1985126/wip-69120
crimson/osd/backfill_state: recheck whether needs to scan the primary at the end of Enqueuing::Enqueuing
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
-rw-r--r-- | src/crimson/osd/backfill_state.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/crimson/osd/backfill_state.cc b/src/crimson/osd/backfill_state.cc index ca6a543151a..f957f072c93 100644 --- a/src/crimson/osd/backfill_state.cc +++ b/src/crimson/osd/backfill_state.cc @@ -381,16 +381,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 |