aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorsnaury <snaury@ydb.tech>2023-07-04 12:38:17 +0300
committersnaury <snaury@ydb.tech>2023-07-04 12:38:17 +0300
commitac320528538f879e8504b62e6f7250e369fedcb8 (patch)
tree3403614c6679494d9cef5e262b149419cedd852b /library
parent5339262ca4ffb940e14e659a82a3b50ecaad3506 (diff)
downloadydb-ac320528538f879e8504b62e6f7250e369fedcb8.tar.gz
Fix tsan race in TExecutor::GetMaxQueueSizeAndClear
Diffstat (limited to 'library')
-rw-r--r--library/cpp/messagebus/actor/executor.cpp2
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);
}