Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2831

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

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8.0
    • Affects Version/s: None
    • Component/s: Command Operations
    • Labels:
      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 Unassigned
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: