summaryrefslogtreecommitdiffstats
path: root/src/crimson
diff options
context:
space:
mode:
authorYingxin Cheng <yingxin.cheng@intel.com>2019-09-16 08:17:30 +0200
committerYingxin Cheng <yingxin.cheng@intel.com>2019-09-18 06:32:31 +0200
commit08681e1cea4ae6aca1e114ee9138098da34cba84 (patch)
tree1ea0a2a2d0ca094efd5faca58c8942f37c3fce68 /src/crimson
parentcrimson/net: set exit_open atomically with write_dispatching (diff)
downloadceph-08681e1cea4ae6aca1e114ee9138098da34cba84.tar.xz
ceph-08681e1cea4ae6aca1e114ee9138098da34cba84.zip
crimson/net: log out_q size when execute_ready()
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
Diffstat (limited to 'src/crimson')
-rw-r--r--src/crimson/net/ProtocolV2.cc33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc
index 71203675b47..9cdb7e54210 100644
--- a/src/crimson/net/ProtocolV2.cc
+++ b/src/crimson/net/ProtocolV2.cc
@@ -983,10 +983,12 @@ void ProtocolV2::execute_connecting()
logger().error("{} ms_handle_connect caught exception: {}", conn, eptr);
ceph_abort("unexpected exception from ms_handle_connect()");
});
- logger().info("{} connected: gs={}, pgs={}, cs={},"
- " client_cookie={}, server_cookie={}, in_seq={}, out_seq={}",
+ logger().info("{} connected:"
+ " gs={}, pgs={}, cs={}, client_cookie={},"
+ " server_cookie={}, in_seq={}, out_seq={}, out_q={}",
conn, global_seq, peer_global_seq, connect_seq,
- client_cookie, server_cookie, conn.in_seq, conn.out_seq);
+ client_cookie, server_cookie, conn.in_seq,
+ conn.out_seq, conn.out_q.size());
execute_ready();
break;
}
@@ -1179,7 +1181,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn)
existing_proto->server_cookie);
if (existing_proto->state == state_t::REPLACING) {
- logger().warn("{} server_connect: racing replace happened while "
+ logger().warn("{} server_connect: racing replace happened while"
" replacing existing connection {}, send wait.",
conn, *existing_conn);
return send_wait();
@@ -1188,7 +1190,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn)
if (existing_proto->peer_global_seq > peer_global_seq) {
logger().warn("{} server_connect:"
" this is a stale connection, because peer_global_seq({})"
- "< existing->peer_global_seq({}), close this connection"
+ " < existing->peer_global_seq({}), close this connection"
" in favor of existing connection {}",
conn, peer_global_seq,
existing_proto->peer_global_seq, *existing_conn);
@@ -1658,10 +1660,6 @@ void ProtocolV2::execute_establishing() {
messenger.unaccept_conn(
seastar::static_pointer_cast<SocketConnection>(
conn.shared_from_this()));
- logger().info("{} accepted: gs={}, pgs={}, cs={},"
- " client_cookie={}, server_cookie={}, in_seq={}, out_seq={}",
- conn, global_seq, peer_global_seq, connect_seq,
- client_cookie, server_cookie, conn.in_seq, conn.out_seq);
execution_done = seastar::with_gate(pending_dispatch, [this] {
return seastar::futurize_apply([this] {
return send_server_ident();
@@ -1671,6 +1669,11 @@ void ProtocolV2::execute_establishing() {
conn, get_state_name(state));
abort_protocol();
}
+ logger().info("{} established: gs={}, pgs={}, cs={}, client_cookie={},"
+ " server_cookie={}, in_seq={}, out_seq={}, out_q={}",
+ conn, global_seq, peer_global_seq, connect_seq,
+ client_cookie, server_cookie, conn.in_seq,
+ conn.out_seq, conn.out_q.size());
execute_ready();
}).handle_exception([this] (std::exception_ptr eptr) {
if (state != state_t::ESTABLISHING) {
@@ -1811,16 +1814,18 @@ void ProtocolV2::trigger_replacing(bool reconnect,
connection_features = new_conn_features;
return send_server_ident();
}
- }).then([this] {
+ }).then([this, reconnect] {
if (unlikely(state != state_t::REPLACING)) {
logger().debug("{} triggered {} at the end of trigger_replacing()",
conn, get_state_name(state));
abort_protocol();
}
- logger().info("{} reconnected(replaced): gs={}, pgs={}, cs={},"
- " client_cookie={}, server_cookie={}, in_seq={}, out_seq={}",
- conn, global_seq, peer_global_seq, connect_seq,
- client_cookie, server_cookie, conn.in_seq, conn.out_seq);
+ logger().info("{} replaced ({}):"
+ " gs={}, pgs={}, cs={}, client_cookie={}, server_cookie={},"
+ " in_seq={}, out_seq={}, out_q={}",
+ conn, reconnect ? "reconnected" : "connected",
+ global_seq, peer_global_seq, connect_seq, client_cookie,
+ server_cookie, conn.in_seq, conn.out_seq, conn.out_q.size());
execute_ready();
}).handle_exception([this] (std::exception_ptr eptr) {
if (state != state_t::REPLACING) {