lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikkel Kamstrup Erlandsen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2255) IndexWriter.getReader() allocates file handles
Date Mon, 08 Feb 2010 19:59:28 GMT

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

Mikkel Kamstrup Erlandsen updated LUCENE-2255:
----------------------------------------------

    Attachment: LuceneManyCommits.java

Leaks file handles via IW.getReader()

> IndexWriter.getReader() allocates file handles
> ----------------------------------------------
>
>                 Key: LUCENE-2255
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2255
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>         Environment: Ubuntu 9.10, Java 6
>            Reporter: Mikkel Kamstrup Erlandsen
>         Attachments: LuceneManyCommits.java
>
>
> I am not sure if this is a "bug" or really just me not reading the Javadocs right...
> The IR returned by IW.getReader() leaks file handles if you do not close() it, leading
to starvation of the available file handles/process. If it was clear from the docs that this
was a *new* reader and not some reference owned by the writer then this would probably be
ok. But as I read the docs the reader is internally managed by the IW, which at first shot
lead me to believe that I shouldn't close it.
> So perhaps the docs should be amended to clearly state that this is a caller-owns reader
that *must* be closed? Attaching a simple app that illustrates the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message