ExportXMLWordPrintableJSON

    • Needed
    • Hide

      Summary of necessary driver changes

      • Sync new unified tests

      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 Sync new unified tests Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/commit/775c4bce1bfe1c409b947eae1f3eab6975fccfe3 https://github.com/mongodb/specifications/commit/eb2ee1e529cf1c2fbf8bd54c32dc32c644306d0d includes a non-blocking follow-up to include errmsg in failpoint errors to match server behavior. Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6523 Fixed 1.30.15, 2.5.8
      CXX-3608 Ready for Work
      CSHARP-6271 In Code Review
      GODRIVER-4196 Ready for Work
      JAVA-6345 Fixed 5.15.0
      NODE-7914 Needs Triage
      PYTHON-6181 Done
      PHPLIB-1977 Fixed 2.5.1
      RUBY-3986 Fixed 2.26.1
      RUST-2527 Fixed 3.10.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 */ } #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-6523 Fixed 1.30.15, 2.5.8 CXX-3608 Ready for Work CSHARP-6271 In Code Review GODRIVER-4196 Ready for Work JAVA-6345 Fixed 5.15.0 NODE-7914 Needs Triage PYTHON-6181 Done PHPLIB-1977 Fixed 2.5.1 RUBY-3986 Fixed 2.26.1 RUST-2527 Fixed 3.10.0

      Summary

      The Read/Write Concern spec says drivers only SHOULD parse writeConcernError from server replies and report it. We should change this to MUST for helpers of commands that write.

      A write concern error (WCE) usually arrives on an ok:1 reply, for example during a primary stepdown, a shutdown or a wtimeout. A driver that does not check for it returns success for a write whose durability was never confirmed, and does not retry it. This already caused data loss in the Rust driver: a findAndModify reply of ok:1 plus a retryable WCE was returned as success, and the write was rolled
      back after the failover.

      Note: All drivers report WCE except for some edge cases.

      Motivation

      Who is the affected end user?

      Application developers who use MongoDB drivers with a replica set or sharded cluster and a write concern above `w:1`.

      How does this affect the end user?

      The driver reports success for a write that was not acknowledged at the requested durability level, or it does not retry a retryable error. The failure
      shows up later as lost or inconsistent data, which is much harder to diagnose than an exception.

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

      • A WCE on an `ok:1` reply is produced by stepdown, shutdown, interruption, `wtimeout` and unsatisfiable or unknown
        write concerns.
      • Primary stepdowns happen during maintenance, rolling upgrades and elections,

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

      • Silent data loss. A write that the driver reports as successful can be rolled back after a failover (RUST-2479)

        Is this issue urgent?

      Does this ticket have a required timeline? What is it?

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

       No.

      Acceptance Criteria

      Spec change + Tests

      First Implementer: Rust
      Second Implementer: C

            Assignee:
            Isabel Atkinson
            Reporter:
            Boris Dogadov
            Isabel Atkinson Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: