@@ -777,9 +777,7 @@ OSD::ms_dispatch(crimson::net::ConnectionRef conn, MessageRef m)
777777 case MSG_OSD_PG_UPDATE_LOG_MISSING:
778778 case MSG_OSD_PG_UPDATE_LOG_MISSING_REPLY:
779779 {
780- return conn.get_foreign ().then ([this , m = std::move (m)](auto f_conn) {
781- return shard_dispatchers.local ().ms_dispatch (std::move (f_conn), std::move (m));
782- });
780+ return shard_dispatchers.local ().ms_dispatch (conn, std::move (m));
783781 }
784782 default :
785783 {
@@ -793,22 +791,26 @@ OSD::ms_dispatch(crimson::net::ConnectionRef conn, MessageRef m)
793791
794792seastar::future<>
795793OSD::ShardDispatcher::ms_dispatch (
796- crimson::net::ConnectionFRef f_conn ,
794+ crimson::net::ConnectionRef conn ,
797795 MessageRef m)
798796{
799797 if (seastar::this_shard_id () != PRIMARY_CORE) {
800798 switch (m->get_type ()) {
801799 case CEPH_MSG_OSD_MAP:
802800 case MSG_COMMAND:
803801 case MSG_OSD_MARK_ME_DOWN:
804- return container ().invoke_on (PRIMARY_CORE,
805- [f_conn = std::move (f_conn), m = std::move (m)]
806- (auto & local_dispatcher) mutable {
807- return local_dispatcher.ms_dispatch (std::move (f_conn), std::move (m));
802+ // FIXME: order is not guaranteed in this path
803+ return conn.get_foreign (
804+ ).then ([this , m=std::move (m)](auto f_conn) {
805+ return container ().invoke_on (PRIMARY_CORE,
806+ [f_conn=std::move (f_conn), m=std::move (m)]
807+ (auto & local_dispatcher) mutable {
808+ auto conn = make_local_shared_foreign (std::move (f_conn));
809+ return local_dispatcher.ms_dispatch (conn, std::move (m));
810+ });
808811 });
809812 }
810813 }
811- crimson::net::ConnectionRef conn = make_local_shared_foreign (std::move (f_conn));
812814
813815 switch (m->get_type ()) {
814816 case CEPH_MSG_OSD_MAP:
0 commit comments