[SERVER-71191] Deadlock between index build setup, prepared transaction, and stepdown Created: 08/Nov/22 Updated: 29/Oct/23 Resolved: 11/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1, 4.4.19, 5.0.15, 6.0.4, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Noma | Assignee: | Gregory Noma |
| 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: |
v6.1, v6.0, v5.0, v4.4
|
||||||||||||||||||||||||||||
| Sprint: | Execution Team 2022-11-14, Execution Team 2022-11-28 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 135 | ||||||||||||||||||||||||||||
| Description |
|
When setting up an index build, we take a collection MODE_X lock. This can lead to a deadlock if there is also a replication state transition along with a prepared transaction. The index builder holds the RSTL in MODE_IX with the state transition waiting to take the RSTL in MODE_X. The index builder can't acquire the collection lock however because a prepared transaction is holding the collection lock in MODE_IX. In particular this is an issue because the index builder is purposely not interrupted for the state transition. See |
| Comments |
| Comment by Githook User [ 28/Nov/22 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit f1203e555321e326b0621479bcc6b607c5854391) |
| Comment by Githook User [ 18/Nov/22 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit f1203e555321e326b0621479bcc6b607c5854391) |
| Comment by Githook User [ 16/Nov/22 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit f1203e555321e326b0621479bcc6b607c5854391) |
| Comment by Githook User [ 16/Nov/22 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit f1203e555321e326b0621479bcc6b607c5854391) |
| Comment by Githook User [ 11/Nov/22 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |