[CDRIVER-2039] Document readPreferenceTags Created: 06/Feb/17  Updated: 20/Apr/17  Resolved: 20/Apr/17

Status: Closed
Project: C Driver
Component/s: docs
Affects Version/s: None
Fix Version/s: 1.7.0

Type: Improvement Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Documentation for Read preference tags (tag_sets) seems to be missing.

Examples on how to provide them (and how they are parsed) through the uri would be nice:
http://mongoc.org/libmongoc/current/mongoc_uri_t.html

The Connection String Spec has this to say:

  - Lists:                                                                                
      Repeated keys represent a list in the Connection String consisting of the corresponding values in the same order as they appear in the Connection   String. For example::
                                                                                          
        ?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=  
  - Key value pairs:                                                                      
      A value that represents one or more key and value pairs. Multiple key value pairs are delimited by a comma (","). The key is everything up to the   first colon sign (":") and the value is everything afterwards. If any keys or values containing a comma (",") or a colon (":") they must be URL enco  ded. For example::
                                                                                          
        ?readPreferenceTags=dc:ny,rack:1                                                  
                                                                                       

The mongoc_read_prefs_set_tags could also use an example as its not entirely immediately obvious how multiple tags works.
http://mongoc.org/libmongoc/current/mongoc_read_prefs_set_tags.html



 Comments   
Comment by Githook User [ 20/Apr/17 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-2039 Document readPreferenceTags
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a1f436c697fbec8fb51e0ab673efa6c3d4f69bc4

Comment by A. Jesse Jiryu Davis [ 13/Feb/17 ]

When the C Driver has its "Driver Docs Playbook" implemented by docs team it'll include an example like this?

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