Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97679

QueryTester should not insert an empty list of documents

    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2024-12-09
    • 200

      QueryTester attempts to batch-insert documents by setting a soft limit for how big the BSON can get before sending the batch off. If the very last document happens to push the BSON over this limit, however, the function returns an indication that there should be another batch to insert. The subsequent call to insert finds no additional documents to insert, however, causing QueryTester to issue an insert with no documents. This leads to an error during the loading step.

      The loading step should instead be smart enough to realize when there are no more documents to insert and not actually issue an insert if the documents list is empty.

            Assignee:
            william.qian@mongodb.com William Qian
            Reporter:
            william.qian@mongodb.com William Qian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: