[SERVER-66834] Zones created by defragmentation_util.js must always align with chunks Created: 27/May/22  Updated: 29/Oct/23  Resolved: 07/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.1, 6.0.3, 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0
Sprint: Sharding EMEA 2022-10-17
Participants:
Linked BF Score: 0

 Description   

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.



 Comments   
Comment by Githook User [ 14/Oct/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-66834 Zones created by defragmentation_util.js must always align with chunks

(cherry picked from commit 9dee997bd163ea0c0ab136ea74a95c58b1e70e98)
Branch: v6.0
https://github.com/mongodb/mongo/commit/83e3601a31bdaeee6908ca0342602b7987021a4d

Comment by Githook User [ 14/Oct/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-66834 Zones created by defragmentation_util.js must always align with chunks

(cherry picked from commit 9dee997bd163ea0c0ab136ea74a95c58b1e70e98)
Branch: v6.1
https://github.com/mongodb/mongo/commit/23e97da1316c159fa59c0469c49d35d84fec5a70

Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-66834 Zones created by defragmentation_util.js must always align with chunks
Branch: master
https://github.com/mongodb/mongo/commit/9dee997bd163ea0c0ab136ea74a95c58b1e70e98

Generated at Thu Feb 08 06:06:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.