diff options
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.cpp')
| -rw-r--r-- | src/mongo/db/service_entry_point_mongod.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index d051dd015d5..9967fa79278 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -146,9 +146,16 @@ public: const repl::OpTime& lastOpBeforeRun, BSONObjBuilder& commandResponseBuilder) const override { - // Prevent waiting for writeConcern if the command is changing an unreplicated namespace. + // Prevent waiting for writeConcern if the command is changing only unreplicated namespaces. invariant(invocation); - if (!invocation->ns().isReplicated()) { + bool anyReplicatedNamespace = false; + for (auto& ns : invocation->allNamespaces()) { + if (ns.isReplicated()) { + anyReplicatedNamespace = true; + break; + } + } + if (!anyReplicatedNamespace) { return; } |
