[SERVER-46258] Fix possible race in failWithErrorCodeInRuncommand failpoint Created: 19/Feb/20 Updated: 29/Oct/23 Resolved: 21/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jason Chan | Assignee: | Jason Chan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Repl 2020-02-24 |
| Participants: |
| Description |
|
The way that the failWithErrorCodeInRunCommand failpoint is currently implemented is possibly racey. The check against shouldFail only indicates the failpoint was active at that particular instant and it is possible that the failpoint gets turned off immediately after, meaning the following call to 'getData' will fassert. We should instead do something along the lines of
|
| Comments |
| Comment by Githook User [ 21/Feb/20 ] |
|
Author: {'username': 'jasonjhchan', 'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |