-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
Fully Compatible
-
Repl 2024-07-22, Repl 2024-08-05, Repl 2024-08-19, Repl 2024-09-02, Repl 2024-09-16, Repl 2024-09-30, Repl 2024-10-14, Repl 2024-10-28
-
200
Since each index on a collection results in an additional insert at the storage layer, we should reduce our maximum batch size when a collection has more indexes. I would propose we take the value of the kInternalInsertMaxBatchSizeDefault parameter double it (because it was tuned assuming one index, _id), and divide by the number of indexes (when we start) plus 1, and perhaps also have a lower limit of kInternalInsertMaxBatchSizeDefault/10.