LUCENE-831... ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de
> -----Original Message----- > From: Earwin Burrfoot (JIRA) [mailto:j...@apache.org] > Sent: Tuesday, December 08, 2009 4:40 PM > To: java-dev@lucene.apache.org > Subject: [jira] Commented: (LUCENE-2135) IndexReader.close should > forcefully evict entries from FieldCache > > > [ https://issues.apache.org/jira/browse/LUCENE- > 2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment- > tabpanel&focusedCommentId=12787505#action_12787505 ] > > Earwin Burrfoot commented on LUCENE-2135: > ----------------------------------------- > > A better approach is to don IR-keyed weakHashMaps completely and bind > everything you need onto IR itself. That's how I do it and it works like a > charm. > > > IndexReader.close should forcefully evict entries from FieldCache > > ----------------------------------------------------------------- > > > > Key: LUCENE-2135 > > URL: https://issues.apache.org/jira/browse/LUCENE-2135 > > Project: Lucene - Java > > Issue Type: Bug > > Components: Index > > Reporter: Michael McCandless > > Assignee: Michael McCandless > > Fix For: 3.1 > > > > > > Spinoff of java-user thread "heap memory issues when sorting by a string > field". > > We rely on WeakHashMap to hold our FieldCache, keyed by reader. But > this lacks immediacy on releasing the reference, after a reader is closed. > > WeakHashMap can't free the key until the reader is no longer referenced > by the app. And, apparently, WeakHashMap has a further impl detail that > requires invoking one of its methods for it to notice that a key has just > become only weakly reachable. > > To fix this, I think on IR.close we should evict entries from the > FieldCache, as long as the sub-readers are truly closed (refCount dropped > to 0). > > -- > 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-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org