ExportXMLWordPrintableJSON

    • Needed
    • Hide

      Summary of necessary driver changes

      •  

      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   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6495 Blocked
      CXX-3601 Blocked
      CSHARP-6252 Blocked
      GODRIVER-4181 Blocked
      JAVA-6330 Blocked
      NODE-7888 Blocked
      PYTHON-6150 Blocked
      PHPLIB-1974 Blocked
      RUBY-3975 Blocked
      RUST-2520 Blocked
      $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 */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6495 Blocked CXX-3601 Blocked CSHARP-6252 Blocked GODRIVER-4181 Blocked JAVA-6330 Blocked NODE-7888 Blocked PYTHON-6150 Blocked PHPLIB-1974 Blocked RUBY-3975 Blocked RUST-2520 Blocked

      Summary

      The CRUD spec's "Top-Level Errors" section states:

      When a top-level error is encountered and individual results and/or errors have already been observed, drivers MUST embed the top-level error within a BulkWriteException as the error field to retain this information.

      However, no unified or prose test in the spec suite exercises this requirement for the two cases it covers:

      1. a top-level error after individual write errors were observed.
      2. a top-level error after individual results (no errors) were observed.

      We found the Go driver violates both (https://jira.mongodb.org/browse/GODRIVER-4169), but the existing spec test suite caught neither. We're requesting coverage be added so this is enforced consistently rather than left to each driver to notice independently.

      Motivation

      Who is the affected end user?

      Application developers using bulkWrite across large/multi-batch writes where a later bulkWrite batch fails outright ({ok: 0}) after an earlier batch already produced either a write error or successful results.

      How does this affect the end user?

      An application that inspects partialResult/writeErrors might get an incomplete or misleading picture, with no error or signal that anything is missing.

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

      Edge case requiring batch-splitting (large enough input to span multiple bulkWrite commands) plus a later batch failing outright. Uncommon, but it is a realistic production scenario.

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

      Silent loss of diagnostic/result information the spec explicitly requires drivers to retain.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

      Acceptance Criteria

      1. A unified or prose test exists asserting that, when a bulkWrite batch fails with a write error and a subsequent batch fails with a top-level error, the resulting BulkWriteException/ClientBulkWriteException includes both the write error(s) and the top-level error (with its code/message/raw reply accessible).
      2. A unified or prose test exists asserting that, when a bulkWrite batch succeeds (producing observable results, no errors) and a subsequent batch fails with a top-level error, the resulting exception embeds the top-level error and partialResult reflects the results observed before the failure.

            Assignee:
            Qingyang Hu
            Reporter:
            Qingyang Hu
            Qingyang Hu Qingyang Hu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: