Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-145

readPreference option names do not match documentation.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0
    • Affects Version/s: 1.3
    • Component/s: None
    • Labels:
    • Environment:
      Ubuntu 12.04, node v0.10.10, mongodb v1.3.23

      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.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            elibol Melih Elibol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: