-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongoimport, mongorestore
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:
- Change the BulkBufferSize option's default value from 1000 to 100,000 for mongoimport and for mongorestore
- Adjust this BulkBufferSize range check in mongoimport
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.