lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3485) LuceneTaxonomyReader .decRef() may close the inner IR, renderring the LTR in a limbo.
Date Tue, 04 Oct 2011 19:06:34 GMT


Shai Erera commented on LUCENE-3485:

Patch looks good ! Few minor comments:

* I think that it's better to set closed=true in the end of doClose(), after everything succeeds.
* In doClose, perhaps nullify the two caches? this can come instead of, or in addition to,
clear()-ing them
* doClose is package-private: is that on purpose, or did you mean to make it protected/private?
Seems to me like it should be private, because you don't want to call it more than once.
> LuceneTaxonomyReader .decRef() may close the inner IR, renderring the LTR in a limbo.
> -------------------------------------------------------------------------------------
>                 Key: LUCENE-3485
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/facet
>    Affects Versions: 3.4
>            Reporter: Gilad Barkai
>            Priority: Minor
>         Attachments: LUCENE-3485.patch
> TaxonomyReader which supports ref-counting, has a decRef() method which delegates to
an inner IndexReader and calls its .decRef(). The latter may close the reader (if the ref
is zeroes) but the taxonomy would remain 'open' which will fail many of its method calls.
> Also, the LTR's .close() method does not work in the same manner as IndexReader's - which
calls decRef(), and leaves the real closing logic to the decRef(). I believe this should be
the right approach for the fix.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message