Page MenuHomePhabricator

init: don't start indexes sync thread prematurely
ClosedPublic

Authored by PiRK on Tue, Mar 4, 10:18.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4708298172e0: init: don't start indexes sync thread prematurely
Summary

By moving the 'StartIndexes()' call into the 'initload'
thread, we can remove the threads active wait. Optimizing
the available resources.

The only difference with the current state is that now the
indexes threads will only be started when they can process
work and not before it.

This is a partial backport of core#27607
https://github.com/bitcoin/bitcoin/pull/27607/commits/fcbdaeef4d5a63e3e5b479c6fcad730eb86fb923

Depends on D17748

Notes:

  • we diverge from the source material in init.cpp because of missing backports (core#27861 and ancestors) that are intentionally skipped because they depend on the massive multiprocessing project. This affects a single line, and a TODO has been added to explain the divergence.
  • the test changes in feature_index_prune.py are applicable in the next commit, in this commit they would break the tests
Test Plan

ninja all check check-functional-extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable