[DRIVERS-229] Verify calling listDatabases, etc. via direct connection to secondary Created: 06/May/15  Updated: 15/Apr/19  Resolved: 04/Oct/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Barrie Segal
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on PYTHON-920 collection_names, options, and index_... Closed
depends on PYTHON-921 database_names prohibited on direct c... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-920 Done 2.8.1
PYTHON-921 Done 2.8.1
PHP-1444 Won't Fix

 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.



 Comments   
Comment by Rathi Gnanasekaran [ 04/Oct/16 ]

Closing this ticket as Won't fix as we will not be spending resources on legacy implementations.

Generated at Thu Feb 08 08:21:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.