[ 
https://issues.apache.org/jira/browse/OAK-6693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-6693:
---------------------------------
    Priority: Minor  (was: Major)

> Ensure that IndexNodeManager releases lock in case of error in acquiring it
> ---------------------------------------------------------------------------
>
>                 Key: OAK-6693
>                 URL: https://issues.apache.org/jira/browse/OAK-6693
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.8, 1.7.8, 1.6.6
>
>
> Currently IndexNodeManager acquires the lock like below. Here if any 
> exception occurs in IndexNodeImpl then lock would remain acquired
> {noformat}
>     IndexNode acquire() {
>         lock.readLock().lock();
>         if (closed) {
>             lock.readLock().unlock();
>             return null;
>         } else {
>             boolean success = false;
>             try {
>                 refreshPolicy.refreshOnReadIfRequired(refreshCallback);
>                 success = true;
>                 return new IndexNodeImpl(searcherHolder);
>             } finally {
>                 if (!success) {
>                     lock.readLock().unlock();
>                 }
>             }
>         }
>     }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to