aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornastprol <nastprol@yandex-team.com>2024-06-11 19:58:09 +0300
committernastprol <nastprol@yandex-team.com>2024-06-12 11:27:03 +0300
commit3ef7f2079326399e4eb328be651e9fff8e4734aa (patch)
tree80acc0070ff53b2cf4316cb44acd8c61c6234e55
parent9994490ac611e1e098a265c37f833f6ff7974d68 (diff)
downloadydb-3ef7f2079326399e4eb328be651e9fff8e4734aa.tar.gz
Allocate slots in RCT with a reserve to reduce spinlock contention
5778a3fa489a7969a4d6a0e8af567e3efca7355c
-rw-r--r--yt/yt/core/misc/ref_counted_tracker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt/yt/core/misc/ref_counted_tracker.cpp b/yt/yt/core/misc/ref_counted_tracker.cpp
index af06706eb3..85d1e0fd1a 100644
--- a/yt/yt/core/misc/ref_counted_tracker.cpp
+++ b/yt/yt/core/misc/ref_counted_tracker.cpp
@@ -449,7 +449,7 @@ TRefCountedTracker::TLocalSlot* TRefCountedTracker::GetLocalSlot(TRefCountedType
auto index = cookie.Underlying();
if (index >= std::ssize(*localSlots)) {
- localSlots->resize(static_cast<size_t>(index) + 1);
+ localSlots->resize(2 * static_cast<size_t>(index) + 1);
}
localSlotsBegin = localSlots->data();