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

Fix ShardRegistry threadpool shutdown order

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.2, 6.0.0-rc0, 5.0.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.3, v5.0
    • Sharding EMEA 2022-03-21
    • 41

      The ShardRegistry periodic reloader is executed on the ShardRegistry::_executor and down in the stack calls ShardRegistry::_getDataAsync().get(opCtx) this last call will wait for the refresh of the underlying readThroughCache that will be executed on the ShardRegistry::_threadPool.

      So the _executor waits on the _threadPool, this means that during shutdown of the ShardRegistry we need first to shutdown the _threadPool and only after we can shutdown and join the _executor.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: