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

NRT Indexes should be closed if async indexer progresses

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: lucene
    • Labels:
      None

      Description

      Currently NRTIndex associated with IndexNodeManager are only closed upon index update. However each IndexNodeManager keeps reference to 2 NRTIndex instances. It can happen that following sequence can happen

      1. Index /oak:index/ntBaseLucene refers to 2 nrt indexes NR1 and NR2. Where NR1 has 1 M entries and NR2 has 1 M entries
      2. AsyncIndexer updates and thus refreshes the /oak:index/ntBaseLucene. This causes new NRT Index NR3 to be created and NR1 to be closed. So NR3 and NR2 are active
      3. AsyncIndexer updates but no change happen in setup which causes any update to /oak:index/ntBaseLucene. Thus this index does not get refreshed and continues to refer to NR2

      So as a fix we should refresh any index if it refers to 2 NRT indexes where previous one is not empty

        Attachments

          Activity

            People

            • Assignee:
              chetanm Chetan Mehrotra
              Reporter:
              chetanm Chetan Mehrotra
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: