Skip to content

Commit 4c3a7c0

Browse files
committed
debug level for "network-related error occured" log. EXT-1708 (#29179)
The same message will be printed during handshake result processing in the tcp proxy so no need to print it twice with NOTICE level.
1 parent e67ef35 commit 4c3a7c0

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

ydb/library/actors/interconnect/interconnect_handshake.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ namespace NActors {
244244
TString HandshakeKind;
245245
TMaybe<THolder<TProgramInfo>> ProgramInfo; // filled in in case of successful handshake; even if null
246246
TSessionParams Params;
247-
std::optional<TInstant> LastLogNotice;
248-
const TDuration MuteDuration = TDuration::Seconds(15);
249247
TMonotonic Deadline;
250248
TActorId HandshakeBroker;
251249
std::optional<TBrokerLeaseHolder> BrokerLeaseHolder;
@@ -749,8 +747,7 @@ namespace NActors {
749747

750748
// perform connection and log its result
751749
MainChannel.Connect(&PeerAddr);
752-
auto logPriority = std::exchange(LastLogNotice, std::nullopt) ? NActors::NLog::PRI_NOTICE : NActors::NLog::PRI_DEBUG;
753-
LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH05", logPriority, "connected to peer");
750+
LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH05", NActors::NLog::PRI_DEBUG, "connected to peer");
754751

755752
// Try to create rdma stuff
756753
CreateRdmaPrimitives();
@@ -1492,13 +1489,7 @@ namespace NActors {
14921489
PeerAddr.size() ? PeerAddr.data() : "<unknown>", explanation.data());
14931490

14941491
if (network) {
1495-
TInstant now = Now();
1496-
NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG;
1497-
if (!LastLogNotice || now - *LastLogNotice > MuteDuration) {
1498-
logPriority = NActors::NLog::PRI_NOTICE;
1499-
LastLogNotice.emplace(now);
1500-
}
1501-
LOG_LOG_NET_X(logPriority, PeerNodeId, "network-related error occured on handshake: %s", msg.data());
1492+
LOG_LOG_NET_X(NActors::NLog::PRI_DEBUG, PeerNodeId, "network-related error occured on handshake: %s", msg.data());
15021493
} else {
15031494
// calculate log severity based on failure type; permanent failures lead to error log messages
15041495
auto severity = reason == TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT

0 commit comments

Comments
 (0)