@@ -380,16 +380,25 @@ BackfillState::Enqueuing::Enqueuing(my_context ctx)
380380 }
381381 } while (!all_emptied (primary_bi, backfill_state ().peer_backfill_info ));
382382
383- if (backfill_state ().progress_tracker ->tracked_objects_completed ()
384- && Enqueuing::all_enqueued (peering_state (),
385- backfill_state ().backfill_info ,
386- backfill_state ().peer_backfill_info )) {
387- backfill_state ().last_backfill_started = hobject_t::get_max ();
388- backfill_listener ().update_peers_last_backfill (hobject_t::get_max ());
383+ if (should_rescan_primary (backfill_state ().peer_backfill_info ,
384+ primary_bi)) {
385+ // need to grab one another chunk of the object namespace and restart
386+ // the queueing.
387+ DEBUGDPP (" reached end for current local chunk" , pg ());
388+ post_event (RequestPrimaryScanning{});
389+ return ;
390+ } else {
391+ if (backfill_state ().progress_tracker ->tracked_objects_completed ()
392+ && Enqueuing::all_enqueued (peering_state (),
393+ backfill_state ().backfill_info ,
394+ backfill_state ().peer_backfill_info )) {
395+ backfill_state ().last_backfill_started = hobject_t::get_max ();
396+ backfill_listener ().update_peers_last_backfill (hobject_t::get_max ());
397+ }
398+ DEBUGDPP (" reached end for both local and all peers "
399+ " but still has in-flight operations" , pg ());
400+ post_event (RequestWaiting{});
389401 }
390- DEBUGDPP (" reached end for both local and all peers "
391- " but still has in-flight operations" , pg ());
392- post_event (RequestWaiting{});
393402}
394403
395404// -- PrimaryScanning
0 commit comments