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

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

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

      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

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

              Created:
              Updated:
              Resolved: