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

command options not included in bson size estimate in opquery write commands

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.15.0
    • Component/s: libmongoc
    • Labels:
      None
    • Case:

      Description

      We split bulk writes into batches by creating and sending smaller individual write commands with subsets of the bulk write. We do this by adding the bulk write bson documents to each new write command until that write command is "full", so that we don't exceed the max bson size specified by the server. However, as of C driver 1.11, we append the write concern to the write command after we have deemed it "full." This can lead to an invalid bson document that exceeds the max bson size when it reaches the server.

      This bug was introduced in this change:
      https://github.com/mongodb/mongo-c-driver/commit/806cddb2acde03f5462460491f38fa21332b7d97#diff-48f831a7962c26b4ba6a9c1472b8184fL486

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.albertson Kevin Albertson
              Reporter:
              samantha.ritter Samantha Ritter (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: