[SERVER-58109] The new '_configsvrMergeChunks' path is more expensive than the old one Created: 27/Jun/21  Updated: 29/Oct/23  Resolved: 28/Jun/21

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

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
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
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Sharding EMEA 2021-06-28
Participants:

 Description   

As part of SERVER-56786 we changed the merge chunks commit path on the config server to iterate the chunks using this query. However, this query doesn't include the ns field and because of this it becomes a collection scan.

The query should be changed to (1) include the ns, (2) exclude the epoch and (3) exclude the max value and substitute it with $lt on the min field. That way it can be satisfied from the ns_1_shard_1_min_1 index directly instead of having to inspect the document.



 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 [ 29/Jun/21 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-58109 Make shardChunksInRangeQuery satisfiable from the index only

(cherry picked from commit eb23662b184243252347fabf99d7b1b9924743d0)
Branch: v4.0
https://github.com/mongodb/mongo/commit/5dbf53cee78762abf139fe837caa896b019d2c44

Comment by Githook User [ 29/Jun/21 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-58109 Make shardChunksInRangeQuery satisfiable from the index only

(cherry picked from commit ab8a0797f06940df4240a39f05e0bfdcc4c59481)
Branch: v4.2
https://github.com/mongodb/mongo/commit/eb23662b184243252347fabf99d7b1b9924743d0

Comment by Githook User [ 28/Jun/21 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-58109 Make shardChunksInRangeQuery satisfiable from the index only
Branch: v5.0
https://github.com/mongodb/mongo/commit/b70aa804059d5d05a72271e1956c5af357c5f19b

Comment by Githook User [ 28/Jun/21 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-58109 Make shardChunksInRangeQuery satisfiable from the index only
Branch: v4.4
https://github.com/mongodb/mongo/commit/ab8a0797f06940df4240a39f05e0bfdcc4c59481

Comment by Githook User [ 28/Jun/21 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-58109 Make shardChunksInRangeQuery satisfiable from the index only
Branch: master
https://github.com/mongodb/mongo/commit/cf7ea75a5626e2034302ae6f78a9890b15ebf56b

Comment by Kaloian Manassiev [ 28/Jun/21 ]

CodeReview (4.4): https://mongodbcr.appspot.com/777760001/

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