Reduce batchSize for getMore commands to match number of required documents

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: