getMore command has wrong batchSize at end of query results

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.4.0
    • Affects Version/s: 1.3.0
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: