aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorartemagafonov <artemagafonov@yandex-team.com>2024-08-01 17:59:03 +0300
committerartemagafonov <artemagafonov@yandex-team.com>2024-08-01 18:13:49 +0300
commit6a72de53917646d5eb6bb156ab672ec2de853947 (patch)
tree6c2aeb244197db08d58f54b9230697295bbe97d7 /yt
parentcae5d68c4cae12cdcdba67084970d51e72b4fb89 (diff)
downloadydb-6a72de53917646d5eb6bb156ab672ec2de853947.tar.gz
YT-22323: Improve logging of tcp connections
a95f8b7bcb0c36cba182953b7244b4ec4c723dd1
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/core/bus/tcp/connection.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/yt/yt/core/bus/tcp/connection.cpp b/yt/yt/core/bus/tcp/connection.cpp
index 5a26424aad..e6241815b4 100644
--- a/yt/yt/core/bus/tcp/connection.cpp
+++ b/yt/yt/core/bus/tcp/connection.cpp
@@ -214,7 +214,9 @@ void TTcpConnection::Start()
}
if (!Poller_->TryRegister(this)) {
- Abort(TError(NBus::EErrorCode::TransportError, "Cannot register connection pollable"));
+ auto error = TError(NBus::EErrorCode::TransportError, "Cannot register connection pollable");
+ Abort(error);
+ YT_LOG_WARNING(error << *EndpointAttributes_, "Connection aborted");
return;
}
@@ -223,8 +225,9 @@ void TTcpConnection::Start()
try {
InitBuffers();
} catch (const std::exception& ex) {
- Abort(TError(NBus::EErrorCode::TransportError, "I/O buffers allocation error")
- << ex);
+ auto error = TError(NBus::EErrorCode::TransportError, "I/O buffers allocation error") << ex;
+ Abort(error);
+ YT_LOG_WARNING(error << *EndpointAttributes_, "Connection aborted");
return;
}