[SERVER-37987] Use finer grained locks for on step up reads and writes Created: 07/Nov/18 Updated: 29/Oct/23 Resolved: 13/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.6 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Judah Schvimer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | prepare_durability | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Repl 2018-11-19 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Currently we do many reads and writes on step up to write to the oplog, drop temporary collections, and initialize sharding state. These are guarded by the GlobalLock in mode X but to remove that lock we need these reads and writes to take their own locks. |
| Comments |
| Comment by Judah Schvimer [ 13/Nov/18 ] |
|
These are the only new locks that need to be taken. I audited every other caller in the "on step up" hook and believe that they all take their own locks or use DBDirectClient which takes its own locks. |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: |