Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2975

Fix logic for determining whether to populate BulkWriteException.partialResult

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Bulk API
    • None
    • Needed
    • Hide

      Summary of necessary driver changes

      • Update logic for populating BulkWriteException.partialResult and sync the new test.
      • No changes required for drivers that have not yet implemented DRIVERS-716.

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes Update logic for populating BulkWriteException.partialResult and sync the new test. No changes required for drivers that have not yet implemented DRIVERS-716 . Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/commit/dc14887adb350a103747118e722466361b966894 Fixed duplicate test name: https://github.com/mongodb/specifications/commit/7517681e6a3186cb7f3114314a9fe1bc3a747b9f Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-5718 Fixed 1.28.1, 1.29.0
      CXX-3106 Backlog
      CSHARP-5283 Fixed 3.0.0
      GODRIVER-3349 In Code Review
      JAVA-5610 Done
      NODE-6384 Gone away
      MOTOR-1366 Duplicate
      PYTHON-4766 Fixed 4.11
      PHPLIB-1526 Backlog
      RUBY-3542 Backlog
      RUST-2037 Fixed 3.2.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-5718 Fixed 1.28.1, 1.29.0 CXX-3106 Backlog CSHARP-5283 Fixed 3.0.0 GODRIVER-3349 In Code Review JAVA-5610 Done NODE-6384 Gone away MOTOR-1366 Duplicate PYTHON-4766 Fixed 4.11 PHPLIB-1526 Backlog RUBY-3542 Backlog RUST-2037 Fixed 3.2.0

      Summary

      Fix logic for populating BulkWriteException.partialResult for ordered bulk writes.

      Motivation

      Quoting the bulk write spec:

      If any operations were successful (i.e. nErrors is less than the number of operations that were sent), drivers MUST record the summary count fields in a BulkWriteResult to be returned to the user or embedded in a BulkWriteException. Drivers MUST NOT populate the partialResult field in BulkWriteException if no operations were successful.

      nErrors may be less than the number of operations sent when no operation succeeded. For example, an ordered bulk write may send 2 operations and fail on the first. No operations succeeded, but nErrors reports 1. (See example with mongosh).

      See slack thread.

      Who is the affected end user?

      Implementers and users of MongoClient.bulkWrite (DRIVERS-716).

      How does this affect the end user?

      N/A?

      How likely is it that this problem or use case will occur?

      Certain?

      If the problem does occur, what are the consequences and how severe are they?

      N/A?

      Is this issue urgent?

      May be good to do before others implement DRIVERS-716.

      Is this ticket required by a downstream team?

      No?

      Is this ticket only for tests?

      No.

      Acceptance Criteria

      Account for ordered bulk writes in the logic for determining whether to populate BulkWriteException.partialResult.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Kevin Albertson Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: