Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1593

Ensure that the WriteConcernError "errInfo" object is propagated

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

      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:
            Unassigned Unassigned
            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: