[SERVER-59108] Resolve race with transaction operation not killed after step down Created: 04/Aug/21 Updated: 29/Oct/23 Resolved: 11/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.11, 4.2.18, 5.0.4, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xuerui Fa | Assignee: | Vesselina Ratcheva (Inactive) |
| 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: |
v5.0, v4.4, v4.2
|
||||||||||||||||||||||||
| Sprint: | Repl 2021-09-06, Repl 2021-09-20, Repl 2021-10-04, Repl 2021-10-18 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 70 | ||||||||||||||||||||||||
| Description |
|
In In the stepDown code path, we first acquire the RSTL, which is where we run the killOps thread to kill the opCtx of any commands that have the flag set. Only then do we update if we can accept non-local writes or not. As a result, it seems possible for the following to happen:
|
| Comments |
| Comment by Githook User [ 21/Oct/21 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: (cherry picked from commit 1b31e6ca3d25a35f31f48547aafe0ec33c8c9bfd) |
| Comment by Githook User [ 21/Oct/21 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: (cherry picked from commit 1b31e6ca3d25a35f31f48547aafe0ec33c8c9bfd) |
| Comment by Githook User [ 21/Oct/21 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: (cherry picked from commit 1b31e6ca3d25a35f31f48547aafe0ec33c8c9bfd) |
| Comment by Githook User [ 11/Oct/21 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: |