Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3310

OP_QUERY bulk write should not batch documents exceeding size of maxBsonObjectSize

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      As noted in the review of CDRIVER-3230, our logic for batching write operations for OP_QUERY seems a little off. We fit in as many documents as we can into maxBsonObjectSize + 16K allowance, but really, our logic should be:

      1. Add bulk write documents to current batch until we reach maxBsonObjectSize
      2. Add our command metadata (check that the metadata itself does not exceed 16K allowance)
      3. Send, and start new batch

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: