[CDRIVER-590] Support readPreference connection string option Created: 23/Mar/15  Updated: 08/Jan/24  Resolved: 08/Apr/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.1.4
Fix Version/s: 1.2-beta0

Type: New Feature Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPC-196 Implement getWriteConcern() and getRe... Closed
Related
is related to CDRIVER-580 Write concern with w=0 and j=true is ... Closed

 Comments   
Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: CDRIVER-590 Update mongoc_uri_get_read_prefs_t man page.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7220796b7677ea098eccf0a6af46bda6c0aec966

Comment by Githook User [ 07/Oct/15 ]

Author:

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

Message: CDRIVER-590 Move new mongoc_uri_get_read_prefs_t to proper ABI section.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b0eae7fc7d51486d5fc3605b8e7ecbc7e5e1a804

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-590: Deprecate mongoc_uri_get_read_prefs()

This also corrects the documentation to note that only read preference tags are returned in the BSON result.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/091de4d1dbef89f9b96042c6f7243749e639c91b

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-590: Support readPreference connection string option

This adds support for parsing the readPreference URI option. It also implements validation of the read preference and returns a NULL URI pointer on failure, similar to the write concern validation added by CDRIVER-580.

Unfortunately, mongoc_uri_get_read_prefs() was already taken for the API function that returns read preference tags from the URI. This commit adds a new function, mongoc_uri_get_read_prefs_t(), which returns the actual mongoc_read_prefs_t struct (now used by the client constructor).
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c425c5f020c1050cded2ecd4f997ce1461f6c68c

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: Merge branch 'pr-211' into 1.2.0-dev

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: CDRIVER-590 Update mongoc_uri_get_read_prefs_t man page.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/7220796b7677ea098eccf0a6af46bda6c0aec966

Comment by Githook User [ 07/Apr/15 ]

Author:

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

Message: CDRIVER-590 Move new mongoc_uri_get_read_prefs_t to proper ABI section.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/b0eae7fc7d51486d5fc3605b8e7ecbc7e5e1a804

Comment by Githook User [ 07/Apr/15 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-590: Deprecate mongoc_uri_get_read_prefs()

This also corrects the documentation to note that only read preference tags are returned in the BSON result.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/091de4d1dbef89f9b96042c6f7243749e639c91b

Comment by Githook User [ 07/Apr/15 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-590: Support readPreference connection string option

This adds support for parsing the readPreference URI option. It also implements validation of the read preference and returns a NULL URI pointer on failure, similar to the write concern validation added by CDRIVER-580.

Unfortunately, mongoc_uri_get_read_prefs() was already taken for the API function that returns read preference tags from the URI. This commit adds a new function, mongoc_uri_get_read_prefs_t(), which returns the actual mongoc_read_prefs_t struct (now used by the client constructor).
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/c425c5f020c1050cded2ecd4f997ce1461f6c68c

Comment by Jeremy Mikola [ 30/Mar/15 ]

PR is updated to remove unnecessary bson_t on the URI struct, per mira.carey@mongodb.com's request. Additionally, I added new symbols/documentation and deprecated the old URI getter.

There is one outstanding question in this thread about whether we want to abort URI initialization if the read preference is invalid (i.e. primary mode with tags), as we will do for invalid write concerns in 1.x once CDRIVER-580 is merged.

Comment by Jeremy Mikola [ 24/Mar/15 ]

https://github.com/mongodb/mongo-c-driver/pull/211

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