[SERVER-42851] fix race condition in the TransactionCoordinatorCatalog.CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete test Created: 16/Aug/19 Updated: 29/Oct/23 Resolved: 21/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Lamont Nelson | Assignee: | Matthew Saltz (Inactive) |
| 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 | ||||
| Steps To Reproduce: | build/ninja/mongo/db/s/db_s_transaction_coordinator_test --filter CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete --suite TransactionCoordinatorCatalogTest --repeat=100000 |
||||
| Sprint: | Sharding 2019-08-26 | ||||
| Participants: | |||||
| Linked BF Score: | 11 | ||||
| Description |
|
This ticket is filed in response to BF-14376. The test assertion, and the code that removes the coordinator from the catalog are not synchronized, and could lead to the an execution where the assertion runs before the coordinator is removed. The CoordinatorsRemoveThemselvesFromCatalogWhenTheyComplete test waits on the future for the coordinator to complete and then checks if it is removed from the catalog. There is no coordination between the code that removes the coordinator from the catalog, which is an async callback that executes after the onCompletion future is ready, and the test assertion. Therefore, there are no ordering guarantees between the removal callback and the assertion code, which is what we see as the result of this build failure. |
| Comments |
| Comment by Matthew Saltz (Inactive) [ 21/Aug/19 ] |
|
Fixed as part of the following commit since it was required for the other ticket: Author: {'username': 'saltzm', 'email': 'matthew.saltz@mongodb.com', 'name': 'Matthew Saltz'}Message: |
| Comment by Matthew Saltz (Inactive) [ 20/Aug/19 ] |
|
This is required for another ticket I'm working on ( |