[SERVER-72898] Investigate if updateShardIdentityConfigString can use MODE_IX lock Created: 17/Jan/23 Updated: 29/Oct/23 Resolved: 05/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jordi Olivares Provencio | Assignee: | Jordi Serra Torrens |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Sharding EMEA
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding EMEA 2023-04-17 | ||||||||
| Participants: | |||||||||
| Description |
|
As part of SERVER-71198 we found that ShardingInitializationMongoD::updateShardIdentityConfigString is taking a database MODE_X lock and then replacing a single document in a collection underneath it without holding any collection locks.{{{} Ideally in this situation we should only acquire a MODE_IX lock using AutoGetCollection for the target collection as we already provide document-level locking with WiredTiger. This would avoid the unnecessary strong lock on the database. |
| Comments |
| Comment by Githook User [ 05/Apr/23 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: |