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

Make ThreadPool::join finish remaining tasks on a pristine thread instead of inline

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2017-07-31, Sharding 2017-08-21
    • 0

      Unit tests can run into trouble when tasks that create OperationContexts are run inline because the testing infrastructure may have already established an OperationContext and a Client cannot have more than one OperationContext associated with it.

      This is a problem for ShardServerCatalogCacheLoader unit testing, where the unit test ShardServerCatalogCacheLoaderTest inherits from ShardServerTestFixture that provides an operation context. Then the ShardServerCatalogCacheLoader destructor runs join on it's thread pool, which contains tasks that require and create OperationContexts.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: