Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
5.3.0, 5.2.0
-
None
-
None
-
Fully Compatible
-
ALL
-
Sharding EMEA 2022-01-24
-
134
Description
In balancer_defragmentation_merge_chunks.js we rely on an unordered bulk insert plus the action of the chunk splitter to create the initial chunks for the test collections.
Unfortunately in case of write operation burst (such as bulk insert) the chunk splitter is not guarantee to split all the chunks correctly. In fact if a write operation arrives while the auto splitter is still performing a split operation triggered by a previous write, the latter will be ignored by the auto splitter.
One possible solution would be to not use bulk insert to populate the collection and instead issue several standalone insert operation in a loop and waitForOngoingChunkSplits between each iteration so to guarantee a deterministic number of final chunks (auto split actions).