diff options
author | gleb-kov <gleb-kov@yandex-team.ru> | 2022-02-10 16:46:22 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:22 +0300 |
commit | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/actors/interconnect/interconnect_handshake.cpp | |
parent | 7b1cfa32681104c8468c5824c79fd80d9a88a579 (diff) | |
download | ydb-918e8a1574070d0ec733f0b76cfad8f8892ad2e5.tar.gz |
Restoring authorship annotation for <gleb-kov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/interconnect/interconnect_handshake.cpp')
-rw-r--r-- | library/cpp/actors/interconnect/interconnect_handshake.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp index e76f3998d6..9ede998d8e 100644 --- a/library/cpp/actors/interconnect/interconnect_handshake.cpp +++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp @@ -93,8 +93,8 @@ namespace NActors { TMaybe<THolder<TProgramInfo>> ProgramInfo; // filled in in case of successful handshake; even if null TSessionParams Params; bool ResolveTimedOut = false; - THashMap<ui32, TInstant> LastLogNotice; - const TDuration MuteDuration = TDuration::Seconds(15); + THashMap<ui32, TInstant> LastLogNotice; + const TDuration MuteDuration = TDuration::Seconds(15); TInstant Deadline; public: @@ -791,12 +791,12 @@ namespace NActors { if (network) { TInstant now = Now(); - TInstant prevLog = LastLogNotice[PeerNodeId]; - NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG; - if (now - prevLog > MuteDuration) { - logPriority = NActors::NLog::PRI_NOTICE; - LastLogNotice[PeerNodeId] = now; - } + TInstant prevLog = LastLogNotice[PeerNodeId]; + NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG; + if (now - prevLog > MuteDuration) { + logPriority = NActors::NLog::PRI_NOTICE; + LastLogNotice[PeerNodeId] = now; + } LOG_LOG_NET_X(logPriority, 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 @@ -883,12 +883,12 @@ namespace NActors { break; } - auto it = LastLogNotice.find(PeerNodeId); - NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG; - if (it != LastLogNotice.end()) { - LastLogNotice.erase(it); - logPriority = NActors::NLog::PRI_NOTICE; - } + auto it = LastLogNotice.find(PeerNodeId); + NActors::NLog::EPriority logPriority = NActors::NLog::PRI_DEBUG; + if (it != LastLogNotice.end()) { + LastLogNotice.erase(it); + logPriority = NActors::NLog::PRI_NOTICE; + } LOG_LOG_IC_X(NActorsServices::INTERCONNECT, "ICH05", logPriority, "connected to peer"); } |