Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-367

Support new read preferences and tagged sets.

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Implementation should follow the (10gen internal) spec defined here:

      https://wiki.10gen.com/display/10GEN/Driver+Read+Semantics

      PLEASE NOTE: The definition of SECONDARY is changing due to this spec. The SECONDARY option now means the same thing as SECONDARY_ONLY. A SECONDARY_PREFERRED option is being added that matches what SECONDARY used to do. SECONDARY_ONLY is deprecated in PyMongo 2.3.

      These are the new preferences and their meaning:

      "PRIMARY":
      Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags.
      
      This is the default.
      
      "PRIMARY_PREFERRED":
      Read from primary if available, otherwise a secondary.
      
      "SECONDARY":
      Read from secondary if available, otherwise error.
      
      "SECONDARY_ONLY" (deprecated):
      Synonym for "SECONDARY"
      
      "SECONDARY_PREFERRED":
      Read from a secondary if available, otherwise read from the primary.
      
      "NEAREST":
      Read from any member.
      

      Also need to add better read preferences docs. A new examples page would probably be best.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: