Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1773

Reduce batchSize for getMore commands to match number of required documents

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      For 3.2+ servers, if we run a "find" with limit=4 and batchSize=3 and iterate the resulting cursor, we'll send both a "find" and a "getMore" with batchSize=3. For the getMore, we can technically reduce the batchSize to 1 because we only need 1 document to satisfy the limit.

      This is not a correctness issue because 3.2+ servers maintain the limit server-side so they will close the cursor automatically once it has been exhausted. One of the command monitoring spec tests relies on this behavior, though, so we're currently skipping it because we don't do this.

            Assignee:
            Unassigned Unassigned
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: