diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2017-08-01 23:15:53 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2017-08-02 14:15:37 +0100 |
commit | 27d43e300e292043fefd7634de99160157955a17 (patch) | |
tree | 31844a3949fd1c900b3f7e93929faea1671b0c9b /jstests/sharding/views.js | |
parent | 20c85d4848b4e4b3c88e1788eaff362143fffd20 (diff) | |
download | mongo-27d43e300e292043fefd7634de99160157955a17.tar.gz |
SERVER-18940 Optimise sharded aggregations that are targeted to a single shard
Diffstat (limited to 'jstests/sharding/views.js')
-rw-r--r-- | jstests/sharding/views.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/jstests/sharding/views.js b/jstests/sharding/views.js index 87a2938afac..4f066eaf72e 100644 --- a/jstests/sharding/views.js +++ b/jstests/sharding/views.js @@ -146,10 +146,14 @@ assert.eq(5, view.find({a: {$lte: 8}}).comment("agg_comment").itcount()); - profilerHasSingleMatchingEntryOrThrow(sdb, { - "command.aggregate": coll.getName(), - "command.fromRouter": true, - "command.comment": "agg_comment" + profilerHasSingleMatchingEntryOrThrow({ + profileDB: sdb, + filter: { + "command.aggregate": coll.getName(), + "command.comment": "agg_comment", + "command.needsMerge": true, + "command.pipeline.$mergeCursors": {$exists: false} + } }); st.stop(); |