[CDRIVER-2234] _mongoc_uri_build_write_concern() should report unsupported "w" option as error Created: 07/Aug/17  Updated: 28/Oct/23  Resolved: 11/Sep/17

Status: Closed
Project: C Driver
Component/s: libmongoc, uri
Affects Version/s: 1.6.3
Fix Version/s: 1.9.0

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-782 Allow more detailed error reporting f... Closed

 Description   

When CDRIVER-782 added error reporting for URI parsing, it updated _mongoc_uri_assign_read_prefs_mode() to report errors for unsupported read preference modes. For consistency, _mongoc_uri_build_write_concern() should also report an error if the "w" option is unsupported (as-is, it only logs a warning). This appears to be the lone case that was missed in CDRIVER-782, since conflicts between "journal" and "w" are caught by mongoc_write_concern_is_valid() in mongoc_uri_new_with_error().



 Comments   
Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@emptysquare.net'}

Message:Merge pull request #438 from kevinAlbs/cdriver2234

CDRIVER-2234 Add error message for write concern during URI parse
Branch:master
https://github.com/mongodb/mongo-c-driver/commit/e2df2c006d15029df08e16d23652f01ae0ddce1f

Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'ajdavis', 'name': u'Kevin Albertson', 'email': u'kevin.albertson@10gen.com'}

Message:CDRIVER-2234 Add error message for write concern during URI parse
Branch:master
https://github.com/mongodb/mongo-c-driver/commit/7ffa3f05207555d691b162ea51b5d86ddf3bfa55

Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}

Message:CDRIVER-2234 obsolete comment
Branch:master
https://github.com/mongodb/mongo-c-driver/commit/6797dbe185fb89c0593b34e654b2fcb701591904

Generated at Wed Feb 07 21:14:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.