Skip to content

Commit 95cd91f

Browse files
authored
Merge pull request #33 from igchor/fix_validate_value
Move validateValue call to make sure it is measured by latency tracker
2 parents b06846a + 1c9eaf2 commit 95cd91f

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
@@ -460,14 +460,17 @@ typename Cache<Allocator>::ItemHandle Cache<Allocator>::find(Key key,
460460
// find from cache and wait for the result to be ready.
461461
auto it = cache_->find(key, mode);
462462
it.wait();
463+
464+
if (valueValidatingEnabled()) {
465+
XDCHECK(!consistencyCheckEnabled());
466+
validateValue(it);
467+
}
468+
463469
return it;
464470
};
465471

466472
if (!consistencyCheckEnabled()) {
467473
auto it = findFn();
468-
if (valueValidatingEnabled()) {
469-
validateValue(it);
470-
}
471474
return it;
472475
}
473476

0 commit comments

Comments
 (0)