Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-8001

Lucene index can be empty (no :data node) in composite node store setup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0, 1.10.1
    • lucene
    • None

    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

          Activity

            People

              catholicon Vikas Saurabh
              catholicon Vikas Saurabh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: