Starting with MongoDB 2.8, Database.collection_names gets its results by calling the listCollections command rather than querying the system.namespaces collection directly. This causes a regression in that the number of collection names returned is limited by the size of a single result document (currently 16MB). The listCollections command will be changed to return a cursor document. Database.collection_names will iterate that cursor to build the list it returns.
A similar issue exists with Collection.index_information, which was changed to use the listIndexes command. The listIndexes command will also be changed to return a cursor document. Collection.index_information will iterate that cursor to build the dict it returns.
This is not a backward breaking change since Database.collection_names and Collection.index_information will continue to return the types they currently return.
- is depended on by
-
DRIVERS-197 Support cursor in listCollections and listIndexes command
- Closed