Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-796

Support cursor in listCollections and listIndexes commands

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.8, 3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      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.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            barrie Barrie Segal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: