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

Shai Erera updated LUCENE-3703:
-------------------------------

    Attachment: LUCENE-3703.patch

Patch fixes the bug by moving to track reference count by DTR. Also, added a 
test which covers that bug.

On the go, fixed close() to synchronize on this if the instance is not already 
closed. Otherwise, two threads that call close() concurrently might fail (one 
of them) in decRef().

I think it's ready to commit, will wait until tomorrow for review.
                
> DirectoryTaxonomyReader.refresh misbehaves with ref counts
> ----------------------------------------------------------
>
>                 Key: LUCENE-3703
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3703
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3703.patch
>
>
> DirectoryTaxonomyReader uses the internal IndexReader in order to track its 
> own reference counting. However, when you call refresh(), it reopens the 
> internal IndexReader, and from that point, all previous reference counting 
> gets lost (since the new IndexReader's refCount is 1).
> The solution is to track reference counting in DTR itself. I wrote a simple 
> unit test which exposes the bug (will be attached with the patch shortly).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to