Skip to content

Commit d317365

Browse files
pbhandar2meta-codesync[bot]
authored andcommitted
Remove double declaration of CacheAdmin config
Summary: remove double declaration of config in CacheAdmin and fix some comments in BlockCache which does not explain correctly what happens during reclaim. Reviewed By: AlnisM Differential Revision: D86651012 fbshipit-source-id: d5e6c2419471c56a61bd1a6fd7ba6f02b84d4f47
1 parent 23791cd commit d317365

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cachelib/navy/block_cache/BlockCache.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,15 @@ Status BlockCache::remove(HashedKey hk) {
479479
//
480480
// See @RegionEvictCallback for details
481481
uint32_t BlockCache::onRegionReclaim(RegionId rid, BufferView buffer) {
482-
// Eviction callback guarantees are the following:
482+
// Eviction callback guarantees are the following assuming no checksum errors:
483483
// - Every value inserted will get eviction callback at some point of
484484
// time.
485485
// - It is invoked only once per insertion.
486486
//
487+
// If there is a checksum error of an item descriptor, we abort the reclaim
488+
// and we will not be able to call the eviction callback for rest of the item
489+
// that have not been evaluated in the region.
490+
//
487491
// We do not guarantee time between remove and callback invocation. If a
488492
// value v1 was replaced with v2 user will get callbacks for both v1 and
489493
// v2 when they are evicted (in no particular order).

0 commit comments

Comments
 (0)