summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_geo_near.h
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2018-11-29 09:56:42 -0500
committerCharlie Swanson <charlie.swanson@mongodb.com>2019-02-13 07:30:10 -0500
commit87194fbe0c24525bc1f2d674012fe6978eca77d2 (patch)
tree0f13b14046152f0b475ae16d9a95b5e2ba0c4cbb /src/mongo/db/pipeline/document_source_geo_near.h
parent69f26fa3798b0d7927858aa704243cdac676c6e9 (diff)
downloadmongo-87194fbe0c24525bc1f2d674012fe6978eca77d2.tar.gz
SERVER-38311 Change out merging strategy
Allows an $out stage to run in parallel on all shards if the target collection is sharded and so is the input collection to the aggregate.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_geo_near.h')
-rw-r--r--src/mongo/db/pipeline/document_source_geo_near.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mongo/db/pipeline/document_source_geo_near.h b/src/mongo/db/pipeline/document_source_geo_near.h
index fa9989fe5c7..f4136a5b4d1 100644
--- a/src/mongo/db/pipeline/document_source_geo_near.h
+++ b/src/mongo/db/pipeline/document_source_geo_near.h
@@ -35,7 +35,7 @@
namespace mongo {
-class DocumentSourceGeoNear : public DocumentSource, public NeedsMergerDocumentSource {
+class DocumentSourceGeoNear : public DocumentSource {
public:
static constexpr StringData kKeyFieldName = "key"_sd;
static constexpr auto kStageName = "$geoNear";
@@ -122,16 +122,9 @@ public:
BSONObj asNearQuery(StringData nearFieldName) const;
/**
- * This document source is sent as-is to the shards.
- */
- boost::intrusive_ptr<DocumentSource> getShardSource() final {
- return this;
- }
-
- /**
* In a sharded cluster, this becomes a merge sort by distance, from nearest to furthest.
*/
- MergingLogic mergingLogic() final;
+ boost::optional<MergingLogic> mergingLogic() final;
private: