summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_aggregation_planner.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-10-26 17:11:18 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-02 09:58:44 +0000
commit7d8e64df2d2d56a821f638ef88aa619403d03d31 (patch)
tree6ada2d481c56b9754ec7848caf146cd94149148f /src/mongo/s/query/cluster_aggregation_planner.cpp
parent4d2dea00415bf02d2b32d0474c93d251ce6568cc (diff)
downloadmongo-7d8e64df2d2d56a821f638ef88aa619403d03d31.tar.gz
SERVER-44570 Add tripwire assertions (tassert)
Diffstat (limited to 'src/mongo/s/query/cluster_aggregation_planner.cpp')
-rw-r--r--src/mongo/s/query/cluster_aggregation_planner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/query/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp
index 3a703dba1f7..71b1bddaac8 100644
--- a/src/mongo/s/query/cluster_aggregation_planner.cpp
+++ b/src/mongo/s/query/cluster_aggregation_planner.cpp
@@ -723,7 +723,9 @@ Status dispatchPipelineAndMerge(OperationContext* opCtx,
// If we sent the entire pipeline to a single shard, store the remote cursor and return.
if (!shardDispatchResults.splitPipeline) {
- invariant(shardDispatchResults.remoteCursors.size() == 1);
+ tassert(4457012,
+ "pipeline was split, but more than one remote cursor is present",
+ shardDispatchResults.remoteCursors.size() == 1);
auto&& remoteCursor = std::move(shardDispatchResults.remoteCursors.front());
const auto shardId = remoteCursor->getShardId().toString();
const auto reply = uassertStatusOK(storePossibleCursor(opCtx,