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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8, 3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 8, Python Sprint 9

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: