Skip to content

Commit 0735116

Browse files
Jiayue Baofacebook-github-bot
authored andcommitted
Add error log in BlockCache::readEntry when there is value checksum mismatch
Summary: Add log to further investigate the recent nvm disable issue in memcache T138539066. Reviewed By: lenar-f, jaesoo-fb Differential Revision: D41658294 fbshipit-source-id: cc4116b037a0a7f9118644f69a7788d8204e6c48
1 parent 2a5975e commit 0735116

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cachelib/navy/block_cache/BlockCache.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,10 @@ Status BlockCache::readEntry(const RegionDescriptor& readDesc,
668668
value = std::move(buffer);
669669
value.shrink(desc.valueSize);
670670
if (checksumData_ && desc.cs != checksum(value.view())) {
671+
XLOG_N_PER_MS(ERR, 10, 10'000) << folly::sformat(
672+
"Item value checksum mismatch when looking up key {}. "
673+
"Expected:{}, Actual: {}.",
674+
key, desc.cs, checksum(value.view()));
671675
value.reset();
672676
lookupValueChecksumErrorCount_.inc();
673677
return Status::DeviceError;

0 commit comments

Comments
 (0)