Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1101

Support sending writeConcern for commands that write

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4
    • None
    • None

    Description

      When talking with server 3.4 or greater (maxWireVersion >=5), writeConcern is a supported option for all commands that write.
      The following methods and helpers should be updated to automatically pass writeConcern when maxWireVersion >= 5:

      Methods:

      • Collection.__create

      Helpers:

      • MongoClient.drop_database
      • Database.drop_collection
      • Collection.aggregate (when using $out)
      • Collection.create_indexes
      • Collection.create_index
      • Collection.ensure_index
      • Collection.drop_indexes
      • Collection.drop_index
      • Collection.map_reduce (when using $out)
      • Collection.reindex
      • Collection.rename

      Note:
      When the writeConcern on a command that writes fails, the resulting document still comes back with ok: 1. To check for write concern and raise the appropriate error, we need to check the result document for a writeConcernError field.

      Attachments

        Issue Links

          Activity

            People

              luke.lovett Luke Lovett
              rathi.gnanasekaran Rathi Gnanasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: