diff options
author | ermolovd <[email protected]> | 2023-08-24 18:16:36 +0300 |
---|---|---|
committer | ermolovd <[email protected]> | 2023-08-24 18:32:42 +0300 |
commit | 3d40978be0626fb1242c81ca9242c45464375574 (patch) | |
tree | 295c23526fd3470f4abe4297f5a3e9b7bc6d9755 /yt/cpp/mapreduce/client/client.cpp | |
parent | de6e39881d059d67cbcc978d076d9e3e5e9732fc (diff) |
Fix race in client
Diffstat (limited to 'yt/cpp/mapreduce/client/client.cpp')
-rw-r--r-- | yt/cpp/mapreduce/client/client.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index ca979c55883..a395174f79c 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -1224,7 +1224,7 @@ void TClient::ResumeOperation( TYtPoller& TClient::GetYtPoller() { - auto g = Guard(YtPollerLock_); + auto g = Guard(Lock_); if (!YtPoller_) { CheckShutdown(); // We don't use current client and create new client because YtPoller_ might use @@ -1237,7 +1237,7 @@ TYtPoller& TClient::GetYtPoller() void TClient::Shutdown() { - auto g = Guard(YtPollerLock_); + auto g = Guard(Lock_); if (!Shutdown_.exchange(true) && YtPoller_) { YtPoller_->Stop(); @@ -1246,6 +1246,7 @@ void TClient::Shutdown() ITransactionPingerPtr TClient::GetTransactionPinger() { + auto g = Guard(Lock_); if (!TransactionPinger_) { TransactionPinger_ = CreateTransactionPinger(Context_.Config); } |