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

Passive secondaries are not allowed for secondaryOnlyConnectionAllowed

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.43
    • Affects Version/s: 2.0.37
    • Component/s: None

      When connecting to a replicaset passive secondaries are not counted when obeying `secondaryOnlyConnectionAllowed`. In replset_state.js in mongodb-core if the server is passive it doesn't check to see if `secondaryOnlyConnectionAllowed` is set and true, it only does that for non-passive secondaries. There doesn't seem to be any reason why a passive secondary wouldn't be allowed to be the only connection.

      Also, the info log is incorrect for non-passive secondaries, it still says "promoting to passive" instead of "promoting to secondary".

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            fastest963 James Hartig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: