Skip to content

Commit 7b36c51

Browse files
igchorvinser52
authored andcommitted
Move validateValue call to make sure it is measured by latency tracker
1 parent 8b83aab commit 7b36c51

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cachelib/cachebench/cache/Cache-inl.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,17 @@ typename Cache<Allocator>::ItemHandle Cache<Allocator>::find(Key key,
458458
// find from cache and wait for the result to be ready.
459459
auto it = cache_->find(key, mode);
460460
it.wait();
461+
462+
if (valueValidatingEnabled()) {
463+
XDCHECK(!consistencyCheckEnabled());
464+
validateValue(it);
465+
}
466+
461467
return it;
462468
};
463469

464470
if (!consistencyCheckEnabled()) {
465471
auto it = findFn();
466-
if (valueValidatingEnabled()) {
467-
validateValue(it);
468-
}
469472
return it;
470473
}
471474

0 commit comments

Comments
 (0)