[SERVER-32901] Pull the CollectionShardingState map out of ShardingState Created: 25/Jan/18 Updated: 30/Oct/23 Resolved: 29/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.3, 3.7.2 |
| Type: | Improvement | 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: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v3.6
|
||||
| Sprint: | Sharding 2018-01-29, Sharding 2018-02-12 | ||||
| Participants: | |||||
| Description |
|
Currently the map, which contains the CollectionShardingState(s) for each namespace is under the ShardingState and is protected by its mutex. This causes circular dependency between the two classes, breaks encapsulation and also adds more users to an already contended mutex. This map should be pulled as a separate ServiceContext decoration, private to CollectionShardingState. |
| Comments |
| Comment by Githook User [ 30/Jan/18 ] |
|
Author: {'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}Message: (cherry picked from commit b0308845c11c937bccc593feae84d9dd368bc9c9) |
| Comment by Githook User [ 29/Jan/18 ] |
|
Author: {'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}Message: |
| Comment by Githook User [ 29/Jan/18 ] |
|
Author: {'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}Message: Also gets rid of most usages of the std::string variant of |