-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: None
-
None
The Write Concern specification details the specifics of adding write concern to your driver for findAndModify.
In short, when talking with server 3.2 or greater (maxWireVersion >=4), writeConcern should be added to the findAndModify command used from the CRUD spec helper methods findOneAndUpdate, findOneAndReplace, and findOneAndDelete.
Important Note:
When the writeConcern on findAndModify fails, the resulting document still comes back with ok: 1. This is the same as the write commands. Hence, to check for write concern and raise the appropriate error to your users, you will need to check the resulting document for a writeConcernError field. If it is present, then writeConcern failed.
- depends on
-
CSHARP-1437 findAndModify take a write concern
- Closed
-
CXX-692 findAndModify take a write concern
- Closed
-
CXX-693 findAndModify take a write concern
- Closed
-
JAVA-908 Support write concern for findAndModify helpers
- Closed
-
PHPLIB-129 findAndModify take a write concern
- Closed
-
PYTHON-989 findAndModify support for writeConcern
- Closed
-
RUBY-1037 Support sending write concern to a findAndModify command
- Closed
-
RUST-20 Implement findAndModify writeConcern support
- Closed
-
NODE-549 findAndModify take a write concern
- Closed
- is duplicated by
-
DRIVERS-232 findAndModify accepts writeConcern
- Closed
- related to
-
CDRIVER-824 collection_find_and_modify() should apply the mongoc_collection_t write_concern
- Closed
-
SERVER-6558 findAndModify should take a write concern
- Closed