From 23c2946fa346753784cf0eb018a9cc86ba813644 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Mon, 17 Jul 2017 16:15:18 -0700 Subject: [PATCH] Rename some trace events surrounding connections --- fdbrpc/FlowTransport.actor.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fdbrpc/FlowTransport.actor.cpp b/fdbrpc/FlowTransport.actor.cpp index 246c8def6a..1940bbae55 100644 --- a/fdbrpc/FlowTransport.actor.cpp +++ b/fdbrpc/FlowTransport.actor.cpp @@ -369,10 +369,10 @@ struct Peer : NonCopyable { Reference _conn = wait( timeout( INetworkConnections::net()->connect(self->destination), FLOW_KNOBS->CONNECTION_MONITOR_TIMEOUT, Reference() ) ); if (_conn) { conn = _conn; - TraceEvent("ConnEstablishedTo", conn->getDebugID()).detail("PeerAddr", self->destination); + TraceEvent("ConnectionExchangingConnectPacket", conn->getDebugID()).detail("PeerAddr", self->destination); self->prependConnectPacket(); } else { - TraceEvent("ConnTimedOut", conn ? conn->getDebugID() : UID()).detail("PeerAddr", self->destination); + TraceEvent("ConnectionTimedOut", conn ? conn->getDebugID() : UID()).detail("PeerAddr", self->destination); throw connection_failed(); } @@ -393,14 +393,17 @@ struct Peer : NonCopyable { self->discardUnreliablePackets(); reader = Future(); bool ok = e.code() == error_code_connection_failed || e.code() == error_code_actor_cancelled || ( g_network->isSimulated() && e.code() == error_code_checksum_failed ); - TraceEvent(ok ? SevInfo : SevError, "ConnectionClosed", conn ? conn->getDebugID() : UID()).detail("PeerAddr", self->destination).error(e, true); if(self->compatible) { + TraceEvent(ok ? SevInfo : SevError, "ConnectionClosed", conn ? conn->getDebugID() : UID()).detail("PeerAddr", self->destination).error(e, true); if (ok) self->transport->countConnClosedWithoutError++; else self->transport->countConnClosedWithError++; } + else { + TraceEvent(ok ? SevInfo : SevError, "IncompatibleConnectionClosed", conn ? conn->getDebugID() : UID()).detail("PeerAddr", self->destination).error(e, true); + } if (conn) { conn->close(); @@ -604,7 +607,7 @@ ACTOR static Future connectionReader( } else { compatible = true; - TraceEvent("ConnectionAccepted", conn->getDebugID()) + TraceEvent("ConnectionEstablished", conn->getDebugID()) .detail("Peer", conn->getPeerAddress()) .detail("ConnectionId", connectionId);