[SERVER-42213] ephemeralForTest cursors need to be made thread_safe Created: 12/Jul/19  Updated: 27/Oct/23  Resolved: 04/Nov/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Eric Milkie
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-42925 idempotency tests have oplog visiblit... Closed
Operating System: ALL
Sprint: Execution Team 2019-11-04
Participants:
Linked BF Score: 14

 Description   

The EphemeralForTestRecordStore uses a mutex to control access to its _data->records member. However, EphemeralForTestRecordStore::Cursor and ::ReverseCursor get a direct reference to this member and do not lock the mutex when accessing it.

Furthermore, these classes cache an iterator to the structure, which is a std::map; in the case of a rollback these iterators will be invalid, and in the case of a delete they might be.



 Comments   
Comment by Eric Milkie [ 04/Nov/19 ]

The build failure was fixed with SERVER-42925 so there is nothing else to do here.

Comment by Eric Milkie [ 20/Aug/19 ]

Waiting for linked SERVER ticket to be diagnosed and fixed.

Comment by Eric Milkie [ 26/Jul/19 ]

We should do something to stem the failures caused by this issue.

Generated at Thu Feb 08 04:59:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.