diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2015-10-06 17:20:41 -0400 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2015-10-12 12:26:16 -0400 |
commit | f3f46acbb54a505d91505bd5908fe8424ecc5bcd (patch) | |
tree | d3f2a27f72d2d44faedb71f06b2fc5da5680bf82 /src/mongo/db/repl/sync_tail.cpp | |
parent | 644e0a886850763603de5c40498c26f78c1f4751 (diff) | |
download | mongo-f3f46acbb54a505d91505bd5908fe8424ecc5bcd.tar.gz |
SERVER-20655: truncate oplog when recovering from failed batch
Diffstat (limited to 'src/mongo/db/repl/sync_tail.cpp')
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index 47d2b4edd5b..548a3928432 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -46,6 +46,7 @@ #include "mongo/db/commands/fsync.h" #include "mongo/db/commands/server_status_metric.h" #include "mongo/db/concurrency/write_conflict_exception.h" +#include "mongo/db/dbhelpers.h" #include "mongo/db/curop.h" #include "mongo/db/db_raii.h" #include "mongo/db/global_timestamp.h" @@ -435,6 +436,7 @@ void SyncTail::oplogApplication() { OperationContextImpl txn; OpTime originalEndOpTime(getMinValid(&txn).end); + while (!inShutdown()) { OpQueue ops; |