-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: None
-
None
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 servers 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.
- clones
-
GODRIVER-1900 Add SetBatchSize method to driver.BatchCursor
- Closed
- is depended on by
-
PYTHON-2561 Remove CommandCursor.batch_size
- Closed
- is related to
-
PYTHON-2563 Deprecate CommandCursor.batch_size
- Closed
-
DRIVERS-1992 Set 0 for batchsize for initial change stream
- Closed
- related to
-
GODRIVER-1605 Allow cursor options to be specified when using RunCommandCursor
- Closed