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-6523 Blocked
      CXX-3608 Blocked
      CSHARP-6271 Blocked
      GODRIVER-4196 Blocked
      JAVA-6345 Blocked
      NODE-7914 Blocked
      PYTHON-6181 Blocked
      PHPLIB-1977 Blocked
      RUBY-3986 Blocked
      RUST-2527 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-6523 Blocked CXX-3608 Blocked CSHARP-6271 Blocked GODRIVER-4196 Blocked JAVA-6345 Blocked NODE-7914 Blocked PYTHON-6181 Blocked PHPLIB-1977 Blocked RUBY-3986 Blocked RUST-2527 Blocked

      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:
            1 Start watching this issue

              Created:
              Updated: