Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-52701

Integrate PrimaryOnlyServiceRegistry creation into ShardingMongodTestFixture

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 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:

      1. Grid executor pool, then
      2. 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.

            Assignee:
            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: