The following functions have been implemented in CDRIVER-1322:
mongoc_collection_drop_with_write_concern
mongoc_database_drop_with_write_concern
mongoc_collection_drop_index_with_write_concern
mongoc_database_create_collection_with_write_concern
When max_wire_version >=5, these functions need to return false (or some other indication of failure) on writeConcernError and parse the error.
Create a new function: _mongoc_client_command_with_write_concern. Its code is just like mongoc_client_command_simple, except that, just before it calls _mongoc_client_command_with_stream:
if (server_stream->sd->max_wire_version >= WIRE_VERSION_CMD_WRITE_CONCERN &&
write_concern &&
!_mongoc_write_concern_is_default (write_concern))
...then it copies the command and appends the write concern to it.
Call this new private function from all the "_with_write_concern" public functions.
- depends on
-
CDRIVER-1322 Support sending writeConcern for commands that write
- Closed
- is depended on by
-
CDRIVER-1460 on writeConcernError, parse wc err and return false in commands that write
- Closed