-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.3
-
Component/s: None
-
Environment:Ubuntu 12.04, node v0.10.10, mongodb v1.3.23
-
Empty show more show less
The read preference for the "db" mongo option is documented to be configurable via the object key "readPreference", but the node driver sets an internal options object with key "read_preference" and value "primary" by default whenever read preference is not set via the url. Furthermore, if read preference is set via the url, then "read_preference" is set to whatever value is provided.
This issue happens when using the MongoClient constructor.
This issue may effect 1.4 as well, as after looking at the source the issue does not appear to have been fixed.
I would also double check to make sure other option names are consistently defined. Additionally, option priorities should be well defined and deterministic.