[COMPASS-7462] Investigate changes in SERVER-82274: singleBatch find on a timeseries collection does not close cursor if batchSize is set Created: 15/Nov/23  Updated: 28/Nov/23  Resolved: 28/Nov/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-82274 singleBatch find on a timeseries coll... Closed
Documentation Changes: Not Needed

 Description   
Original Downstream Change Summary

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.



 Comments   
Comment by Rhys Howell [ 28/Nov/23 ]

No impact for devtools. Doesn't look like we're doing any batchSize sets either.

Comment by PM Bot [ 15/Nov/23 ]

Fix Version updated for upstream SERVER-82274:
7.3.0-rc0

Generated at Wed Feb 07 22:46:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.