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

Support sending writeConcern for commands that write

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: