-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Sharding NYC
-
1
Background/Problem
The PrimaryOnlyServiceRegistry relies on specific ordering for shutdown in sharding unit tests:
- Grid executor pool, then
- PrimaryOnlyServiceRegistry
This ordering is necessary because the PrimaryOnlyServiceRegistry waits to join all executors associated with specific service instances. If any of these network executors are waiting on network calls to be consumed from the mock network queue, then the PrimaryOnlyServiceRegistry will indefinitely hang.
Solution
The only way to solve this is to either consume all pending network calls before shutting down the test, or the more general case, to shut down the executor pool before shutting down the PrimaryOnlyServiceRegistry.
For this ticket, the solution will be to allow for the creation of a PrimaryOnlyServiceRegistry in ShardingMongodTestFixture, then ensure that proper shutdown ordering is maintained if a PrimayOnlyServiceRegistry was ever created.
Notes
A similar ticket will be created to more immediately address this issue in a BF, and will be linked below.
- is related to
-
SERVER-52658 Shut down the Grid's executor before shutting down the PrimaryOnlyServiceRegistry in resharding unit tests
- Closed