diff options
author | akozhikhov <akozhikhov@yandex-team.com> | 2025-01-30 14:43:31 +0300 |
---|---|---|
committer | akozhikhov <akozhikhov@yandex-team.com> | 2025-01-30 15:09:09 +0300 |
commit | e0a1b4cfd271b5ede39825cf60d93f619c8d1c58 (patch) | |
tree | ede47e500fed2f4d019be879451f164fe915e377 | |
parent | f6c6b9334c10ad8d86058c390d13364d28a5b68a (diff) | |
download | ydb-e0a1b4cfd271b5ede39825cf60d93f619c8d1c58.tar.gz |
Increment failed request in rpc bus channel in case of channel termination or failed ack
commit_hash:dba982cf1f4acdf39e4e4cb837b0d62978eb9904
-rw-r--r-- | yt/yt/core/rpc/bus/channel.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/yt/yt/core/rpc/bus/channel.cpp b/yt/yt/core/rpc/bus/channel.cpp index d90dc774d9..af49c94eb1 100644 --- a/yt/yt/core/rpc/bus/channel.cpp +++ b/yt/yt/core/rpc/bus/channel.cpp @@ -343,8 +343,10 @@ private: } for (const auto& existingRequest : existingRequests) { + const auto& requestControl = std::get<0>(existingRequest); + requestControl->ProfileError(error); NotifyError( - std::get<0>(existingRequest), + requestControl, std::get<1>(existingRequest), TStringBuf("Request failed due to channel termination"), error); @@ -1087,18 +1089,19 @@ private: requestControl = it->second; requestControl->ResetAcknowledgementTimeoutCookie(); - if (!error.IsOK()) { - responseHandler = requestControl->Finalize(guard); - bucket->ActiveRequestMap.erase(it); - } else { + if (error.IsOK()) { requestControl->ProfileAcknowledgement(); responseHandler = requestControl->GetResponseHandler(guard); + } else { + responseHandler = requestControl->Finalize(guard); + bucket->ActiveRequestMap.erase(it); } } if (error.IsOK()) { NotifyAcknowledgement(requestId, responseHandler); } else { + requestControl->ProfileError(error); NotifyError( requestControl, responseHandler, |