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

Use separate thread pools for CatalogCache and its loaders

    • Fully Compatible
    • ALL
    • Sharding 2020-08-10
    • 45

      Currently a single threadpool is shared among the CatalogCache and its loaders. The problem is that the ShardServerCatalogCacheLoader needs to join its tasks to ensure that all the task-related operation contexts are destroyed in order to proceed with its destruction. At the same time the same ThreadPool is used also by the CatalogCache that uses ThreadClient to access the operationContext in its async tasks. These tasks needs to be joined in order to be able to destroy the ServiceContext.
      Since the same thread pool can be joined just once but two different components needs to join it, we can't actually use a common shared thread pool.

      The solution is to use a different threadpool for the CatalogCache and its loaders respectively until we will have a better framework to share thread pools among several components.

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

              Created:
              Updated:
              Resolved: