lucene-dev mailing list archives

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

Quick summary of some discussion from the mailing list...

1) i replied to paul's comments in the bug indicating that while there may not be any leaks
in the core code base, these changes were needed to allow people writing custom Directories
or custom Scorers to avoid memory leaks.
2) paul suggested that people writing custom code can work arround this by subclassing/customizing
the Directory, and all the Scorers, and the IndexSearcher
3) i suggested that made the barrier for new custom code rather high, and made a poor comparison
that got us on a tangent.
4) i argued that since TermDocs had a close method, Scorers needed to call it, which ment
they needed a close method which was garunteed to be called.
5) paul argued that TermDocs.close in the core right now isn't needed, and we might be better
off removing it, and requiring any more complicated custom implimentations to rely on GC to
clean up any resources they have (presumably using a finalize method)
6) steven_parkes then raised the point that the fundemental issue is design integrity ...
we have to agree what the point of TermDocs.close is from an API standpoint, and that callers
should not have to know what the concrete implimentation of hte callee is to know wether close
needs to be called.  Better documentation on the purpose of the method can lead to better
discussion about wether it can be removed, or if the current behavior is a bug that needs
fixed.

> 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