Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-920

collection_names, options, and index_information prohibited on direct connection to secondary with MongoDB 3.0+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.8
    • 2.8.1
    • None
    • None
    • Fully Compatible

    Description

      MongoDB 3.0 introduced commands to retrieve metadata, in place of queries on system collections. SERVER-15994 then changed the new commands to require the slaveOk bit be set when run against a secondary/slave. PyMongo 2.8's MongoClient calls these commands with read preference PRIMARY, ignoring the read preference configured at collection, command, or client level, and doesn't set the slaveOk bit. This leaves PyMongo 2.x users with no way to query metadata over a direct connection to a MongoDB 3.0+ secondary or slave. PyMongo 3.x already does the right thing.

      Attachments

        Issue Links

          Activity

            People

              bernie@mongodb.com Bernie Hackett
              jesse@mongodb.com A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: