diff options
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index f97ebb90f04..0dae9ddaa05 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -1219,10 +1219,6 @@ void ReplicationCoordinatorImpl::_setMyLastAppliedOpTimeAndWallTime( _opTimeWaiterList.signalIf_inlock( [opTime](Waiter* waiter) { return waiter->opTime <= opTime; }); - if (opTime.isNull()) { - return; - } - // Update the local snapshot before updating the stable timestamp on the storage engine. New // transactions reading from the local snapshot should start before the oldest timestamp is // advanced to avoid races. @@ -1231,6 +1227,10 @@ void ReplicationCoordinatorImpl::_setMyLastAppliedOpTimeAndWallTime( // Notify the oplog waiters after updating the local snapshot. signalOplogWaiters(); + if (opTime.isNull()) { + return; + } + // Add the new applied optime to the list of stable optime candidates and then set the last // stable optime. Stable optimes are used to determine the last optime that it is safe to revert // the database to, in the event of a rollback via the 'recover to timestamp' method. If we are |