diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2017-08-07 15:07:47 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2017-08-08 19:04:30 +0100 |
commit | 9062f71621d053e32beec1061f708e3fd08b0158 (patch) | |
tree | 82fd151004fc4192126d71628e765e9257128feb /src/mongo/db/pipeline/document_source_sort.h | |
parent | 1dabf89e81b06b4d93a447e1fa5f6742b2f7afa1 (diff) | |
download | mongo-9062f71621d053e32beec1061f708e3fd08b0158.tar.gz |
SERVER-22760 Sharded aggregation pipelines which involve taking a simple union should merge on mongos
Diffstat (limited to 'src/mongo/db/pipeline/document_source_sort.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_sort.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_sort.h b/src/mongo/db/pipeline/document_source_sort.h index 866a3fb955c..5731051cbd3 100644 --- a/src/mongo/db/pipeline/document_source_sort.h +++ b/src/mongo/db/pipeline/document_source_sort.h @@ -57,6 +57,10 @@ public: // Can't swap with a $match if a limit has been absorbed, since in general match can't swap // with limit. constraints.canSwapWithMatch = !limitSrc; + + // Can run on mongoS only if this stage is merging presorted streams. + constraints.hostRequirement = (_mergingPresorted ? HostTypeRequirement::kAnyShardOrMongoS + : HostTypeRequirement::kAnyShard); return constraints; } |