[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:
Depends
Duplicate
duplicates SERVER-74149 _rsConfigState should be protected by... Closed
Problem/Incident
is caused by SERVER-34249 Oplog query on uninitiated replica se... Closed
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 SERVER-74149, with the PR already approved. cc vishnu.kaushik@mongodb.com

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.

Generated at Thu Feb 08 06:17:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.