]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/net: add critical info logs to track and debug racing
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 17 Mar 2020 07:14:06 +0000 (15:14 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 23 Mar 2020 05:00:23 +0000 (13:00 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/Protocol.cc
src/crimson/net/SocketMessenger.cc

index 7eb952609ed00fbfc448c758dbeb02cc4a7b2176..3d01f26e50d425c620ff6ed49f5099ff765070d0 100644 (file)
@@ -48,6 +48,10 @@ void Protocol::close(bool dispatch_reset,
     return;
   }
 
+  logger().info("{} closing: reset {}, replace {}", conn,
+                dispatch_reset ? "yes" : "no",
+                f_accept_new ? "yes" : "no");
+
   // unregister_conn() drops a reference, so hold another until completion
   auto cleanup = [conn_ref = conn.shared_from_this(), this] {
       logger().debug("{} closed!", conn);
index 2817602cac7d26a62642dd20ed38b143ca5b2f0c..c11e2b32753e2be116356ecefcb11f89c4e95a2b 100644 (file)
@@ -141,6 +141,7 @@ SocketMessenger::connect(const entity_addr_t& peer_addr, const entity_type_t& pe
   ceph_assert(peer_addr.get_port() > 0);
 
   if (auto found = lookup_conn(peer_addr); found) {
+    logger().info("{} connect to existing", *found);
     return found->shared_from_this();
   }
   SocketConnectionRef conn = seastar::make_shared<SocketConnection>(