diff options
author | babenko <babenko@yandex-team.com> | 2024-11-16 00:37:27 +0300 |
---|---|---|
committer | babenko <babenko@yandex-team.com> | 2024-11-16 00:49:11 +0300 |
commit | 1f05d8bfd4e7833b5040348f98eadcbedea92c4a (patch) | |
tree | b8189201f4e517063a6986541cf9a3a34fbd0f45 | |
parent | d718fa6cbeecef9f17820b0c27f2ecc609aea57c (diff) | |
download | ydb-1f05d8bfd4e7833b5040348f98eadcbedea92c4a.tar.gz |
Stop reusing error instances
commit_hash:12e3f2d462d1e55b1fb7571acfe28da6d207767d
-rw-r--r-- | yt/yt/core/rpc/service_detail.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp index d6c062b9c9e..52e474ff05e 100644 --- a/yt/yt/core/rpc/service_detail.cpp +++ b/yt/yt/core/rpc/service_detail.cpp @@ -561,8 +561,7 @@ public: RequestId_); if (RuntimeInfo_->Descriptor.StreamingEnabled) { - static const auto CanceledError = TError(NYT::EErrorCode::Canceled, "Request canceled"); - AbortStreamsUnlessClosed(CanceledError); + AbortStreamsUnlessClosed(TError(NYT::EErrorCode::Canceled, "Request canceled")); } CancelInstant_ = NProfiling::GetInstant(); @@ -586,8 +585,7 @@ public: stage); if (RuntimeInfo_->Descriptor.StreamingEnabled) { - static const auto TimedOutError = TError(NYT::EErrorCode::Timeout, "Request timed out"); - AbortStreamsUnlessClosed(TimedOutError); + AbortStreamsUnlessClosed(TError(NYT::EErrorCode::Timeout, "Request timed out")); } CanceledList_.Fire(GetCanceledError()); @@ -895,8 +893,7 @@ private: } if (RuntimeInfo_->Descriptor.StreamingEnabled) { - static const auto FinishedError = TError("Request finished"); - AbortStreamsUnlessClosed(Error_.IsOK() ? Error_ : FinishedError); + AbortStreamsUnlessClosed(Error_.IsOK() ? Error_ : TError("Request finished")); } DoSetComplete(); |