-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
_mongoc_write_command_execute() only applies the client's write concern if NULL is provided in its write concern argument. Therefore, libmongoc does not do any merging of write concerns (e.g. w=2 URI option will not get merged with a wTimeoutMS write method option at runtime).
Additionally, libmongoc's notion of MONGOC_WRITE_CONCERN_W_DEFAULT means that the "w" field is omitted when creating BSON for the write concern. It is used to depend on a server-side default (not inherit client options).
I believe this is contrary to how the 1.x driver works, as we inherit individual options from the client (and parent objects). We should check if any of the specs address this inheritance; however, I assume they're silent on the matter, since most only discuss collection-level methods.
Once we decide what inheritance model to support in Phongo, we should create relevant tests.
- depends on
-
PHPC-170 Don't set write concern on mongoc_bulk_operation_t unnecessarily
- Closed