summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/expression_context.h')
-rw-r--r--src/mongo/db/pipeline/expression_context.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/expression_context.h b/src/mongo/db/pipeline/expression_context.h
index c67ba4ab9b8..ad7052968c1 100644
--- a/src/mongo/db/pipeline/expression_context.h
+++ b/src/mongo/db/pipeline/expression_context.h
@@ -113,12 +113,18 @@ public:
// The explain verbosity requested by the user, or boost::none if no explain was requested.
boost::optional<ExplainOptions::Verbosity> explain;
- bool fromRouter = false;
+ bool fromMongos = false;
bool needsMerge = false;
- bool inRouter = false;
+ bool inMongos = false;
bool extSortAllowed = false;
bool bypassDocumentValidation = false;
+ // We track whether the aggregation request came from a 3.4 mongos. If so, the merge may occur
+ // on a 3.4 shard (which does not understand sort key metadata), and we should not serialize the
+ // sort key.
+ // TODO SERVER-30924: remove this.
+ bool from34Mongos = false;
+
NamespaceString ns;
std::string tempDir; // Defaults to empty to prevent external sorting in mongos.