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

Release IndexNode lock in finally clause

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.7, 1.6.6, 1.8.0
    • Component/s: lucene
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: