From 65a48cde17452e11dc4a528118bf87ccca782fbb Mon Sep 17 00:00:00 2001 From: wenqinYe Date: Tue, 14 Mar 2023 14:29:33 +0000 Subject: SERVER-67874: Remove config server code which upconverts all writeConcern to majority --- src/mongo/s/commands/cluster_write_cmd.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/mongo/s/commands') 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 -- cgit v1.2.1