[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: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||
| Sprint: | Sharding 2020-03-09 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| 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: (cherry picked from commit eb81b49551d3fa7763c1a917bf210e497ef5bab7) |
| Comment by Githook User [ 28/Feb/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}Message: |
| Comment by Esha Maharishi (Inactive) [ 26/Feb/20 ] |
|
Note that the collection scan was removed under |