Avoid index downtime during updates
We currently move the index aside during updates and create a new index in place which is necessary since the index schema could have changed and do not perform schema migration for the index (as it is derived from the datasets anyway and indexing itself is pretty fast).
This implies that while the index is written, there is a short time window during which the server will have updated its view of the index and see the empty initial state of a newly created index.
To avoid this, we should somehow instruct the indexer to create a new index at index.new
instead of in place and only when that is finished replace the existing index
and then restart the server. The main implementation issue here is how to communicate this alternative path to the indexer being triggered by systemd via the indexer.service
.