[GODRIVER-1728] Send lower batchSize on getMore commands to unskip batchSize key in command monitoring tests Created: 25/Aug/20  Updated: 19/Jan/21  Resolved: 30/Nov/20

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to GODRIVER-1831 Find `Limit` Options not work in Mong... Closed
related to DRIVERS-956 Command monitoring find tests are out... Closed

 Description   

3.2+ servers support the find command and the limit option so the server will only return as many documents as needed to reach the limit even if the driver sends a higher batch size. However, per https://github.com/mongodb/specifications/blob/master/source/find_getmore_killcursors_commands.rst#behavior-of-limit-skip-and-batchsize, drivers should still set a lower batchSize on getMore commands if a full batch isn't required to reach the user-specified limit. Doing so should have no behavioral changes and will allow us to unskip the batchSize key in command monitoring test assertions because this behavior is tested by this command monitoring spec test: https://github.com/mongodb/specifications/blob/90d96dabac9c645f922f2fcad1940c5c9a83e2b7/source/command-monitoring/tests/find.json#L416.


Generated at Thu Feb 08 08:37:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.