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

Can't force PyMongo to send w=1 write concern

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 2.8, 3.0
    • None
    • None

    Description

      By default, PyMongo correctly calls the "insert" command with no writeConcern, and calls getLastError with no "w" argument.

      But PyMongo should include writeConcern of "w=1" with the insert command, or call getLastError with "w=1", if configured like this:

      MongoClient('mongodb://localhost?w=1').db.collection.insert({})

      Or if called like this:

      collection.insert({}, w=1)

      The purpose of sending w=1 is to override getLastErrorDefaults. Since getLastErrorDefaults are rarely, if ever, configured, this is a low-priority bug.

      Attachments

        Issue Links

          Activity

            People

              bernie@mongodb.com Bernie Hackett
              jesse@mongodb.com A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: