If batch size is 0 for listCollections or listIndexes, don't include it in the cursor document

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.8.0
    • Affects Version/s: None
    • Component/s: Command Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently the batchSize property of ListCollectionsOperation and ListIndexesOperations is int and defaults to 0. Then when constructing the cursor document for listCollections or listIndexes, it includes the batchSize even if it's 0. This forces an extra round trip for these operations, as the result will contain no documents, and a getMore has to be done.

      The batch size should be excluded if it's 0.

      Fortuitously, it also exposed SERVER-34517.

            Assignee:
            Unassigned
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: