diff options
author | Louis Williams <louis.williams@mongodb.com> | 2018-05-09 15:06:51 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2018-05-11 17:23:43 -0400 |
commit | 43c8dcee9897bb6caeec9b1f84f8105be2a19c4b (patch) | |
tree | a41614756907ab1d17a8c2dd1584d73ede08e27c /src/mongo/db/storage | |
parent | 2b156f4c2f69d2410a3a007b8ce8af323d527cbf (diff) | |
download | mongo-43c8dcee9897bb6caeec9b1f84f8105be2a19c4b.tar.gz |
SERVER-34701 Wait for oplog visibily on rollback start
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 9 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp | 3 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index cc6caed4705..2b15932f89f 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1661,15 +1661,6 @@ void WiredTigerRecordStore::cappedTruncateAfter(OperationContext* opCtx, // Only log messages at a lower level here for testing. int logLevel = getTestCommandsEnabled() ? 0 : 2; - if (_isOplog) { - // If we are truncating the oplog, we want to make sure that a forward cursor reads all - // committed oplog entries. Oplog visibility rules could prevent this if the oplog read - // timestamp has not yet been updated to reflect all committed oplog transactions. Setting - // the read timestamp to its maximum value should ensure that we read the effects of all - // previously committed transactions. - invariant(opCtx->recoveryUnit()->setPointInTimeReadTimestamp(Timestamp::max()).isOK()); - } - std::unique_ptr<SeekableRecordCursor> cursor = getCursor(opCtx, true); LOG(logLevel) << "Truncating capped collection '" << _ns << "' in WiredTiger record store, (inclusive=" << inclusive << ")"; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp index 2396e17cd45..ed598579f27 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp @@ -339,8 +339,7 @@ void WiredTigerRecoveryUnit::_txnOpen() { auto ignorePrepare = _readConcernLevel == repl::ReadConcernLevel::kAvailableReadConcern; // '_readAtTimestamp' is available outside of a check for readConcern level 'snapshot' to // accommodate unit testing. Note that the order of this if/else chain below is important for - // correctness. Also, note that we use the '_readAtTimestamp' to work around an oplog visibility - // issue in cappedTruncateAfter by setting the timestamp to the maximum value. + // correctness. if (_readAtTimestamp != Timestamp::min()) { invariantWTOK(session->begin_transaction(session, NULL)); auto rollbacker = |