Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-735

ListCollections does not use read preference primary

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 0.2.0
    • Affects Version/s: 0.1.0
    • Component/s: Command & Dispatch
    • None

      The ListCollections database method passes through the database's read selector instead of constructing a new read selector for read preference primary. (Compare to how ListDatabases does it.)

      Because the constructed command adds read preference primary (despite possibly selecting a non-primary server), ListCollections run on a database with secondary read preference will fail with an error: "(NotMasterNoSlaveOk) not master and slaveOk=false".

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: