Hi,

If an index provider is (temporarily) not available, the 
MissingIndexProviderStrategy resets the index so it is re-indexed. This is a 
problem (OAK-2024, OAK-2203, OAK-2429, OAK-3325, OAK-3366, OAK-3505, OAK-3512, 
OAK-3513), because re-indexing is slow and one transaction. It can also cause 
many threads to concurrently build the index. Currently, synchronous indexes 
are built in one "transaction", which is anyway a performance problem (for new 
indexes and reindexing). If an index is not available when running a query, 
traversal is used, which is also a problem.

What about:

* (a) Hardcode (not rely on the Whiteboard or OSGi) the known indexes for 
property, reference, nodeType, lucene, counter index. This is for both writing 
(IndexEditor) and reading (QueryIndex) . That way, those indexes are always 
available, and we never get into a situation where they are temporarily not 
available.

* (b) Where we can't use hardcoding, use hard service references (Whiteboard / 
OSGi).

* (c) If we can't do that, block or fail commits if one of the configured 
indexes is not available, for example for the Solr index (if such an index is 
configured).

Additionally, for "synchronous" indexes (property index and so on), I would 
like to always create and reindex them asynchronously by default, and only once 
they are available switch to sychronous mode. I think (but I'm not sure) this 
is OAK-1456.

What do you think?

Regards,
Thomas

Reply via email to