Skip to content

Commit fb8e23c

Browse files
committed
use findInternal to sync on ac lock
1 parent c572aa2 commit fb8e23c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cachelib/allocator/CacheAllocator-inl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,6 +2639,7 @@ bool CacheAllocator<CacheTrait>::moveForSlabRelease(
26392639
const auto allocInfo = allocator_->getAllocInfo(oldItem.getMemory());
26402640
if (chainedItem) {
26412641
newItemHdl.reset();
2642+
auto parentKey = parentItem->getKey();
26422643
auto ref = parentItem->unmarkMoving();
26432644
if (UNLIKELY(ref == 0)) {
26442645
wakeUpWaiters(*parentItem, {});
@@ -2648,7 +2649,7 @@ bool CacheAllocator<CacheTrait>::moveForSlabRelease(
26482649
return true;
26492650
} else {
26502651
XDCHECK_NE(ref, 0);
2651-
auto parentHdl = acquire(parentItem);
2652+
auto parentHdl = findInternal(parentKey);
26522653
if (parentHdl) {
26532654
wakeUpWaiters(*parentItem, std::move(parentHdl));
26542655
}

0 commit comments

Comments
 (0)