On Dec 24, 2007 1:25 PM, Mark Baird <[EMAIL PROTECTED]> wrote:
> So my question is, when the Reader is being closed due to a commit, what
> exactly is happening?  Is it just being set to null and a new instance being
> created?

No, we reference count the SolrIndexSearcher so that it is closed
immediately after the last request is finished using it.  We do that
specifically to avoid running out of file descriptors.

> After looking at the code, it looks like reader.close() is explicitly being
> called as long as the closeReader property in SolrIndexSearcher is set to
> true, but I'm not sure how to check if that is always getting set to true or
> not.  There is one constructor of SolrIndexSearcher that sets it to false.

I just verified that the constructor that sets it to false (because it
is passed a reader) is not used anywhere in Solr.

> Any insight here would be appreciated.  Are stale file handles something I
> should just expect from the JVM?

I wouldn't think so.
I don't currently have a UNIX system handy to check... could you
perhaps try the latest development version and see if it has the same
behavior?

-Yonik

Reply via email to