summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands
diff options
context:
space:
mode:
authorwenqinYe <wenqin908@gmail.com>2023-03-14 14:29:33 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-14 15:56:40 +0000
commit65a48cde17452e11dc4a528118bf87ccca782fbb (patch)
treeca030c51383def5c2144e3e7c7687ac01f8e2217 /src/mongo/s/commands
parent14aab7104cf4c5a7a8b195119e1d693008ee2044 (diff)
downloadmongo-65a48cde17452e11dc4a528118bf87ccca782fbb.tar.gz
SERVER-67874: Remove config server code which upconverts all writeConcern to majority
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r--src/mongo/s/commands/cluster_write_cmd.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp
index 2343ce2c6d6..3d75dcc9eaf 100644
--- a/src/mongo/s/commands/cluster_write_cmd.cpp
+++ b/src/mongo/s/commands/cluster_write_cmd.cpp
@@ -511,13 +511,7 @@ bool ClusterWriteCmd::InvocationBase::runImpl(OperationContext* opCtx,
// The batched request will only have WC if it was supplied by the client. Otherwise, the
// batched request should use the WC from the opCtx.
if (!batchedRequest.hasWriteConcern()) {
- if (opCtx->getWriteConcern().usedDefaultConstructedWC) {
- // Pass writeConcern: {}, rather than {w: 1, wtimeout: 0}, so as to not override the
- // configsvr w:majority upconvert.
- batchedRequest.setWriteConcern(BSONObj());
- } else {
- batchedRequest.setWriteConcern(opCtx->getWriteConcern().toBSON());
- }
+ batchedRequest.setWriteConcern(opCtx->getWriteConcern().toBSON());
}
// Write ops are never allowed to have writeConcern inside transactions. Normally