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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.8, 3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Bernie Hackett
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: