Skip to content

Tags: facebook/CacheLib

Tags

v2025.07.07.00

Toggle v2025.07.07.00's commit message
FixedSizeIndex: Using step for the next bucket offset to avoid adjace…

…nt ones

Summary:
Using step for the hopping offset instead of contiguous offsets.
* For additional 3 hopping with bucket conflict, instead of using bid + 1, bid + 2, bid + 2, using step (small prime number) as the offset for next bucket to use. (Currently it's 0, 23, 61, 97). This reduces bucket conflicts caused by hopping.
* This offset will be wrapped around within the current mutex boundary if it goes beyond that.

Also differentiated handling with ExclusiveLockedBucket if it's not for new bucket allocation.

Reviewed By: pbhandar2

Differential Revision: D77402256

fbshipit-source-id: b95ff3722e52c00394667f02a21e4c45bac901b4

v2025.05.19.00

Toggle v2025.05.19.00's commit message