summaryrefslogtreecommitdiff
path: root/src/mongo/db/time_proof_service.cpp
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2017-11-30 09:10:34 -0500
committerMisha Tyulenev <misha@mongodb.com>2017-11-30 11:35:59 -0500
commit3308c838dd38ffa70200223c91612e1a38024628 (patch)
treea25f813c3eacfe6949e658d64a7a42bfcc47581f /src/mongo/db/time_proof_service.cpp
parentfed696cf30596737df326aed790cae54d9b6f748 (diff)
downloadmongo-3308c838dd38ffa70200223c91612e1a38024628.tar.gz
SERVER-32123 enable sign range optimization
Diffstat (limited to 'src/mongo/db/time_proof_service.cpp')
-rw-r--r--src/mongo/db/time_proof_service.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/time_proof_service.cpp b/src/mongo/db/time_proof_service.cpp
index 078a82da135..fc208d342e9 100644
--- a/src/mongo/db/time_proof_service.cpp
+++ b/src/mongo/db/time_proof_service.cpp
@@ -57,11 +57,11 @@ TimeProofService::Key TimeProofService::generateRandomKey() {
TimeProofService::TimeProof TimeProofService::getProof(LogicalTime time, const Key& key) {
stdx::lock_guard<stdx::mutex> lk(_cacheMutex);
- if (_cache && _cache->hasProof(time, key)) {
+ auto timeCeil = LogicalTime(Timestamp(time.asTimestamp().asULL() | kRangeMask));
+ if (_cache && _cache->hasProof(timeCeil, key)) {
return _cache->_proof;
}
- auto timeCeil = LogicalTime(Timestamp(time.asTimestamp().asULL() | kRangeMask));
auto unsignedTimeArray = timeCeil.toUnsignedArray();
// update cache
_cache =