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

Avoid updating the index nodestate if no change is done in index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.5.15, 1.6.0
    • lucene

    Description

      As noted in OAK-5211 directory listing was getting modified (due to reorder) even if no change happens in index.

      Another place where we update state post index close is at ":status" node where we store lastUpdated and indexedNodes post index close. In normal cases LuceneIndexEditor avoids initializing the IndexWriter if there is no change. However it can happen that when any node gets deleted the editor performs a delete operation. It can happen that tree being deleted is not indexed but still editor would do this as it cannot determine that easily. And in doing that IndexWriter would be initialized.

      Currently IndexWriter being initialized is considered same as index updated. Due to this index status nodes gets unnecessarily updated even if there is no change in index which causes the IndexTracker to reopen the index even when it has not changed.

      We should make this more explicit and find a way to determine if index has been updated or not

      Attachments

        1. OAK-5212-v1.patch
          11 kB
          Chetan Mehrotra

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: