summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/shard_services.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/crimson/osd/shard_services.cc')
-rw-r--r--src/crimson/osd/shard_services.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc
index a053d9d5044..e1acb34636f 100644
--- a/src/crimson/osd/shard_services.cc
+++ b/src/crimson/osd/shard_services.cc
@@ -783,6 +783,11 @@ seastar::future<> ShardServices::dispatch_context_transaction(
co_return;
}
+Ref<PG> ShardServices::get_pg(spg_t pgid)
+{
+ return local_state.get_pg(pgid);
+}
+
seastar::future<> ShardServices::dispatch_context_messages(
BufferedRecoveryMessages &&ctx)
{
@@ -802,15 +807,19 @@ seastar::future<> ShardServices::dispatch_context_messages(
seastar::future<> ShardServices::dispatch_context(
crimson::os::CollectionRef col,
- PeeringCtx &&ctx)
-{
- ceph_assert(col || ctx.transaction.empty());
- return seastar::when_all_succeed(
- dispatch_context_messages(
- BufferedRecoveryMessages{ctx}),
- col ? dispatch_context_transaction(col, ctx) : seastar::now()
- ).then_unpack([] {
- return seastar::now();
+ PeeringCtx &&pctx)
+{
+ return seastar::do_with(
+ std::move(pctx),
+ [this, col](auto &ctx) {
+ ceph_assert(col || ctx.transaction.empty());
+ return seastar::when_all_succeed(
+ dispatch_context_messages(
+ BufferedRecoveryMessages{ctx}),
+ col ? dispatch_context_transaction(col, ctx) : seastar::now()
+ ).then_unpack([] {
+ return seastar::now();
+ });
});
}