You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/10/04 13:56:42 UTC

[jira] [Resolved] (LUCENE-5254) SegmentCoreReader's "owner" reference back to the first SegmentReader causes leaks

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

Michael McCandless resolved LUCENE-5254.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.6
                   5.0

> SegmentCoreReader's "owner" reference back to the first SegmentReader causes leaks
> ----------------------------------------------------------------------------------
>
>                 Key: LUCENE-5254
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5254
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 5.0, 4.6
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-5254.patch
>
>
> Spinoff from LUCENE-5248, where Shai discovered this ...
> SegmentCoreReaders has a SegmentReader owner member, that points to the
> first SegmentReader that was opened.  When that SR is reopened to SR2,
> e.g. because new deletes or NDV updates happened, the same SCR is
> shared.
> But, even if you close SR1, any thing it points to cannot be GCd
> because SCR is pointing to it.
> I think the big things are liveDocs and the NDV update maps; Shai is
> going to fix the latter in LUCENE-5248, so this issue should fix
> liveDocs.
> The simplest fix is to make liveDocs not final and null it out in
> doClose ... but that's sort of fragile (what if we add other members
> in the future and forget to null them on close?).  I think it'd be better to
> eliminate the owner reference; it's only used so we can evict
> FieldCache entry once the core is closed.  Maybe we can just store the
> coreCacheKey instead?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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