[SERVER-30254] Make ThreadPool::join finish remaining tasks on a pristine thread instead of inline Created: 21/Jul/17  Updated: 30/Oct/23  Resolved: 17/Aug/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.5.12

Type: Improvement Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Gantt Dependency
has to be done before SERVER-28793 Create primary mode unit tests for Sh... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-07-31, Sharding 2017-08-21
Participants:
Linked BF Score: 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.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 17/Aug/17 ]

Moving split_chunk_test re-enablement to a separate ticket, SERVER-30718, so this thread pool fix can be correctly marked fixed.

Comment by Dianna Hohensee (Inactive) [ 07/Aug/17 ]

Recommitted, moving the mutex lock from here to here

Comment by Githook User [ 07/Aug/17 ]

Author:

{'username': 'DiannaHohensee', 'email': 'dianna.hohensee@10gen.com', 'name': 'Dianna Hohensee'}

Message: SERVER-30254 Make ThreadPool::join finish remaining tasks on a pristine thread instead of inline
Branch: master
https://github.com/mongodb/mongo/commit/97cd566405fcdce0dc24389ad34dac54a0680612

Comment by Githook User [ 07/Aug/17 ]

Author:

{'username': 'DiannaHohensee', 'email': 'dianna.hohensee@10gen.com', 'name': 'Dianna Hohensee'}

Message: Revert "SERVER-30254 Make ThreadPool::join finish remaining tasks on a pristine thread instead of inline"

This reverts commit 1cf5b5612d942e948c9a78115fc8980a10bbeca5.
Branch: master
https://github.com/mongodb/mongo/commit/12fd177204d89de3c7d5daabac1000008bc5c630

Comment by Githook User [ 07/Aug/17 ]

Author:

{'username': 'DiannaHohensee', 'email': 'dianna.hohensee@10gen.com', 'name': 'Dianna Hohensee'}

Message: SERVER-30254 Make ThreadPool::join finish remaining tasks on a pristine thread instead of inline
Branch: master
https://github.com/mongodb/mongo/commit/1cf5b5612d942e948c9a78115fc8980a10bbeca5

Comment by Githook User [ 28/Jul/17 ]

Author:

{'email': 'dianna.hohensee@10gen.com', 'username': 'DiannaHohensee', 'name': 'Dianna Hohensee'}

Message: SERVER-30254 temporarily disabling split_chunk_test.cpp until the fix is committed
Branch: master
https://github.com/mongodb/mongo/commit/968590a7bc988482226948a12a3838bdda7cca9d

Generated at Thu Feb 08 04:23:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.