[ https://issues.apache.org/jira/browse/OAK-8001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16754895#comment-16754895 ]
Vikas Saurabh commented on OAK-8001: ------------------------------------ Backported to 1.10 at [r1852434|https://svn.apache.org/r1852434]. > Lucene index can be empty (no :data node) in composite node store setup > ----------------------------------------------------------------------- > > Key: OAK-8001 > URL: https://issues.apache.org/jira/browse/OAK-8001 > Project: Jackrabbit Oak > Issue Type: Bug > Components: lucene > Reporter: Vikas Saurabh > Assignee: Vikas Saurabh > Priority: Major > Fix For: 1.12, 1.11.0 > > > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)