Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2774

Raise default import/restore buffer size from 1000 to 100,000

    XMLWordPrintable

    Details

      Description

      Both mongoimport and mongorestore use the BufferedBulkInserter, which flushes when a doc limit is reached. This flush performs a bulk write, which had its limit raised as of 3.6:

      The number of operations in each group cannot exceed the value of the maxWriteBatchSize of the database. As of MongoDB 3.6, this value is 100,000.

      We should update the default limit to match the new one. The change should be simple:

      We could also check isMaster.maxWriteBatchSize directly, but that's probably not necessary since the driver will divide the batch into smaller groups if needed.

      mongomirror already has this defaulted to 100,000.

        Attachments

          Activity

            People

            Assignee:
            evgeni.dobranov Evgeni Dobranov
            Reporter:
            evgeni.dobranov Evgeni Dobranov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: