From: Aishwarya Mathuria Date: Mon, 2 Feb 2026 16:41:51 +0000 (+0000) Subject: crimson/osd: fix PG splitting logic during map gaps X-Git-Tag: v21.0.0~146^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f6ecea5736b0adab3b77ca028b57eb987364f9f;p=ceph.git crimson/osd: fix PG splitting logic during map gaps When the OSD advances through a range of maps (map gap), it must ensure that every epoch transition is evaluated for potential PG splits. This patch updates the split check to use the current OSDMap epoch from the PG as the baseline for each step. This guarantees that splits are checked consecutively for every map in the sequence, preventing intermediate splits from being missed during map gap. Fixes: https://tracker.ceph.com/issues/74504 Signed-off-by: Aishwarya Mathuria --- diff --git a/src/crimson/osd/osd_operations/pg_advance_map.cc b/src/crimson/osd/osd_operations/pg_advance_map.cc index e136e168ca82..b05662e801ce 100644 --- a/src/crimson/osd/osd_operations/pg_advance_map.cc +++ b/src/crimson/osd/osd_operations/pg_advance_map.cc @@ -96,8 +96,12 @@ seastar::future<> PGAdvanceMap::start() [this, FNAME] (cached_map_t&& next_map) { DEBUG("{}: advancing map to {}", *this, next_map->get_epoch()); - pg->handle_advance_map(next_map, rctx); - return check_for_splits(*from, next_map); + // Use the current OSDMap epoch to check for splits consecutively. + epoch_t current_epoch = pg->get_osdmap_epoch(); + pg->handle_advance_map(next_map, rctx); + DEBUG("{}: checking for splits between {} and {}", + *this, current_epoch, next_map->get_epoch()); + return check_for_splits(current_epoch, next_map); }); }).then([this, FNAME] { pg->handle_activate_map(rctx);