-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
Right now the database_names command returns a list of the databases on a server (https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/mongo_client.py). In Mongo 3.2.13 they added the capability to return only the database names, without the stats. This allows it to not need locks in order to return the data. This came up because the data gatherer for DataDog does a database_names call. https://github.com/DataDog/integrations-core/blob/master/mongo/check.py (search cli.database_names).
Since the command itself just returns the names, then passing nameOnly : true in the options would reduce the lock profile required for the query to complete, resulting in an easy performance win for mongo versions supporting the argument. For versions which do not, it still completes, just does the current behavior.
- is depended on by
-
DRIVERS-403 Implement Database Enumeration spec
- Closed