]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson: decouple mgr client reconnect and connect reset handling
authorXuehan Xu <xxhdx1985126@163.com>
Fri, 6 Mar 2020 10:55:07 +0000 (18:55 +0800)
committerXuehan Xu <xxhdx1985126@163.com>
Sat, 7 Mar 2020 03:59:45 +0000 (11:59 +0800)
commit2a51a3dcf9cf5d93d5d65011e7f96729d19c332d
tree33de03ff445c75b9c97f7095d32efa41875319e7
parent27e9ca0b9c08821151b18c50dcb7c724e8c03879
crimson: decouple mgr client reconnect and connect reset handling

As of now, the following invocation sequence triggers deadlock when
closing crimson-osd's connection with mgr:
  ProtocolV2::dispatch_reset() --> crimson::mgr::Client::ms_handle_reset
--> crimson::mgr::Client::reconnect --> crimson::net::SocketConnection::close
--> crimson::net::Protocol::close()

In the above invocation sequence, ProtocalV2::dispatch_reset() enters the gate
"pending_dispatch" the leaving of which would wait for the complete of crimson::\
net::Protocal::close() which further wait for the complete of the gate's close().

This commit decouples this waiting chain.

Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
src/crimson/mgr/client.cc
src/crimson/mgr/client.h