From: Aishwarya Mathuria Date: Mon, 23 Feb 2026 10:37:46 +0000 (+0530) Subject: Use sequential loop in splitting X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9595c132da0c00f398d2564840d97e0f6cab49a2;p=ceph-ci.git Use sequential loop in splitting 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 b05662e801c..4d7f4b0c01d 100644 --- a/src/crimson/osd/osd_operations/pg_advance_map.cc +++ b/src/crimson/osd/osd_operations/pg_advance_map.cc @@ -167,8 +167,7 @@ seastar::future<> PGAdvanceMap::split_pg( unsigned new_pg_num = next_map->get_pg_num(pg->get_pgid().pool()); pg->update_snap_mapper_bits(pg->get_pgid().get_split_bits(new_pg_num)); - co_await seastar::coroutine::parallel_for_each(split_children, [this, &next_map, - pg_epoch, FNAME] (auto child_pgid) -> seastar::future<> { + for (auto child_pgid : split_children) { children_pgids.insert(child_pgid); // Map each child pg ID to a core @@ -181,8 +180,6 @@ seastar::future<> PGAdvanceMap::split_pg( DEBUG(" Parent pgid: {}", pg->get_pgid()); DEBUG(" Child pgid: {}", child_pg->get_pgid()); unsigned new_pg_num = next_map->get_pg_num(pg->get_pgid().pool()); - // Depending on the new_pg_num the parent PG's collection is split. - // The child PG will be initiated with this split collection. unsigned split_bits = child_pg->get_pgid().get_split_bits(new_pg_num); DEBUG(" pg num is {}, m_seed is {}, split bits is {}", new_pg_num, child_pg->get_pgid().ps(), split_bits); @@ -190,15 +187,13 @@ seastar::future<> PGAdvanceMap::split_pg( co_await pg->split_colls(child_pg->get_pgid(), split_bits, child_pg->get_pgid().ps(), &child_pg->get_pgpool().info, rctx.transaction); DEBUG(" {} split collection done", child_pg->get_pgid()); - // Update the child PG's info from the parent PG pg->split_into(child_pg->get_pgid().pgid, child_pg, split_bits); - // Make SnapMapper OID for the child PG auto child_coll_ref = child_pg->get_collection_ref(); rctx.transaction.touch(child_coll_ref->get_cid(), child_pg->get_pgid().make_snapmapper_oid()); co_await handle_split_pg_creation(child_pg, next_map); split_pgs.insert(child_pg); - }); + } split_stats(split_pgs, children_pgids); co_return;