Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2039

Document readPreferenceTags

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.7.0
    • None
    • docs
    • None

    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

      Attachments

        Activity

          People

            bjori Hannes Magnusson
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: