Description
In normal setups, even if no data is written to the index, an empty (valid) lucene index is created - that's useful to take care of checking if-index-exists everywhere before opening the index.
DefaultIndexWriter#close has an explicit comment stating this to be an explicit intent.
In composite node stores though, if an index doesn't get any data to be indexed then MultiplexingIndexWriter never opens a DefaultIndexWriter (for one or all mounts - depending on if there were some writes then which mount did they hit).
MultiplexingIndexWriter does delegate close to its opened writers but that doesn't give the opportunity to DefaultIndexWriter#close into play if there was no writer opened for a given mount.
This then leads to situation in composite node stores where very empty indexes can have missing :data node. In fact this was one of the causes that we hit OAK-7983 in one of AEM based project.
Attachments
Issue Links
- causes
-
OAK-7983 LazyLuceneIndexNode#getIndexNode can cause NPE
- Resolved