diff options
author | Moustafa Maher <m.maher@10gen.com> | 2021-06-02 01:21:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-04 19:07:24 +0000 |
commit | 914174babe1dc163615c0f031db8744aff7d2c8d (patch) | |
tree | 3147f74fb93bffa40c987f9e04143e365e40e1ea /src/mongo/s/commands/strategy.cpp | |
parent | b17e0a99632872e44684700978d55c01be1a7895 (diff) | |
download | mongo-914174babe1dc163615c0f031db8744aff7d2c8d.tar.gz |
SERVER-56694 implicit default majority write concern should set usedDefault=false
Diffstat (limited to 'src/mongo/s/commands/strategy.cpp')
-rw-r--r-- | src/mongo/s/commands/strategy.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index a50c52b77f4..5e35533fffc 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -648,7 +648,10 @@ Status ParseAndRunCommand::RunInvocation::_setup() { return appendStatusToReplyAndSkipCommandExecution({ErrorCodes::InvalidOptions, errorMsg}); } - bool clientSuppliedWriteConcern = !_parc->_wc->usedDefault; + // This is the WC extracted from the command object, so the CWWC or implicit default hasn't been + // applied yet, which is why "usedDefaultConstructedWC" flag can be used an indicator of whether + // the client supplied a WC or not. + bool clientSuppliedWriteConcern = !_parc->_wc->usedDefaultConstructedWC; bool customDefaultWriteConcernWasApplied = false; bool isInternalClient = (opCtx->getClient()->session() && |