diff options
author | Judah Schvimer <judah@mongodb.com> | 2017-10-25 11:35:26 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-10-25 11:35:26 -0400 |
commit | de2a67178e3365b829d57afde92cb6123dd24357 (patch) | |
tree | 33d8697c1322e689c82ab98855bcd8c6cab5c0af /src/mongo/db/repl/oplog.cpp | |
parent | eadebad07fc0e7aa02d0b407f60af9bcf19fde16 (diff) | |
download | mongo-de2a67178e3365b829d57afde92cb6123dd24357.tar.gz |
Revert "SERVER-31678 Thread through the operation wall-clock time for oplog entries"
This reverts commit 080514c9ee36564d8342cd832f3c5f3a199a9845.
Diffstat (limited to 'src/mongo/db/repl/oplog.cpp')
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 8fd70dff826..b7503de1082 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -408,7 +408,6 @@ OpTime logOp(OperationContext* opCtx, const BSONObj& obj, const BSONObj* o2, bool fromMigrate, - Date_t wallClockTime, const OperationSessionInfo& sessionInfo, StmtId statementId, const OplogLink& oplogLink) { @@ -435,7 +434,7 @@ OpTime logOp(OperationContext* opCtx, fromMigrate, slot.opTime, slot.hash, - wallClockTime, + Date_t::now(), sessionInfo, statementId, oplogLink); @@ -452,8 +451,7 @@ std::vector<OpTime> logInsertOps(OperationContext* opCtx, Session* session, std::vector<InsertStatement>::const_iterator begin, std::vector<InsertStatement>::const_iterator end, - bool fromMigrate, - Date_t wallClockTime) { + bool fromMigrate) { invariant(begin != end); auto replCoord = ReplicationCoordinator::get(opCtx); @@ -470,6 +468,7 @@ std::vector<OpTime> logInsertOps(OperationContext* opCtx, Lock::CollectionLock lock(opCtx->lockState(), _oplogCollectionName, MODE_IX); WriteUnitOfWork wuow(opCtx); + auto wallTime = Date_t::now(); OperationSessionInfo sessionInfo; OplogLink oplogLink; @@ -498,7 +497,7 @@ std::vector<OpTime> logInsertOps(OperationContext* opCtx, fromMigrate, insertStatementOplogSlot.opTime, insertStatementOplogSlot.hash, - wallClockTime, + wallTime, sessionInfo, begin[i].stmtId, oplogLink)); |