[SERVER-50472] Change SharedFuture tests to use InlineRecursiveCountingExecutor Created: 21/Aug/20  Updated: 29/Oct/23  Resolved: 24/Aug/20

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

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Fixed Votes: 0
Labels: thread-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service arch 2020-09-07
Participants:
Linked BF Score: 0

 Description   

Several SharedFuture tests add multiple continuations to the shared future while a background thread emplaces into the linked promise. This produced a race condition where the background thread might have to schedule() work for a continuation that's already been registered at the same time as the test thread is registering a new continuation. The InlineQueuedCountingExecutor, however, is not thread safe, and concurrent calls to schedule() on it can result in a data race and thus a test failure. We should switch these tests to use the InlineRecursiveCountingExecutor instead, which is thread safe.



 Comments   
Comment by Githook User [ 24/Aug/20 ]

Author:

{'name': 'Spencer T Brody', 'email': 'spencer@mongodb.com', 'username': 'stbrody'}

Message: SERVER-50472 Change SharedFuture tests to use InlineRecursiveCountingExecutor
Branch: master
https://github.com/mongodb/mongo/commit/19e66c4fae00740781d8a1a9edb514d3347b55ca

Generated at Thu Feb 08 05:22:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.