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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.5.12
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2017-07-31, Sharding 2017-08-21
    • 0

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: