Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1153

getMore command has wrong batchSize at end of query results

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.4.0
    • 1.3.0
    • libmongoc
    • None

    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.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: