From 74519276e059204eb344e7d47738e8c0bd7dfc6e Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Mon, 2 Feb 2026 16:41:51 +0000 Subject: [PATCH] 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 --- src/crimson/osd/osd_operations/pg_advance_map.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/osd_operations/pg_advance_map.cc b/src/crimson/osd/osd_operations/pg_advance_map.cc index e136e168ca8..b05662e801c 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); -- 2.47.3