Investigate and mitigate unexpected bulkWrite replies from the server

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Needed
    • None
    • C Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      MongoDB Java driver has been impacted by two server bugs, SERVER-113344 and SERVER-113026, and failed to parse the unexpected bulkWrite responses produced by these bugs.

      This ticket is to investigate whether the C driver is affected by the same server behavior when using client bulkWrite and mitigate the issue.

      On a sharded collection where the operation goes through the "without shard key" path (the filter does not contain the shard key):

      • SERVER-113344: For client bulkWrite with errorsOnly: true, the server still returns a successful per-operation result in the cursor instead of returning only errors.
        • In the Java driver, we now ignore such unexpected successful results in the cursor (we do not return them to the application).
      • SERVER-113026: For client bulkWrite with errorsOnly: falsenModified is not included by the server in the individual operation result (in the cursor).
        • In the Java driver, we now treat a missing nModified in this case as 0 when decoding.

      The Java driver previously hit parsing/decoding errors when it encountered these unexpected reply shapes. Reproduction steps are described in this document (they apply to both server issues): Link.

            Assignee:
            Unassigned
            Reporter:
            Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: