[SERVER-57057] Reduce routing info refreshes on the mergeChunks path Created: 19/May/21  Updated: 29/Oct/23  Resolved: 26/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.15, 4.4.7, 5.0.0-rc1, 4.0.26, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Simon Gratzer (Inactive) Assignee: Simon Gratzer (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-56786 There are three routing info refreshe... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Sharding EMEA 2021-05-31
Participants:

 Description   

 
The current mergeChunks path is very inefficient because:

It performs three sequential refreshes (router, shard-pre-merge and shard-post-merge)

All this makes the mergeChunks command very expensive both from latency and from impact on the config server points of view.

It would be much better if:

  • The router command:
    • Didn't do a refresh on entry, but relied on the cached information and the shardVersion (this has backwards compatibility implications)
  • The shard command (in order of importance):
    • Just checked the major shardVersion (for routing correctness, i.e., to make sure this shard owns that range)
    • Only did a refresh on the shard if the chunk bounds that the router sent didn't match with the cached info (this can only happen if a previous merge committed against the ConfigServer, but failed to refresh)

       



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 14/Jun/21 ]

Author:

{'name': 'Simon Graetzer', 'email': 'simon.gratzer@mongodb.com'}

Message: SERVER-57057 Reduce routing info refreshes on the mergeChunks path (BACKPORT-9472 )
Branch: v4.0
https://github.com/mongodb/mongo/commit/3526e237f3ad7cd30f6f9edad4d57cd06ad2d22d

Comment by Githook User [ 08/Jun/21 ]

Author:

{'name': 'Simon Gratzer', 'email': 'simon.gratzer@mongodb.com'}

Message: SERVER-57057 Reduce routing info refreshes on the mergeChunks path (BACKPORT-9471)
Branch: v4.2
https://github.com/mongodb/mongo/commit/fc67863fb1b57825114b1e2c9122518e541869c8

Comment by Githook User [ 01/Jun/21 ]

Author:

{'name': 'Simon Gratzer', 'email': 'simon.gratzer@mongodb.com'}

Message: SERVER-57057 Reduce routing info refreshes on the mergeChunks path (BACKPORT-9358)
Branch: v4.4
https://github.com/mongodb/mongo/commit/727cb006bc1723840d5cf98775d56f2b0eaca8a3

Comment by Githook User [ 31/May/21 ]

Author:

{'name': 'Simon Gratzer', 'email': 'simon.gratzer@mongodb.com'}

Message: SERVER-57057 Reduce routing info refreshes on the mergeChunks path (BACKPORT-9355)
Branch: v5.0
https://github.com/mongodb/mongo/commit/c8919927470786ac7c2a411258fd61304eef9c20

Comment by Githook User [ 26/May/21 ]

Author:

{'name': 'Simon Gratzer', 'email': 'simon.gratzer@mongodb.com'}

Message: SERVER-57057 Reduce routing info refreshes on the mergeChunks path
Branch: master
https://github.com/mongodb/mongo/commit/69fa6204e810606e33d08bad97fff273222b6531

Generated at Thu Feb 08 05:40:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.