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

Implement findAndModify writeConcern support

    • Type: Icon: Improvement Improvement
    • 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-549 Done
      PYTHON-989 Done 3.2
      RUBY-1037 Done 2.2.0
      JAVA-908 Done 2.14.0, 3.2.0
      PERL-564 Done 1.2.0
      SCALA-213 Won't Fix
      PHPLIB-129 Done 1.0.0-beta2
      CXX-692 Done legacy-1.1.0-rc0
      CXX-693 Done 3.0.0-rc0
      CSHARP-1437 Done 1.11, 2.2
      PERL-597 Done 1.2.0
      RUST-20 Duplicate
      $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-549 Done PYTHON-989 Done 3.2 RUBY-1037 Done 2.2.0 JAVA-908 Done 2.14.0, 3.2.0 PERL-564 Done 1.2.0 SCALA-213 Won't Fix PHPLIB-129 Done 1.0.0-beta2 CXX-692 Done legacy-1.1.0-rc0 CXX-693 Done 3.0.0-rc0 CSHARP-1437 Done 1.11, 2.2 PERL-597 Done 1.2.0 RUST-20 Duplicate

      The Write Concern specification details the specifics of adding write concern to your driver for findAndModify.

      In short, when talking with server 3.2 or greater (maxWireVersion >=4), writeConcern should be added to the findAndModify command used from the CRUD spec helper methods findOneAndUpdate, findOneAndReplace, and findOneAndDelete.

      Important Note:

      When the writeConcern on findAndModify fails, the resulting document still comes back with ok: 1. This is the same as the write commands. 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.

            Assignee:
            barrie Barrie Segal
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: