[SERVER-19001] Implement a ThreadPoolExecutor that satisfies the TaskExecutor interface Created: 16/Jun/15  Updated: 25/Jan/17  Resolved: 16/Jul/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.1.6

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-19000 Extract a new ThreadPool class from r... Closed
Related
related to SERVER-19359 Implement timed task execution with N... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 5 06/26/16, Sharding 7 08/10/15
Participants:

 Description   

This should be an executor that uses a pool of threads to execute work items.



 Comments   
Comment by Githook User [ 17/Jul/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Move RemoteCommandRequest/RemoteCommandResponse into task_executor_interface library.

Also, move those types into the executor namespace and remove the
RemoteCommandRunner interface type.
Branch: master
https://github.com/mongodb/mongo/commit/a104bc1eab07388a4dc5b9930ecdd355ea93dd87

Comment by Githook User [ 16/Jul/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Implementation of ThreadPoolTaskExecutor and basic tests.

In order to support deterministic unit testing, it was also necessary to
introduce a mock implementation of ThreadPool, executor::ThreadPoolMock,
that is tightly integrated with NetworkInterfaceMock to allow for
deterministic unit testing of things that use TaskExecutors.

To keep the ThreadPoolTaskExecutor from having to keep a dedicated
thread for handling scheduleAt(Date_t, ...) processing, a new method,
setAlarm, is introduced to NetworkInterface. setAlarm offers an
extremely relaxed contract, to maximize the number of legal implementations.
Branch: master
https://github.com/mongodb/mongo/commit/48f79b30ff75c6310869ea8d0e34925d5f63252f

Comment by Githook User [ 09/Jul/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Eliminate unnecessary potential race in the CallbackHandleComparsion executor unit test.

The test as previously written has a race condition if the executor is allowed
to execute multiple callbacks concurrently, since both completion callbacks set
the same status object. However, for this test, there is no need for them to set
the same status object.
Branch: master
https://github.com/mongodb/mongo/commit/7ec946113a15d80f0ace356451e7c3bb8e55819a

Comment by Githook User [ 09/Jul/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Minor changes to TaskExecutor::CallbackHandle etc.

Removal of unused methods, minor changes to method signatures.
Branch: master
https://github.com/mongodb/mongo/commit/a816f73752598789780ea7456ce6f9ded3a3a386

Comment by Githook User [ 30/Jun/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Missing changes from prior commit
Branch: master
https://github.com/mongodb/mongo/commit/2f79ff09cce53743a34ee9fdfa99981d4b12fd13

Comment by Githook User [ 30/Jun/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19001 Create common test infrastructure for testing TaskExecutor implementations.

This includes:

Comment by Githook User [ 26/Jun/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-19001 Make the replication executor own its thread pool

This change makes the replication executor manage its own thread. It also
adds uses of the replication executor to the shard registry as a temporary
workaround until ticket SERVER-19001 has been resolved.
Branch: master
https://github.com/mongodb/mongo/commit/649f043eaa8a1a984625a474f0134487fad9031b

Comment by Githook User [ 26/Jun/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-19001 Make the replication executor own its thread pool

This change makes the replication executor manage its own thread. It also
adds uses of the replication executor to the shard registry as a temporary
workaround until ticket SERVER-19001 has been resolved.
Branch: master
https://github.com/mongodb/mongo/commit/649f043eaa8a1a984625a474f0134487fad9031b

Generated at Thu Feb 08 03:49:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.