mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
Merge pull request #44290 from liu-chunmei/crimson-fix-no-pg
crimson/osd: fix interruptor assert when no pg in peering_event Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
b275acde3e
@ -62,13 +62,13 @@ seastar::future<> PeeringEvent::start()
|
||||
return maybe_delay.then([this] {
|
||||
return get_pg();
|
||||
}).then([this](Ref<PG> pg) {
|
||||
if (!pg) {
|
||||
logger().warn("{}: pg absent, did not create", *this);
|
||||
on_pg_absent();
|
||||
handle.exit();
|
||||
return complete_rctx_no_pg();
|
||||
}
|
||||
return interruptor::with_interruption([this, pg] {
|
||||
if (!pg) {
|
||||
logger().warn("{}: pg absent, did not create", *this);
|
||||
on_pg_absent();
|
||||
handle.exit();
|
||||
return complete_rctx(pg);
|
||||
}
|
||||
logger().debug("{}: pg present", *this);
|
||||
return with_blocking_future_interruptible<interruptor::condition>(
|
||||
handle.enter(pp(*pg).await_map)
|
||||
@ -165,6 +165,15 @@ PeeringEvent::interruptible_future<> RemotePeeringEvent::complete_rctx(Ref<PG> p
|
||||
}
|
||||
}
|
||||
|
||||
seastar::future<> RemotePeeringEvent::complete_rctx_no_pg()
|
||||
{
|
||||
logger().debug("{}: OSDState is {}", *this, osd.state);
|
||||
return osd.state.when_active().then([this] {
|
||||
assert(osd.state.is_active());
|
||||
return shard_services.dispatch_context_messages(std::move(ctx));
|
||||
});
|
||||
}
|
||||
|
||||
seastar::future<Ref<PG>> RemotePeeringEvent::get_pg()
|
||||
{
|
||||
return with_blocking_future(
|
||||
|
@ -61,6 +61,7 @@ protected:
|
||||
|
||||
virtual void on_pg_absent();
|
||||
virtual PeeringEvent::interruptible_future<> complete_rctx(Ref<PG>);
|
||||
virtual seastar::future<> complete_rctx_no_pg() { return seastar::now();}
|
||||
virtual seastar::future<Ref<PG>> get_pg() = 0;
|
||||
|
||||
public:
|
||||
@ -96,6 +97,7 @@ protected:
|
||||
|
||||
void on_pg_absent() final;
|
||||
PeeringEvent::interruptible_future<> complete_rctx(Ref<PG> pg) override;
|
||||
seastar::future<> complete_rctx_no_pg() override;
|
||||
seastar::future<Ref<PG>> get_pg() final;
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user