[SERVER-72918] Fix theoretical data race in transaction API test Created: 17/Jan/23 Updated: 29/Oct/23 Resolved: 18/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Jack Mulrow |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding NYC 2023-01-23 | ||||
| Participants: | |||||
| Linked BF Score: | 63 | ||||
| Description |
|
Transaction API unit test DoesNotWaitForBestEffortAbortIfCancelled accesses an unsynchronized member variable in the test's mocked transaction API client, which triggered a TSAN failure. The access happens when the transaction API using the mocked client should be blocked on a condition variable, so there shouldn't be a problem in practice, but we should add synchronization to the mock class to silence TSAN and follow best concurrency practices. |
| Comments |
| Comment by Githook User [ 18/Jan/23 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |
| Comment by Jack Mulrow [ 17/Jan/23 ] |
|
On closer look, I realized some tests don't guarantee the best effort abort has run when they expect that, so I'll also fix that in this ticket. |