Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21797

Simplify find batching logic

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • Query F (02/01/16)

      The size of the result batch returned from a legacy OP_QUERY find or a find command is determined as follows:

      • If there is no batchSize set, add documents to the batch until the message size exceeds 1MB or we have 101 results.
      • If there is a batchSize set, add documents to the batch until the message size exceeds 4MB or we have enough documents to satisfy the user-provided batchSize.

      We should consider make the following improvements:

      • Always size the batch at 16MB, rather than sometimes using 1MB and sometimes using 4MB.
      • Enforce a maximum message size of 16MB, rather than stopping once we have exceeded 16MB.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: