Support cursor in listCollections and listIndexes commands

XMLWordPrintableJSON

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

      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 Hackett
              Reporter:
              Barrie Segal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: