summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/querytests.cpp
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2017-02-14 17:39:46 -0500
committerMisha Tyulenev <misha@mongodb.com>2017-02-15 14:47:55 -0500
commit7d36244539cff23adb813f9cc006b1e9fe4305e0 (patch)
treefe139db2fd9807151435c296dc77697a69523fab /src/mongo/dbtests/querytests.cpp
parent7284884f3d8f3cf1d1489579180c2637efcc42b2 (diff)
downloadmongo-7d36244539cff23adb813f9cc006b1e9fe4305e0.tar.gz
SERVER-27746: Integrate LogicalClock with oplog
Diffstat (limited to 'src/mongo/dbtests/querytests.cpp')
-rw-r--r--src/mongo/dbtests/querytests.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp
index 1ca8cf49bf0..5288038b1f8 100644
--- a/src/mongo/dbtests/querytests.cpp
+++ b/src/mongo/dbtests/querytests.cpp
@@ -39,10 +39,11 @@
#include "mongo/db/db_raii.h"
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/dbhelpers.h"
-#include "mongo/db/global_timestamp.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/json.h"
#include "mongo/db/lasterror.h"
+#include "mongo/db/logical_clock.h"
+#include "mongo/db/logical_time.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/find.h"
#include "mongo/db/service_context.h"
@@ -670,12 +671,12 @@ public:
<< 8192),
info);
- Date_t one =
- Date_t::fromMillisSinceEpoch(getNextGlobalTimestamp(_txn.getServiceContext()).asLL());
- Date_t two =
- Date_t::fromMillisSinceEpoch(getNextGlobalTimestamp(_txn.getServiceContext()).asLL());
- Date_t three =
- Date_t::fromMillisSinceEpoch(getNextGlobalTimestamp(_txn.getServiceContext()).asLL());
+ Date_t one = Date_t::fromMillisSinceEpoch(
+ LogicalClock::get(&_txn)->reserveTicks(1).asTimestamp().asLL());
+ Date_t two = Date_t::fromMillisSinceEpoch(
+ LogicalClock::get(&_txn)->reserveTicks(1).asTimestamp().asLL());
+ Date_t three = Date_t::fromMillisSinceEpoch(
+ LogicalClock::get(&_txn)->reserveTicks(1).asTimestamp().asLL());
insert(ns, BSON("ts" << one));
insert(ns, BSON("ts" << two));
insert(ns, BSON("ts" << three));