Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-886

Optimize numberToReturn for OP_GET_MORE based on the limit

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9
    • Affects Version/s: 1.8.3
    • Component/s: Performance
    • None

      If an application requests a limit that turns out to be great than the number of documents returned from OP_QUERY, the driver should adjust the numberToReturn value for the OP_GET_MORE to ensure that no more documents are returned by the server than necessary. Example with a limit of 105:

      1. For OP_QUERY, set numberToReturn=105, and receive 101 documents in OP_REPLY (the driver already does this).
      2. For OP_GET_MORE, instead of setting numberToReturn=105, set it to 4.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: