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

Michael McCandless updated LUCENE-1726:
---------------------------------------

    Attachment: LUCENE-1726.patch

OK the problem happens when a segment is first opened by a merge that
doesn't need to merge the doc stores; later, an NRT reader is opened
that separately opens the doc stores of the same [pooled]
SegmentReader, but then it's the merge that closes the read-only clone
of the reader.

In this case the separately opened (by the NRT reader) doc stores are
not closed by the merge thread.  It's the mirror image of LUCENE-1639.

I've fixed it by pulling all shared readers in a SegmentReader into a
separate static class (CoreReaders).  Cloned SegmentReaders share the
same instance of this class so that if a clone later opens the doc
stores, any prior ancestor (that the clone was created from) would
also close those readers if it's the reader to decRef to 0.

I did something similar for LUCENE-1609 (which I'll now hit conflicts
on after committing this... sigh).

I plan to commit in a day or so.


> IndexWriter.readerPool create new segmentReader outside of sync block
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-1726
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1726
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 3.1
>
>         Attachments: LUCENE-1726.patch, LUCENE-1726.patch, LUCENE-1726.patch, 
> LUCENE-1726.patch, LUCENE-1726.patch, LUCENE-1726.trunk.test.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I think we will want to do something like what field cache does
> with CreationPlaceholder for IndexWriter.readerPool. Otherwise
> we have the (I think somewhat problematic) issue of all other
> readerPool.get* methods waiting for an SR to warm.
> It would be good to implement this for 2.9.

-- 
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

Reply via email to