[SERVER-25551] Aggregation batchSize can't be set on subsequent getMore in the shell Created: 11/Aug/16 Updated: 14/Feb/18 Resolved: 12/Sep/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.14 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Ryder (Inactive) | Assignee: | Jonathan Reams |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Platforms 2016-08-26, Platforms 2016-09-19 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The wire protocol permits batchSize to be set for getMore's but there is no way to access this on a cursor returned by the 'aggregate' helper. The net result is that batchSize can be set only for the initial batch in aggregation, after that it is whatever fits in the 4MB getMore payload (or 16MB when 3.4 comes out, The documentation on the 'aggregate' helper method says:
Except that isn't possible either. Even if it were possible to construct an OP_GET_MORE manually in the shell, it requires knowledge of the cursor ID, which is not accessible when using the aggregate helper. This ticket is a request to expose a batchSize method on cursors returned by the collection object aggregate helper method. Note that some drivers at least already implement this in a much more natural way; C#, for example, implements a batchSize option to the aggregate method that applies for both the initial command and subsequent getMores, completely abstracting the silly shenanigans going on at the wire protocol. |
| Comments |
| Comment by Githook User [ 12/Sep/16 ] |
|
Author: {u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}Message: |