diff options
author | snaury <snaury@ydb.tech> | 2023-07-04 12:38:17 +0300 |
---|---|---|
committer | snaury <snaury@ydb.tech> | 2023-07-04 12:38:17 +0300 |
commit | ac320528538f879e8504b62e6f7250e369fedcb8 (patch) | |
tree | 3403614c6679494d9cef5e262b149419cedd852b /library | |
parent | 5339262ca4ffb940e14e659a82a3b50ecaad3506 (diff) | |
download | ydb-ac320528538f879e8504b62e6f7250e369fedcb8.tar.gz |
Fix tsan race in TExecutor::GetMaxQueueSizeAndClear
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/messagebus/actor/executor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp index 7a2227a458..0c095b1677 100644 --- a/library/cpp/messagebus/actor/executor.cpp +++ b/library/cpp/messagebus/actor/executor.cpp @@ -242,7 +242,7 @@ using namespace NTSAN; ui32 TExecutor::GetMaxQueueSizeAndClear() const { ui32 max = 0; for (unsigned i = 0; i < WorkerThreads.size(); ++i) { - TExecutorWorkerThreadLocalData* wtls = RelaxedLoad(&WorkerThreads[i]->ThreadLocalData); + TExecutorWorkerThreadLocalData* wtls = AtomicGet(WorkerThreads[i]->ThreadLocalData); max = Max<ui32>(max, RelaxedLoad(&wtls->MaxQueueSize)); RelaxedStore<ui32>(&wtls->MaxQueueSize, 0); } |