From bc3e230523e4677e2f3fed64ea89c369182a9272 Mon Sep 17 00:00:00 2001 From: Charlie Swanson Date: Mon, 28 Aug 2017 15:10:42 -0400 Subject: SERVER-30704 Use ARM to merge agg cursors on mongos. --- jstests/aggregation/mongos_merge.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'jstests/aggregation/mongos_merge.js') diff --git a/jstests/aggregation/mongos_merge.js b/jstests/aggregation/mongos_merge.js index fe13b337930..fd49ef4c7e5 100644 --- a/jstests/aggregation/mongos_merge.js +++ b/jstests/aggregation/mongos_merge.js @@ -229,5 +229,22 @@ expectedCount: 100 }); + // Test that a pipeline whose merging half can be run on mongos using only the mongos execution + // machinery returns the correct results. + assertMergeOnMongoS({ + testName: "agg_mongos_merge_all_mongos_runnable_skip_and_limit_stages", + pipeline: [ + {$match: {_id: {$gte: -5, $lte: 100}}}, + {$sort: {_id: -1}}, + {$skip: 5}, + {$limit: 10}, + {$skip: 5}, + {$limit: 1}, + ], + batchSize: 10, + expectedCount: 1 + }); + // TODO SERVER-30882 Find a way to assert that all stages get absorbed by mongos. + st.stop(); -})(); \ No newline at end of file +})(); -- cgit v1.2.1