[SERVER-54353] Wait for ServiceExecutorFixed to join in ServiceStateMachineTest Created: 05/Feb/21  Updated: 29/Oct/23  Resolved: 07/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc2, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-57427 Avoid special-case handling in Servic... Closed
related to SERVER-57445 Make join() a private member of Servi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Service Arch 2021-06-14
Participants:
Linked BF Score: 124
Story Points: 3

 Description   

Some of the tests in ServiceStateMachineTest schedule tasks on ServiceExecutorFixed (e.g., ServiceStateMachineWithBorrowedThreadsTest). This is to run the tasks scheduled by ServiceStateMachine on the fixed thread-pool (see here).

Since we don't currently wait for the fixed thread-pool to join before destroying the ServiceStateMachineTest test-fixture (see here), there's a possibility to destroy the service context before destroying all clients, thus hitting this invariant invariant(_clients.empty());.

Acceptance criteria: retire all tasks on fixed thread-pool before calling the destructor for ServiceStateMachineTest.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 11/Jun/21 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-54353 ServiceStateMachineTest.tearDown: join ServiceExecutors and _threadPool.

(cherry picked from commit a837822905c14bf8945a3f1a7fab44c4c89501ec)
Branch: v5.0
https://github.com/mongodb/mongo/commit/edc2c65a98f15ca4f77a7ddcc7e235bac05f26d6

Comment by Githook User [ 07/Jun/21 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-54353 ServiceStateMachineTest.tearDown: join ServiceExecutors and _threadPool.
Branch: master
https://github.com/mongodb/mongo/commit/a837822905c14bf8945a3f1a7fab44c4c89501ec

Comment by Billy Donahue [ 02/Jun/21 ]

Code Review: https://mongodbcr.appspot.com/765780009/

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