diff options
Diffstat (limited to 'src/mongo/db/pipeline/mongos_process_interface.cpp')
-rw-r--r-- | src/mongo/db/pipeline/mongos_process_interface.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/mongos_process_interface.cpp b/src/mongo/db/pipeline/mongos_process_interface.cpp index 68aa5ae9d3d..effb02d4e6f 100644 --- a/src/mongo/db/pipeline/mongos_process_interface.cpp +++ b/src/mongo/db/pipeline/mongos_process_interface.cpp @@ -28,7 +28,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kQuery +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -298,6 +298,11 @@ BSONObj MongoSInterface::createCommandForTargetedShards( // notifies the shards that the mongoS is capable of merging streams based on resume token. // TODO SERVER-38539: the 'mergeByPBRT' flag is no longer necessary in 4.4. targetedCmd[AggregationRequest::kMergeByPBRTName] = Value(litePipe.hasChangeStream()); + + // For split pipelines which need merging, do *not* propagate the writeConcern to the shards + // part. Otherwise this is part of an exchange and in that case we should include the + // writeConcern. + targetedCmd[WriteConcernOptions::kWriteConcernField] = Value(); } targetedCmd[AggregationRequest::kCursorName] = @@ -415,10 +420,6 @@ MongoSInterface::DispatchShardPipelineResults MongoSInterface::dispatchShardPipe boost::optional<cluster_aggregation_planner::SplitPipeline> splitPipeline; if (needsSplit) { - LOG(5) << "Splitting pipeline: " - << "targeting = " << shardIds.size() - << " shards, needsMongosMerge = " << needsMongosMerge - << ", needsPrimaryShardMerge = " << needsPrimaryShardMerge; splitPipeline = cluster_aggregation_planner::splitPipeline(std::move(pipeline)); exchangeSpec = cluster_aggregation_planner::checkIfEligibleForExchange( |