For every split child PG being created, make an entry in the wait_for_pg map using
a PGCreationBlockingEvent trigger.
This change ensures that even split PGs are part of the pgs_creating map that tracks
PGCreationState of a PG by the addition of the create_split_pg method.
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
return local_state.pg_map.wait_for_pg(std::move(trigger), pgid).first;
}
+ShardServices::wait_for_pg_ret
+ShardServices::create_split_pg(
+ PGMap::PGCreationBlockingEvent::TriggerI&& trigger,
+ spg_t pgid)
+{
+ auto fut = local_state.pg_map.wait_for_pg(
+ std::move(trigger), pgid).first;
+ local_state.pg_map.set_creating(pgid);
+ return fut;
+}
+
seastar::future<Ref<PG>> ShardServices::load_pg(spg_t pgid)
{
using wait_for_pg_ret = wait_for_pg_ertr::future<Ref<PG>>;
wait_for_pg_ret wait_for_pg(
PGMap::PGCreationBlockingEvent::TriggerI&&, spg_t pgid);
+ wait_for_pg_ret create_split_pg(
+ PGMap::PGCreationBlockingEvent::TriggerI&& trigger,
+ spg_t pgid);
+
seastar::future<Ref<PG>> load_pg(spg_t pgid);
/// Dispatch and reset ctx transaction