-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
In the very specific case you run a command over a view with the configuration "db.runCommand({find: 'myview', filter: {}, singleBatch: true, batchSize: 1, limit: 1})" (with those flags and values specifically), in versions 7.2 and earlier the server will return a cursor. If you ran any getMores with that cursor it would return no results and the cursor would be closed. With this change, in v7.3 and beyond, the server will not return a cursor on that initial command.
Description of Linked Ticket
When using a TimeSeries collection if a find command has batchSize:1 and singleBatch:true the cursor returned is not closed, it reports a non-zero id. If the batchSize is omitted then the cursor will be closed. The same behavior is not observed for a typical collection, the id returned is always zero when singleBatch is set.
- depends on
-
SERVER-82274 singleBatch find on a timeseries collection does not close cursor if batchSize is set
- Closed