[SERVER-70785] data race on the _rsConfigState field inside waitUntilOpTimeForReadUntil Created: 24/Oct/22 Updated: 21/Feb/23 Resolved: 21/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Moustafa Maher | Assignee: | Kaitlin Mahar |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | repl-shortlist, tsan | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Sprint: | Repl 2023-03-06 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 14 | ||||||||||||||||||||
| Description |
|
We are accessing _rsConfigState inside ReplicationCoordinatorImpl::waitUntilOpTimeForReadUntil without holding the replicationCoordinator mutex which can lead to data race. |
| Comments |
| Comment by Ali Mir [ 21/Feb/23 ] |
|
It looks like this work is duplicated by |
| Comment by Samyukta Lanka [ 24/Oct/22 ] |
|
The impact of this race is not particularly severe, there will be some reads that are unnecessarily failed if a reconfig is going on at the same time as the read. However, it's not possible to go from an initialized config back to an uninitialized config, so there shouldn't be a chance of not failing a read that should be failed. As a result, we don't think the fix should be backported to any older versions. |