Problem Statement/Rationale
Currently, when the BatchSize(0) option is used to request an immediate cursor (and no docs), the default BatchSize goes into effect for subsequent getMores and there's apparently no way to specify a custom BatchSize in this scenario.
(This is because BatchSize is being overloaded to both set the BatchSize and to request an immediate cursor on the first aggregation.)
This is problematic currently in ADL when we need to use BatchSize(0) but the number of docs returned in subsequent batches is so large that our processing exceeds server's cursor expiry threshold.
Proposed Change/Action
Support some mechanism to set BatchSize for subsequent getMores; or barring that, provide a new mechanism to get the first cursor without any docs and leave BatchSize for specifying all batch sizes.
Expected Impact
It will provide nice flexibility and allow them to more easily do things that are difficult now.
UX Notes (Acceptance Criteria)
Have the functionality of BatchSize(0) for requesting an immediate cursor and the ability to specify a custom BatchSize for subsequent getMores/Nexts.
Open Questions
If there are alternative ways of improving the situation, include that information here.
Additional Notes
Any additional information that may be useful to include.
- is cloned by
-
DRIVERS-1589 Allow changing BatchSize for getMores; needed when BatchSize(0) uses default size
- Backlog
- related to
-
GODRIVER-1605 Allow cursor options to be specified when using RunCommandCursor
- Closed