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

Verify calling listDatabases, etc. via direct connection to secondary

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • # Replies:
      1
    • Last comment by Customer:
      false
    • SERVER fixVersion:
      3.0, 2.6

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  3 years, 9 weeks, 6 days ago
                  Date of 1st Reply: