Skip to content

Initial work to make optimizer multithreaded

Joao Pedro Lopes requested to merge optimizer_multithread into develop

This MR creates the initial work to make the optimizer work to be run in a thread pool.

  1. Follows the same "design" as the TransferService. Creates a thread pool and launch in parallel multiple executor tasks.
  2. It makes the optimizer to use the standard GenericDbIfce . This allows each OptimizerExecutor to use the single soci::connection_pool to manage the Database connections.
  3. The abstraction on the OptimizerDataSource is still kept. The only implementation of "datasource" is DbOptimizerDataSource which uses the GenericDbIfce of FTS

TODO:

  • Add a configurable size for the Optimizer Thread pool
  • Fix unit tests - This will be quite some work
  • Add more instrumentation - Logging how long it takes to optimize individual links and the general optimizer service run
  • Do some extra testing to see what happens if one of the thread in the pool gets a DB exception (The code handle it but needs to be checked)
Edited by Joao Pedro Lopes

Merge request reports

Loading