[SERVER-46001] Move checkShardingIndex outside shardCollection's read critical section on the primary shard Created: 05/Feb/20  Updated: 29/Oct/23  Resolved: 28/Feb/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.0.3, 4.2.0
Fix Version/s: 4.2.4, 4.0.17

Type: Improvement Priority: Major - P3
Reporter: Ritesh Saigal Assignee: Cheahuychou Mao
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 DOCS-13382 Advice scheduling a maintenance windo... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Sharding 2020-03-09
Participants:
Case:

 Description   

The shardCollection implementation on the primary shard contains at least one task, which performs collection scan while under the critical section, namely checkShardingIndex. This can cause a significant period of unavailability for a large collection.

This ticket is to inspect all the work which is performed under the critical section of shardCollection and ensure that it is held for the minimum time possible.



 Comments   
Comment by Githook User [ 28/Feb/20 ]

Author:

{'username': 'cheahuychou', 'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com'}

Message: SERVER-46001 Move checkShardingIndex outside shardCollection's read critical section on the primary shard

(cherry picked from commit eb81b49551d3fa7763c1a917bf210e497ef5bab7)
Branch: v4.0
https://github.com/mongodb/mongo/commit/8c52aff50122fd92dd3d8216b970cb00bd4a6345

Comment by Githook User [ 28/Feb/20 ]

Author:

{'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}

Message: SERVER-46001 Move checkShardingIndex outside shardCollection's read critical section on the primary shard
Branch: v4.2
https://github.com/mongodb/mongo/commit/eb81b49551d3fa7763c1a917bf210e497ef5bab7

Comment by Esha Maharishi (Inactive) [ 26/Feb/20 ]

Note that the collection scan was removed under SERVER-42390.

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