[SERVER-38511] Implement new stepdown sequence, gated by “closeConnectionsOnStepdown”. Created: 10/Dec/18 Updated: 29/Oct/23 Resolved: 23/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.8 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Gregory McKeon (Inactive) | Assignee: | Suganthi Mani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Repl 2018-12-17, Repl 2019-01-14, Repl 2019-01-28 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||||||
| Description |
|
Design: 1) Start a new kill thread which kills all user operations which have taken global IX, X and S lock in a repeated loop. 2) Wait until RSTL is acquired. 3) Stop the kill thread.
Tests should include:
|
| Comments |
| Comment by Githook User [ 23/Jan/19 ] |
|
Author: {'email': 'suganthi.mani@mongodb.com', 'name': 'Suganthi Mani', 'username': 'smani87'}Message: |
| Comment by Tess Avitabile (Inactive) [ 21/Dec/18 ] |
|
schwerin, geert.bosch, matthew.russotto, we decided to proceed with the solution where we repeatedly kill operations taking IX, X, and S locks in a loop while waiting to acquire the RSTL. geert.bosch suggested that we can kill operations in a separate thread, so that we do not need the ability to enqueue locks or check whether we have acquired the lock, and we decided to go with this suggestion. Other solutions we considered:
|
| Comment by Tess Avitabile (Inactive) [ 20/Dec/18 ] |
|
I think it is fine to continue implementation on this ticket according to the design for now. That is, we will have a single call to killAllWriteOperations() that kills operations holding IX and X locks, and we will stop closing connections on stepdown. This will allow us to start writing tests that we don't kill readers. Since this behavior will be guarded by the closeConnectionsOnStepdown flag, it is fine that it would cause deadlock with prepared transactions for now. Once we decide on the design, we can file another ticket to handle S locks and handle operations that attempt to acquire IX, X, and S locks after we have already killed operations. |