-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
When talking with server 3.4 or greater (maxWireVersion >=5), writeConcern should be a supported option for commands that write.
Helpers for the following commands therefore must be updated to support the option. The list is ordered according to likelihood that a driver has a helper for the command.
- aggregate with $out
- copydb
- create
- createIndexes
- drop
- dropDatabase
- dropIndexes
- mapReduce with $out
- clone
- cloneCollection
- cloneCollectionAsCapped
- collMod
- convertToCapped
- emptyCapped
- renameCollection
- appendoplognote
- godInsert
- capTrunc
- reindex
- mergechunk
Note:
When the writeConcern on a command that writes fails, the resulting document still comes back with ok: 1. 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
-
PHPC-498 ReadPreference, ReadConcern, and WriteConcern should serialize to BSON
- Closed
- is depended on by
-
PHPLIB-229 Operations should not accept unsupported read concern options
- Closed
-
DRIVERS-290 Support sending writeConcern for commands that write
- Closed
- is related to
-
PHPLIB-129 findAndModify take a write concern
- Closed
- related to
-
PHPLIB-228 ReadConcern default should only be set when supported by the server
- Closed
-
PHPLIB-229 Operations should not accept unsupported read concern options
- Closed
-
PHPLIB-53 Create mapReduce command helper
- Closed
-
PHPLIB-254 Support maxTimeMS option for CreateIndexes operation
- Closed
-
PHPLIB-240 FindAndModify operations should not accept unsupported write concern options
- Closed