Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use findInternal to sync on ac lock
  • Loading branch information
byrnedj committed Nov 13, 2023
commit fb8e23c996fb1b61818da4022723535f6dae6486
3 changes: 2 additions & 1 deletion cachelib/allocator/CacheAllocator-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2639,6 +2639,7 @@ bool CacheAllocator<CacheTrait>::moveForSlabRelease(
const auto allocInfo = allocator_->getAllocInfo(oldItem.getMemory());
if (chainedItem) {
newItemHdl.reset();
auto parentKey = parentItem->getKey();
auto ref = parentItem->unmarkMoving();
if (UNLIKELY(ref == 0)) {
wakeUpWaiters(*parentItem, {});
Expand All @@ -2648,7 +2649,7 @@ bool CacheAllocator<CacheTrait>::moveForSlabRelease(
return true;
} else {
XDCHECK_NE(ref, 0);
auto parentHdl = acquire(parentItem);
auto parentHdl = findInternal(parentKey);
if (parentHdl) {
wakeUpWaiters(*parentItem, std::move(parentHdl));
}
Expand Down