lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-1715) DirectoryIndexReader finalize() holding TermInfosReader longer than necessary
Date Tue, 23 Jun 2009 16:52:07 GMT


Michael McCandless commented on LUCENE-1715:

Does that really help GC?  (I thought not)

Had we left finalize in place, I agree nulling would help, because stuff can sit in the finalize
queue for a while and nulling would have severed it.  But now since all of DirectoryReader
will be GCd "at once", I didn't think nulling would help?

Though, I suppose what it would help is when someone closes the reader but then still hangs
onto it, so perhaps we should do it?

> DirectoryIndexReader finalize() holding TermInfosReader longer than necessary
> -----------------------------------------------------------------------------
>                 Key: LUCENE-1715
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4.1
>         Environment: Sun JDK 6 update 12 64-bit, Debian Lenny
>            Reporter: Brian Groose
>            Assignee: Michael McCandless
>             Fix For: 2.9
> DirectoryIndexReader has a finalize method, which causes the JDK to keep a reference
to the object until it can be finalized.  SegmentReader and MultiSegmentReader are subclasses
that contain references to, potentially, hundreds of megabytes of cached data in a TermInfosReader.
> Some options would be removing finalize() from DirectoryIndexReader (it releases a write
lock at the moment) or possibly nulling out references in various close() and doClose() methods
throughout the class hierarchy so that the finalizable object doesn't references the Term
> Original mailing list message:

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:
For additional commands, e-mail:

View raw message