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.