[SERVER-40297] AsyncWorkScheduler's join method does not guarantee that all scheduled future chains have ran Created: 22/Mar/19  Updated: 29/Oct/23  Resolved: 03/Apr/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.1.9
Fix Version/s: 4.1.10

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-39965 Make OutOfLineExecutor return a Statu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-04-08
Participants:
Linked BF Score: 29

 Description   

The TransactionCoordinator's destructor relies on joining the AsyncWorkScheduler in order to ensure that there are no more threads, which could be accessing it. However, the AsyncWorkScheduler unregisters the subordinate tasks' and network responses' handles before the full chain has finished executing, which causes a race condition where the destructor of TransactionCoordinator can finish running while the future chains are still running. This results in an access violation crash.



 Comments   
Comment by Githook User [ 03/Apr/19 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-40297 Make the TransactionCoordinator entirely futures-based
Branch: master
https://github.com/mongodb/mongo/commit/7575dac4abe7d5c6164b54487a81771cd3aad644

Comment by Githook User [ 01/Apr/19 ]

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}

Message: SERVER-40297 Make all TransactionCoordinatorDriver methods free functions

The TransactionCoordinatorDriver is not really a "driver", but just a
set of functions to perform asynchronous work. There isn't any state to
keep, so there is no need for them to be in a class.
Branch: master
https://github.com/mongodb/mongo/commit/907e4760487e081db031232d1f8326c0f8bdef68

Comment by Githook User [ 01/Apr/19 ]

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}

Message: SERVER-40297 Move the TransactionCoordinator data structures to a separate file
Branch: master
https://github.com/mongodb/mongo/commit/9dd07662bbe80415d90131fca2be6312166d6f39

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