[DRIVERS-2074] Should we parse wtimeoutMS when w <= 1? Created: 25/Jun/18  Updated: 25/Sep/23

Status: Backlog
Project: Drivers
Component/s: Read and Write Concern
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-80363 server default writeConcern is not ho... Closed
related to PHPC-1216 Always validate and apply wtimeoutMS ... Closed
is related to CDRIVER-2621 Write concern spec tests not running Closed
Driver Changes: Needed

 Description   

The wtimeoutMS as a valid number spec test considers that a URI with wtimeoutMS and no w value (default = 1) to be valid. Since wtimeoutMS only pertains to replication, I would consider that specifying it when w is <= 1 is a logical error.

I noticed this while looking at aefdd2b for CDRIVER-2621. libmongoc previously ignored wtimeoutMS in that case, which seemed more correct.

The only benefit I can see with the current behavior is that wtimeoutMS will always be parsed and ensure that the driver creates a non-empty write concern. In the event that the cluster has a default write concern, this will ensure that the client's write concern is sent and applied (even if wtimeoutMS has no effect).


Generated at Thu Feb 08 08:24:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.