Details
-
New Feature
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.
Attachments
Issue Links
- is depended on by
-
PYTHON-368 mongos high availability and failover
-
- Closed
-