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

Release IndexNode lock in finally clause

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.7.7, 1.6.6, 1.8.0
    • lucene
    • None

    Description

      IndexNode currently makes 2 call in release

              @Override
              public void release() {
                  if (released.compareAndSet(false, true)) {
                      //Decrement on each release
                      decrementSearcherUsageCount(holder.searcher);
                      IndexNodeManager.this.release();
                  }
              }
      

      Its possible that decrementSearcherUsageCount can throw exception and in that case lock would not be released leading to situation as seen in OAK-6619.

      As a fix the lock should be released in finally

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: