jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Giannella (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OAK-6693) Ensure that IndexNodeManager releases lock in case of error in acquiring it
Date Fri, 29 Sep 2017 10:10:07 GMT

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

Davide Giannella closed OAK-6693.
---------------------------------

Bulk close for 1.7.8

> 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)

Mime
View raw message