lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ning Li (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-686) Resources not always reclaimed in scorers after each search
Date Tue, 17 Oct 2006 17:14:36 GMT
    [ http://issues.apache.org/jira/browse/LUCENE-686?page=comments#action_12442987 ] 
            
Ning Li commented on LUCENE-686:
--------------------------------

> Is there an actual memory leak problem related to this? 

Right now no. For example, in FS based directories, the index inputs term docs use are clones.
Close() of cloned index inputs does not close the file descriptor. Only the origianl one does.

However, memory leak could happen to a new subclass of directory and index input, if cloned
instances require reclaiming resources. In addition, memory leak could happen to a new subclass
of scorer, if there are resources associated with the scorer which should be reclaimed when
done.

> In ReqExclScorer the two scorers can also be closed when they are set to null. 

Thanks for pointing this out. I'll double check all scorers and make sure close() are properly
called.

> It's probably better to use try/finally in IndexSearcher and call close in in the finally
clause, 
> exceptions are occasionally used to preliminary end a search, although not in the 
> lucene core afaik. 

Will do. Thanks again!

Cheers,
Ning

> Resources not always reclaimed in scorers after each search
> -----------------------------------------------------------
>
>                 Key: LUCENE-686
>                 URL: http://issues.apache.org/jira/browse/LUCENE-686
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>         Environment: All
>            Reporter: Ning Li
>         Attachments: ScorerResourceGC.patch
>
>
> Resources are not always reclaimed in scorers after each search.
> For example, close() is not always called for term docs in TermScorer.
> A test will be attached to show when resources are not reclaimed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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