-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
v6.1, v6.0
-
Sharding EMEA 2022-10-17
-
0
In the situation in which createAndDistributeChunks creates one chunk > 0 (min: {key: 0}, max: {key: $maxKey}) and then createRandomZones attempts to make 1 zone, the created zone will not line up with a chunk (the zone created will have bounds 0 --> 1000.
This can cause the defragmenter to merge over zones in the first phase which can lead to a less than optimal result by the end of defragmentation. This is fine in production, because the defragmenter will just be a little less than optimal if zones aren't respected at the start of defragmentation, but it can cause test failures when there are only 3 chunks created and 1 zone.
In order to prevent test failures, we should modify the behaviour of the defragmentation util to make sure that the zone we create always lines up with an existing chunk.