diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-03-27 11:29:16 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-03-27 14:52:56 -0400 |
commit | 8c66e167db6d62c78277d87765ab772166c40c9b (patch) | |
tree | 558d218776b44c880d727e707cff5fc3ee0ee079 /src/mongo/db/repl/replication_recovery.cpp | |
parent | 470f1fc4d997cbfed6bfa17e08db518fdf9a8993 (diff) | |
download | mongo-8c66e167db6d62c78277d87765ab772166c40c9b.tar.gz |
SERVER-34147 Move waitUntilDurable out of replication recovery lock
Diffstat (limited to 'src/mongo/db/repl/replication_recovery.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_recovery.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp index 409140e10e9..aaea9c8cb3b 100644 --- a/src/mongo/db/repl/replication_recovery.cpp +++ b/src/mongo/db/repl/replication_recovery.cpp @@ -62,6 +62,7 @@ void ReplicationRecoveryImpl::recoverFromOplog(OperationContext* opCtx, // Clear the truncateAfterPoint so that we don't truncate the next batch of oplog entries // erroneously. _consistencyMarkers->setOplogTruncateAfterPoint(opCtx, {}); + opCtx->recoveryUnit()->waitUntilDurable(); } auto topOfOplogSW = _getTopOfOplog(opCtx); @@ -264,7 +265,6 @@ void ReplicationRecoveryImpl::_truncateOplogTo(OperationContext* opCtx, if (count != 1) { invariant(!oldestIDToDelete.isNull()); oplogCollection->cappedTruncateAfter(opCtx, oldestIDToDelete, /*inclusive=*/true); - opCtx->recoveryUnit()->waitUntilDurable(); } return; } |