[SERVER-41838] Release RSTL if we choose not to commit a prepared transaction after reacquiring it Created: 20/Jun/19 Updated: 29/Oct/23 Resolved: 25/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc2, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Judah Schvimer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.2
|
||||||||
| Sprint: | Repl 2019-07-01 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 21 | ||||||||
| Description |
|
This is a bug when commitTransaction is being retried. A previous commitPreparedTransaction reacquires the RSTL and then fails due to a uassert. When it fails, it doesn't release the RSTL due to two phase locking, rather stashing the RSTL. A prepared transaction cannot hold the RSTL while stashed or else a deadlock with stepdown is possible. We should release the RSTL if we do not commit the prepared transaction (we can't fail but we can choose not to commit). |
| Comments |
| Comment by Githook User [ 25/Jun/19 ] |
|
Author: {'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah@mongodb.com'}Message: (cherry picked from commit 23bd9dc2cae50a9c1ae47fed7805db5da4f9583e) |
| Comment by Githook User [ 25/Jun/19 ] |
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: |