[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:
Backports
Depends
Related
related to SERVER-47504 Prepopulate state for AuthzSessionExt... Closed
is related to SERVER-47545 isSelf should consider any host addre... Closed
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: SERVER-47515 Avoid finding self on replica set reconfig if config contents have not changed

(cherry picked from commit 83f98c05609c4559dfdaf384c5512b0100a9e1b5)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e33cb0c81df6901645788f1df484c2d492c08b1f

Comment by Githook User [ 28/Apr/20 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-47515 Avoid finding self on replica set reconfig if config contents have not changed
Branch: master
https://github.com/mongodb/mongo/commit/83f98c05609c4559dfdaf384c5512b0100a9e1b5

Generated at Thu Feb 08 05:14:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.