diff options
author | Matan Breizman <mbreizma@redhat.com> | 2024-10-13 15:00:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-13 15:00:13 +0200 |
commit | 1316950ce1b4c4b653a586b07b23fbfd043b7a7f (patch) | |
tree | 9d5a8068666e7820c65b6f66b3b16b98d8584a95 /src/crimson | |
parent | Merge pull request #59853 from xxhdx1985126/wip-crimson-pg-purge-strays (diff) | |
parent | test/crimson/test_backfill: set BackfillState's log level to debug (diff) | |
download | ceph-1316950ce1b4c4b653a586b07b23fbfd043b7a7f.tar.xz ceph-1316950ce1b4c4b653a586b07b23fbfd043b7a7f.zip |
Merge pull request #59776 from xxhdx1985126/wip-68061
crimson/osd/backfill_state: always go to Enqueuing when object is pushed during Waiting
Reviewed-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'src/crimson')
-rw-r--r-- | src/crimson/osd/backfill_state.cc | 22 | ||||
-rw-r--r-- | src/crimson/osd/backfill_state.h | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/crimson/osd/backfill_state.cc b/src/crimson/osd/backfill_state.cc index 70c43f49faf..1db852da5cc 100644 --- a/src/crimson/osd/backfill_state.cc +++ b/src/crimson/osd/backfill_state.cc @@ -403,7 +403,7 @@ BackfillState::PrimaryScanning::react(ObjectPushed evt) { logger().debug("PrimaryScanning::react() on ObjectPushed; evt.object={}", evt.object); - backfill_state().progress_tracker->complete_to(evt.object, evt.stat); + backfill_state().progress_tracker->complete_to(evt.object, evt.stat, true); return discard_event(); } @@ -480,7 +480,7 @@ BackfillState::ReplicasScanning::react(ObjectPushed evt) { logger().debug("ReplicasScanning::react() on ObjectPushed; evt.object={}", evt.object); - backfill_state().progress_tracker->complete_to(evt.object, evt.stat); + backfill_state().progress_tracker->complete_to(evt.object, evt.stat, true); return discard_event(); } @@ -496,16 +496,8 @@ BackfillState::Waiting::react(ObjectPushed evt) { logger().debug("Waiting::react() on ObjectPushed; evt.object={}", evt.object); - backfill_state().progress_tracker->complete_to(evt.object, evt.stat); - if (!Enqueuing::all_enqueued(peering_state(), - backfill_state().backfill_info, - backfill_state().peer_backfill_info)) { - return transit<Enqueuing>(); - } else { - // we still have something to wait on - logger().debug("Waiting::react() on ObjectPushed; still waiting"); - return discard_event(); - } + backfill_state().progress_tracker->complete_to(evt.object, evt.stat, false); + return transit<Enqueuing>();; } // -- Done @@ -559,7 +551,8 @@ void BackfillState::ProgressTracker::enqueue_drop(const hobject_t& obj) void BackfillState::ProgressTracker::complete_to( const hobject_t& obj, - const pg_stat_t& stats) + const pg_stat_t& stats, + bool may_push_to_max) { logger().debug("{}: obj={}", __func__, obj); @@ -580,7 +573,8 @@ void BackfillState::ProgressTracker::complete_to( soid, *item.stats); } - if (Enqueuing::all_enqueued(peering_state(), + if (may_push_to_max && + Enqueuing::all_enqueued(peering_state(), backfill_state().backfill_info, backfill_state().peer_backfill_info) && tracked_objects_completed()) { diff --git a/src/crimson/osd/backfill_state.h b/src/crimson/osd/backfill_state.h index 6c36db81813..66ba2307f80 100644 --- a/src/crimson/osd/backfill_state.h +++ b/src/crimson/osd/backfill_state.h @@ -421,7 +421,7 @@ public: bool enqueue_push(const hobject_t&); void enqueue_drop(const hobject_t&); - void complete_to(const hobject_t&, const pg_stat_t&); + void complete_to(const hobject_t&, const pg_stat_t&, bool may_push_to_max); }; } // namespace crimson::osd |