diff options
author | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-07-24 08:23:00 +0300 |
---|---|---|
committer | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-07-24 08:31:58 +0300 |
commit | af231441770fd2f0caaa23a8bd4106eaefe80759 (patch) | |
tree | ee916a213aa63dbac6d0f2fcd2b61fd2c74cbd73 /yt | |
parent | 526d5a422b6ab6b2383b56eca9d1b84462ee2050 (diff) | |
download | ydb-af231441770fd2f0caaa23a8bd4106eaefe80759.tar.gz |
Fix racy cancel error being ignored
380d213e0b6b3ab90575f44cc4b7a721574bae4b
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/core/concurrency/async_looper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yt/yt/core/concurrency/async_looper.cpp b/yt/yt/core/concurrency/async_looper.cpp index e347e3fc2f..9c1b5df73a 100644 --- a/yt/yt/core/concurrency/async_looper.cpp +++ b/yt/yt/core/concurrency/async_looper.cpp @@ -107,6 +107,9 @@ void TAsyncLooper::StartLoop(bool cleanStart, const TGuard& guard) // We got canceled -- this is normal. throw; } catch (const std::exception& ex) { + if (TError(ex).GetCode() == NYT::EErrorCode::Canceled) { + throw; + } YT_LOG_FATAL(ex, "Unexpected error encountered during the async step"); } catch (...) { YT_LOG_FATAL("Unexpected error encountered during the async step"); @@ -219,6 +222,9 @@ void TAsyncLooper::DoStep(bool cleanStart, bool wasRestarted) // We got canceled -- this is normal. throw; } catch (const std::exception& ex) { + if (TError(ex).GetCode() == NYT::EErrorCode::Canceled) { + throw; + } YT_LOG_FATAL(ex, "Unexpected error encountered during the sync step"); } catch (...) { YT_LOG_FATAL("Unexpected error encountered during the sync step"); |