jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikas Saurabh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-3917) SuggestionHelper creating unnecessary temporary directories
Date Mon, 25 Jan 2016 13:11:39 GMT

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

Vikas Saurabh commented on OAK-3917:

I think we should have a global marker dir ... the suggester implementation ({{AnalyzingInfixSuggester}})
tries to use index path passed to create a temp storage for intermediate work during building
of suggestions. A global directory would cause troubles in those cases if multiple async indexers
come into play.
I think we can instead rely a bit into implementation details of suggester (which we anyway
are doing a bit to get OakDirectory into play) and create/remove temp dir during a build call.
I'd try to prepare a patch and see if things work out

> SuggestionHelper creating unnecessary temporary directories
> -----------------------------------------------------------
>                 Key: OAK-3917
>                 URL: https://issues.apache.org/jira/browse/OAK-3917
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Vikas Saurabh
>             Fix For: 1.4
> SuggestHelper create a temporary directory [1] mostly likely as a workaround to allow
use of {{OakDirectory}}. With time this can grow unbounded (as dir is not cleaned) and following
exception is seen.
> {noformat}
> java.lang.IllegalStateException: Failed to create directory within 10000 attempts (tried
1453697999939-0 to 1453697999939-9999)
>         at com.google.common.io.Files.createTempDir(Files.java:608)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper.getLookup(SuggestHelper.java:107)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.<init>(IndexNode.java:106)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.open(IndexNode.java:69)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.findIndexNode(IndexTracker.java:162)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.acquireIndexNode(IndexTracker.java:137)
>         at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex.getPlans(LucenePropertyIndex.java:222)
> {noformat}
> [1] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.3.14/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/SuggestHelper.java#L107

This message was sent by Atlassian JIRA

View raw message