[CDRIVER-1153] getMore command has wrong batchSize at end of query results Created: 10/Mar/16  Updated: 10/Aug/16  Resolved: 24/Mar/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.3.0
Fix Version/s: 1.4.0

Type: Bug Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When I implemented find and getMore commands for MongoDB 3.2+ in CDRIVER-838, I wrote the getMore command to send the cursor's batchSize as the getMore command's "batchSize" parameter unconditionally.

The correct behavior is to send a batchSize of:

MIN (batchSize, limit - numberReceived)

Discovered while implementing command-monitoring tests CDRIVER-769.



 Comments   
Comment by Githook User [ 15/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1153 wrong batchSize with getMore cmd
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e4f4f89bd275e43d81c66c730254fbe0ec13829e

Generated at Wed Feb 07 21:11:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.