OP_QUERY bulk write should not batch documents exceeding size of maxBsonObjectSize

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • 🔵 Done
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: