[SERVER-80488] Avoid traversing routing table in balancer split chunk policy Created: 29/Aug/23  Updated: 29/Oct/23  Resolved: 30/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.2.24, 7.0.0, 7.1.0-rc0, 4.4.24, 5.0.20, 6.0.9
Fix Version/s: 4.2.25, 5.0.21, 4.4.25, 7.2.0-rc0, 7.0.2, 7.1.0-rc1, 6.0.11

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: balancer-round-perf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-74584 Splitting chunks for zone violations ... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0, v5.0, v4.4, v4.2
Sprint: Sharding EMEA 2023-09-04
Participants:

 Description   

The balancer,  in every balancing round, check if there are chunks that need to be split to enforce zone boundaries. This means that for every collection we call createCollectionDistributionStatus , this function is very expensive because it build an in-memory representation of all the chunks and tags for the collection. Thus it is linear in the size of the routing table plus the number of tags.

To enforce zones boundaries, actually there is no need to build the in-memory representation of the routing table, thus we could simply skip that and build only the zone map.



 Comments   
Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy

(cherry picked from commit b240d65340aabb39f1756467c4c6f68c55e57e9a)
Branch: v4.2
https://github.com/mongodb/mongo/commit/9f22a4e18e7f5538386f524dff592ebc7ebfeb3e

Comment by Githook User [ 06/Sep/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy

(cherry picked from commit 4fad44a858d8ee2d642566fc8872ef410f6534e4)

Remove addTagsFromCatalog
Branch: v7.0
https://github.com/mongodb/mongo/commit/3061e9101263d573e591cb7d23e8d3ad860e6f79

Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy

(cherry picked from commit a108b54e288c395928c283e49fc2e37dcb1b85eb)
Branch: v7.1
https://github.com/mongodb/mongo/commit/fe7a23455ab081d52332c840d15a103a6bafcc31

Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy

(cherry picked from commit 4fad44a858d8ee2d642566fc8872ef410f6534e4)

Remove addTagsFromCatalog
Branch: v6.0
https://github.com/mongodb/mongo/commit/65c6ce70138685160b3ea88a9de787f210255617

Comment by Githook User [ 01/Sep/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy
Branch: v4.4
https://github.com/mongodb/mongo/commit/b240d65340aabb39f1756467c4c6f68c55e57e9a

Comment by Githook User [ 30/Aug/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy
Branch: master
https://github.com/mongodb/mongo/commit/a108b54e288c395928c283e49fc2e37dcb1b85eb

Comment by Githook User [ 30/Aug/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-80488 Avoid traversing routing table in balancer split chunk policy
Branch: v5.0
https://github.com/mongodb/mongo/commit/4fad44a858d8ee2d642566fc8872ef410f6534e4

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