Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-370

Ensure that the WriteConcernError "errInfo" object is propagated

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Description of Drivers Ticket:

      MongoDB 4.4 introduces a new "provenance" field to write concern errors, which describes the origin of the write concern associated with the error. For example:

      "writeConcernError" : {
          "code" : 64,
          "codeName" : "WriteConcernFailed",
          "errmsg" : "waiting for replication timed out",
          "errInfo" : {
              "wtimeout" : true,
              "writeConcern" : {
                  "w" : 2,
                  "wtimeout" : 1000,
                  "provenance" : "clientSupplied"
              }
          }
      }
      

      Though drivers should not parse the "errInfo" field of a writeConcernError, drivers must ensure that the provenance field is accessible to users so that developers/admins can be aware of situations such as custom write concern defaults causing wtimeouts, etc.

      SPEC-1578 makes explicit how a WriteConcernError should be constructed from a server reply. Drivers need to validate (or update if necessary) the logic for constructing WriteConcernError,  and implement a new prose test to validate a "provenance" is accessible from a WriteConcernError.
      See DRIVERS-967 for updated details.

            Assignee:
            utkarsh.mehta@mongodb.com Utkarsh Mehta (Inactive)
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: