Incorrect 'no secondary' error thrown

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It seems like the 'no secondary found in replicaset or invalid replica set name' error is thrown when the driver option `connectWithNoPrimary` is set and there is no secondary, even if it's possible to connect directly to the primary (or even when read preference is set to primary). 

       

      https://github.com/mongodb-js/mongodb-core/blob/master/lib/topologies/replset.js#L627

              Assignee:
              Daniel Aprahamian (Inactive)
              Reporter:
              Anna Herlihy (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: