[SERVER-70793] Make database metadata refresh first check new metadata under the IS lock before taking X lock Created: 24/Oct/22 Updated: 29/Oct/23 Resolved: 08/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1, 5.0.14, 6.0.4, 6.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Antonio Fuschetto |
| 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: |
v6.1, v6.0, v5.0
|
||||||||||||
| Sprint: | Sharding EMEA 2022-11-14 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
`onDbVersionMismatch`, when not invoked with a `receivedDbVersion`, after getting the latest metadata from the configsvr will unconditionally attempt to acquire the DB lock in MODE_X, even if the received metadata is not newer than the cached one. Taking the DB lock in MODE_X is expensive, as it serialized with any ongoing writer or transaction on that db. This causes stalls on the user workload. Before |
| Comments |
| Comment by Githook User [ 10/Nov/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 09/Nov/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 09/Nov/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 08/Nov/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |