-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Component/s: Read and Write Concern, URI Options
-
None
-
Needed
There is currently a lack of clarity for how a driver is to handle the case of negative w values in uris.
The uri spec says that w is a "non-negative integer" or a string. However, there is no test in the uri options for a negative w.
Per https://jira.mongodb.org/browse/SPEC-1457, uri spec similarly says that wtimeoutms is a "non-negative integer" and there is a test for wtimeoutms being a negative number, which results in a valid uri with a warning. This test conflicts with a read/write concern test for a negative wtimeoutms which expects this to be an error.
For w, there is no uri option test but there is a read/write concern spec test requiring w=-2 to be an error. Going by this test, the handling of w is inconsistent with the handling of wtimeoutms.
For clarity it will be helpful if the uri options tests included a test case for a negative w, or if read/write concern spec tests for w were changed to require the result be a valid uri with a warning, or if the uri options spec added a rationale stating why w=-2 is an error but wtimeoutms=-2 is a valid uri with a warning.
- related to
-
RUBY-1696 Add read/write concern spec runner & implement spec tests
- Closed
-
DRIVERS-2149 Read/write concern test's wtimeoutMS handling contrary to specification
- Backlog