From 9b960bece67b9ae4f9490c5a31d82e1772a02fcb Mon Sep 17 00:00:00 2001 From: Daniil Cherednik Date: Wed, 19 Nov 2025 13:41:22 +0100 Subject: [PATCH] debug level for "network-related error occured" log We print same message from tcp proxy during handle handshake result so no need to print it twise with NOTICE level --- .../actors/interconnect/interconnect_handshake.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ydb/library/actors/interconnect/interconnect_handshake.cpp b/ydb/library/actors/interconnect/interconnect_handshake.cpp index b1bf834ca48e..c4c2822b2ab1 100644 --- a/ydb/library/actors/interconnect/interconnect_handshake.cpp +++ b/ydb/library/actors/interconnect/interconnect_handshake.cpp @@ -244,8 +244,6 @@ namespace NActors { TString HandshakeKind; TMaybe> ProgramInfo; // filled in in case of successful handshake; even if null TSessionParams Params; - std::optional LastLogNotice; - const TDuration MuteDuration = TDuration::Seconds(15); TMonotonic Deadline; TActorId HandshakeBroker; std::optional BrokerLeaseHolder; @@ -749,8 +747,7 @@ namespace NActors { // perform connection and log its result MainChannel.Connect(&PeerAddr); - auto logPriority = std::exchange(LastLogNotice, std::nullopt) ? NActors::NLog::PRI_NOTICE : NActors::NLog::PRI_DEBUG; - LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH05", logPriority, "connected to peer"); + LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH05", NActors::NLog::PRI_DEBUG, "connected to peer"); // Try to create rdma stuff CreateRdmaPrimitives(); @@ -1572,13 +1569,7 @@ namespace NActors { PeerAddr.size() ? PeerAddr.data() : "", explanation.data()); if (network) { - TInstant now = Now(); - NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG; - if (!LastLogNotice || now - *LastLogNotice > MuteDuration) { - logPriority = NActors::NLog::PRI_NOTICE; - LastLogNotice.emplace(now); - } - LOG_LOG_NET_X(logPriority, PeerNodeId, "network-related error occured on handshake: %s", msg.data()); + LOG_LOG_NET_X(NActors::NLog::PRI_DEBUG, PeerNodeId, "network-related error occured on handshake: %s", msg.data()); } else { // calculate log severity based on failure type; permanent failures lead to error log messages auto severity = reason == TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT