]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: change heartbeat msgr policy to lossy_client
authorYingxin Cheng <yingxin.cheng@intel.com>
Sat, 14 Mar 2020 10:28:31 +0000 (18:28 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 15 Jun 2020 12:49:06 +0000 (20:49 +0800)
stateless_server is not appropriate for heartbeat msgrs, as it:
* will always lose when connection races;
* won't close and reset itself when fault happens, instead it just goes
to STANDBY and do nothing.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/osd/heartbeat.cc

index 6bf4d13cb51422c1e34a21bcc939128ed842647d..f6d0d7b3b7a48ab789ce0da275c62da1a443b2b6 100644 (file)
@@ -51,9 +51,9 @@ seastar::future<> Heartbeat::start(entity_addrvec_t front_addrs,
 
   using crimson::net::SocketPolicy;
   front_msgr->set_policy(entity_name_t::TYPE_OSD,
-                         SocketPolicy::stateless_server(0));
+                         SocketPolicy::lossy_client(0));
   back_msgr->set_policy(entity_name_t::TYPE_OSD,
-                        SocketPolicy::stateless_server(0));
+                        SocketPolicy::lossy_client(0));
   auto chained_dispatchers = seastar::make_lw_shared<ChainedDispatchers>();
   chained_dispatchers->push_back(*this);
   return seastar::when_all_succeed(start_messenger(*front_msgr,