Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-290

Support sending writeConcern for commands that write

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • Labels:
      None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      NODE-729 Done 2.2.5
      PYTHON-1101 Done 3.4
      CSHARP-1688 Done 2.4
      PHPLIB-200 Done 1.1.0
      JAVA-2221 Done 3.4.0
      CXX-926 Won't Fix
      RUBY-1115 Done 2.4.0
      CDRIVER-1322 Done 1.5.0
      CXX-927 Done 3.1.0
      PERL-627 Done 1.6.0
      SCALA-246 Done
      RUST-35 Fixed 2.0.0-beta.2
      $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 */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion NODE-729 Done 2.2.5 PYTHON-1101 Done 3.4 CSHARP-1688 Done 2.4 PHPLIB-200 Done 1.1.0 JAVA-2221 Done 3.4.0 CXX-926 Won't Fix RUBY-1115 Done 2.4.0 CDRIVER-1322 Done 1.5.0 CXX-927 Done 3.1.0 PERL-627 Done 1.6.0 SCALA-246 Done RUST-35 Fixed 2.0.0-beta.2

      When talking with server 3.4 or greater (maxWireVersion >=5), writeConcern should be a supported option for commands that write.
      Helpers for the following commands therefore must be updated to support the option.

      These are commands that newly accept a writeConcern as of 3.4, for which driver helpers should be updated:

      • aggregate with $out
      • clone
      • cloneCollection
      • cloneCollectionAsCapped
      • collMod
      • convertToCapped
      • copydb
      • create
      • createIndexes
      • drop
      • dropDatabase
      • dropIndexes
      • reindex
      • mapReduce with out
      • renameCollection

      Note:

      When the writeConcern on a command that writes fails, the resulting document still comes back with ok: 1. Hence, to check for write concern and raise the appropriate error to your users, you will need to check the resulting document for a writeConcernError field. If it is present, then writeConcern failed.
      See the specs here for details on writeConcern with the generic command method. See the specs here for details on handling writeConcern with command helpers.

            Assignee:
            barrie Barrie Segal
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: