OK, I think we (kind of) agree on how to ensure important indexes are
available.

>>Additionally, for "synchronous" indexes (property index and so on), I
>>would like to always create and reindex them asynchronously by default,

OK, I see that large branches are a problem.

Instead of using branches, what about:

* First switch the index to "building in progress" so that _queries_ don't
use it. 

* Build the index in multiple commits:
  - Traverse the repository, and
   - as soon as you have 1000 index changes in memory, commit them.
* Then continue to traverse, in a new transaction.
* Until the repository is fully traversed.
* Concurrent changes would update the index as normal.
* At the of the "index creation traversal", switch the index to "ready"

Regards,
Thomas

Reply via email to