Details
-
Task
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
Description
The existing tests for writeConcern imply that an empty document is a valid writeConcern to send to the server.
In fact, the default writeConcern is no writeConcern (i.e. don't send the writeConcern field at all). This has come up in the past related to drivers accidentally overriding getLastErrorDefaults. It is coming up again in relation to PM-900.
There have been two bugs filed and fixed in drivers related to this - CDRIVER-2273 and PYTHON-1523. Other drivers may have the same bug, since our existing tests don't catch it.
Please add tests to ensure that drivers don't add the writeConcern option with an empty document to write commands when the application has not specified a write concern.