]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd/shard_services: Add function create_split_pg_mapping for PG splitting
authorAishwarya Mathuria <amathuri@redhat.com>
Wed, 19 Mar 2025 10:25:47 +0000 (10:25 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Thu, 22 May 2025 06:20:38 +0000 (06:20 +0000)
commit7124a44d84d6f92bf8ca8bac780c44cc09ad9fa7
tree650d182c454e3975d7e0032db653c11b608d1942
parent2f4197e31e22d65faf7a83743db0f689af62ad54
crimson/osd/shard_services: Add function create_split_pg_mapping for PG splitting

Previously, get_or_create_pg_mapping was used to assign a new child PG to a specific core. When a peering operation occurred, it determined the core responsible for the PG and forwarded the operation there using get_or_create_pg_mapping.

However, earlier changes did not ensure that the split child PG creation logic ran on the same core to which it was mapped. This led to an issue where PGMap::pg_created could be updated on shard 0, while the child PG was actually mapped to shard 1. When a peering operation for the new PG arrived, it was forwarded to shard 1. Since the PG had been created on shard 0, shard 1 had no record of it and attempted to create it again. This resulted in an assertion failure in BlueStore due to an attempt to create a collection for an already existing PG.

This commit adds a function create_split_pg_mapping that will resolve the issue by ensuring that child PG creation always occurs on the core to which the PG is mapped.

Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
src/crimson/osd/shard_services.h