Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-229

Verify calling listDatabases, etc. via direct connection to secondary

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: None
    • None

      In SERVER-15994, the listIndexes, listCollections, and listDatabases commands began requiring the slaveOk bit if the server is a secondary. This was particularly surprising in the case of listDatabases, since the command is many years old, and it broke PyMongo's database_names helper method via direct connection to a secondary (PYTHON-921).

      All drivers should check that they set the slaveOk bit when calling any of these three commands if they are directly connected to a mongod. That is, set the bit unless the client is connected to a replica set or a mongos.

      Drivers implementing the Server Selection Spec already act this way, but legacy implementations need to be validated.

            Assignee:
            barrie Barrie Segal
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: