You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2013/08/15 01:05:48 UTC

[jira] [Updated] (LUCENE-5177) remove fieldcache weakmap or at least see what relies on GC for purging today

     [ https://issues.apache.org/jira/browse/LUCENE-5177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-5177:
--------------------------------

    Attachment: LUCENE-5177.patch

patch that 
* changes WeakMap to HashMap
* removes the *completely bogus* purging that happens in tearDown() today (instead only doing this in beforeClass() so failed tests dont interfere with others)
* fails if there are any fieldCache entries in afterClass()
* adds test-the-tester class.

some tests fail. we should see what they are doing (I suspect test-utility classes making crazy readers with their own cache keys that never get closed, but maybe something else interesting)
                
> remove fieldcache weakmap or at least see what relies on GC for purging today
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-5177
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5177
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Robert Muir
>         Attachments: LUCENE-5177.patch
>
>
> If we are registering close listeners why does this need to be weak?
> But really i dont care about that, here is what i said to Hoss on the solr mailing list:
> {quote}
> > (In any case: it looks like a WeakHashMap is still used in case the
> > listeners never get called, correct?)
> >
> I think it might be the other way around: i think it was weakmap
> before always, the close listeners were then added sometime in 3.x
> series, so we registered purge events "as an optimization".
> But one way to look at it is: readers should really get closed, so why
> have the weak map and not just a regular hashmap.
> Even if we want to keep the weak map (seriously i dont care, and i
> dont want to be the guy fielding complaints on this), I'm going to
> open with an issue with a patch that removes it and fails tests in
> @afterclass if there is any entries. This way its totally clear
> if/when/where anything is "relying on GC" today here and we can at
> least look at that.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org