diff options
author | eshcherbin <eshcherbin@yandex-team.com> | 2023-10-20 17:29:55 +0300 |
---|---|---|
committer | eshcherbin <eshcherbin@yandex-team.com> | 2023-10-20 18:46:46 +0300 |
commit | fc0e05b8840f83b3cacf286352c4c8f741145176 (patch) | |
tree | 2e9de4acee6e05e50bb269f09f0b4918f04b5b64 | |
parent | 25d84e86f40b4fd3fdf1e17f5a6b72b6f83735d7 (diff) | |
download | ydb-fc0e05b8840f83b3cacf286352c4c8f741145176.tar.gz |
Change InvokerQueueStatesLock_ from RW to regular spinlock
-rw-r--r-- | yt/yt/core/concurrency/fair_share_invoker_pool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yt/yt/core/concurrency/fair_share_invoker_pool.cpp b/yt/yt/core/concurrency/fair_share_invoker_pool.cpp index b3deda2099..0ae163a2cf 100644 --- a/yt/yt/core/concurrency/fair_share_invoker_pool.cpp +++ b/yt/yt/core/concurrency/fair_share_invoker_pool.cpp @@ -149,7 +149,7 @@ public: { auto now = GetInstant(); - auto guard = WriterGuard(InvokerQueueStatesLock_); + auto guard = Guard(InvokerQueueStatesLock_); auto& queueState = InvokerQueueStates_[index]; queueState.OnActionEnqueued(now); @@ -174,7 +174,7 @@ protected: auto now = GetInstant(); - auto guard = ReaderGuard(InvokerQueueStatesLock_); + auto guard = Guard(InvokerQueueStatesLock_); const auto& queueState = InvokerQueueStates_[index]; return queueState.GetInvokerStatistics(now); @@ -242,7 +242,7 @@ private: } }; - YT_DECLARE_SPIN_LOCK(NThreading::TReaderWriterSpinLock, InvokerQueueStatesLock_); + YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, InvokerQueueStatesLock_); std::vector<TInvokerQueueState> InvokerQueueStates_; IFairShareCallbackQueuePtr Queue_; @@ -316,7 +316,7 @@ private: YT_VERIFY(IsValidInvokerIndex(bucketIndex)); { - auto guard = WriterGuard(InvokerQueueStatesLock_); + auto guard = Guard(InvokerQueueStatesLock_); auto& queueState = InvokerQueueStates_[bucketIndex]; queueState.OnActionDequeued(); |