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

ListCollections does not use read preference primary

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical - P2 Critical - P2
    • 0.2.0
    • 0.1.0
    • Command & Dispatch
    • None

    Description

      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".

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: