]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: fix PG splitting logic during map gaps
authorAishwarya Mathuria <amathuri@redhat.com>
Mon, 2 Feb 2026 16:41:51 +0000 (16:41 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Mon, 23 Feb 2026 11:04:32 +0000 (11:04 +0000)
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 <amathuri@redhat.com>
src/crimson/osd/osd_operations/pg_advance_map.cc

index e136e168ca821bc698cd335167ef82bfc5cf5858..b05662e801ce2cffc2ba4d24e1dfe99b3e0a2df0 100644 (file)
@@ -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);