diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2020-01-15 01:19:58 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-15 01:19:58 +0000 |
commit | f22f71a0d3b10a8bfcf69d078621b240a67cf515 (patch) | |
tree | bac3f18ee89b0bbc813ce7c542e0b3fd01a800fc /src/mongo/db/write_concern.cpp | |
parent | 2149c69b419c26042b98229f5c289511ca0bad26 (diff) | |
download | mongo-f22f71a0d3b10a8bfcf69d078621b240a67cf515.tar.gz |
SERVER-45476 Don't consider applying RWC defaults on standalones
Diffstat (limited to 'src/mongo/db/write_concern.cpp')
-rw-r--r-- | src/mongo/db/write_concern.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/write_concern.cpp b/src/mongo/db/write_concern.cpp index dc49680b32d..c95a377ed9d 100644 --- a/src/mongo/db/write_concern.cpp +++ b/src/mongo/db/write_concern.cpp @@ -89,6 +89,7 @@ StatusWith<WriteConcernOptions> extractWriteConcern(OperationContext* opCtx, // received by shard and config servers should always have WC explicitly specified. if (serverGlobalParams.clusterRole != ClusterRole::ShardServer && serverGlobalParams.clusterRole != ClusterRole::ConfigServer && + repl::ReplicationCoordinator::get(opCtx)->isReplEnabled() && !opCtx->inMultiDocumentTransaction() && !opCtx->getClient()->isInDirectClient()) { auto wcDefault = ReadWriteConcernDefaults::get(opCtx->getServiceContext()) .getDefaultWriteConcern(opCtx); |