[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: |
|
||||
| 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: |