diff options
author | Benety Goh <benety@mongodb.com> | 2017-06-13 14:37:21 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2017-06-14 09:25:53 -0400 |
commit | be360921c168dc7436651543ed9ef705d981cf18 (patch) | |
tree | 9e738e10c4464e74aefa3b65b763fe6e0730227e | |
parent | 4a1ac90daf85f25e76adb7cdff460a32ce9df0bb (diff) | |
download | mongo-be360921c168dc7436651543ed9ef705d981cf18.tar.gz |
SERVER-29277 oplog entries are never generated for operations on drop-pending collections
-rw-r--r-- | src/mongo/db/repl/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator.cpp | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index c63f661058e..2bef90998b4 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -768,6 +768,7 @@ env.Library( LIBDEPS=[ 'optime', 'replication_process', + '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/util/net/hostandport', '$BUILD_DIR/mongo/util/decorable', diff --git a/src/mongo/db/repl/replication_coordinator.cpp b/src/mongo/db/repl/replication_coordinator.cpp index d9f5c3fe82a..5f5869cf164 100644 --- a/src/mongo/db/repl/replication_coordinator.cpp +++ b/src/mongo/db/repl/replication_coordinator.cpp @@ -73,6 +73,10 @@ bool ReplicationCoordinator::isOplogDisabledFor(OperationContext* opCtx, return true; } + if (!opCtx->writesAreReplicated()) { + return true; + } + if (nss.db() == "local") { return true; } @@ -81,7 +85,7 @@ bool ReplicationCoordinator::isOplogDisabledFor(OperationContext* opCtx, return true; } - if (!opCtx->writesAreReplicated()) { + if (nss.isDropPendingNamespace()) { return true; } |