[SERVER-47515] Skip config validation if contents have not changed to avoid isSelf call during reconfig on step up Created: 13/Apr/20 Updated: 29/Oct/23 Resolved: 28/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 4.4.0-rc0, 4.5.1 |
| Fix Version/s: | 4.4.0-rc4, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | William Schultz (Inactive) | Assignee: | William Schultz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | safe-reconfig-related | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||
| Sprint: | Repl 2020-04-20, Repl 2020-05-04 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 41 | ||||||||||||||||||||
| Description |
|
We currently hold the RSTL while doing a reconfig on step up after drain mode completion. This can lead to a deadlock since we call isSelf when we are checking for ourselves in the config during config validation. This isSelf call may try to authenticate via a DBClientConnection call which can trigger a find on a collection that takes a MODE_IS lock. This conflicts with the RSTL and deadlocks. To avoid this we can skip config validation and the call to isSelf if the contents of the config (everything except version/term) have not changed, since the step up reconfig doesn't change the contents of the config. |
| Comments |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: (cherry picked from commit 83f98c05609c4559dfdaf384c5512b0100a9e1b5) |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: |