jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-6895) Suggest directory lookup (query) isn't closed
Date Thu, 02 Nov 2017 08:07:02 GMT

    [ https://issues.apache.org/jira/browse/OAK-6895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235345#comment-16235345
] 

Marcel Reutegger commented on OAK-6895:
---------------------------------------

There are actually four resources you need to close ;)
{noformat}
Index: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/reader/DefaultIndexReader.java
===================================================================
--- oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/reader/DefaultIndexReader.java
(revision 1813955)
+++ oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/reader/DefaultIndexReader.java
(working copy)
@@ -77,6 +77,12 @@
         try {
             reader.close();
         } finally {
+            if (lookup != null) {
+                lookup.close();
+            }
+            if (suggestDirectory != null) {
+                suggestDirectory.close();
+            }
             directory.close();
         }
     }
{noformat}


> Suggest directory lookup (query) isn't closed
> ---------------------------------------------
>
>                 Key: OAK-6895
>                 URL: https://issues.apache.org/jira/browse/OAK-6895
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Vikas Saurabh
>            Assignee: Vikas Saurabh
>            Priority: Major
>             Fix For: 1.8
>
>
> After OAK-6775, it was observed that we are leaking file handles pointing to suggestion
directory files.
> This is because {{DefaultIndexReader}} doesn't close suggest directory on close.



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

Mime
View raw message