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.
- is depended on by
-
MOTOR-19 Can't force Motor to send w=1 write concern
- Closed
-
DRIVERS-131 Drivers should only send {w:1} if and when the user has specified.
- Closed