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

Support cursor in listCollections and listIndexes commands

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 2.8, 3.0
    • None
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: