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

Michael McCandless updated LUCENE-2299:
---------------------------------------

    Attachment: LUCENE-2299.patch

Cleans up DirReader's loading of segments from IW.  I removed code since a 
SegmentInfo's dir is never external anymore (I won't do this when backporting 
to 3.0.x,2.9.x).

> if you open an NRT reader while addIndexes* is running it may miss segments
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2299
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2299
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.9.3, 3.0.2, 3.1, 4.0
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9.3, 3.0.2, 3.1, 4.0
>
>         Attachments: LUCENE-2299.patch
>
>
> Earwin spotted this in pending ongoing refactoring of Dir/MultiReader, but I 
> wanted to open this separately just to make sure we fix it for 3.1...
> This is the fix:
> {code}
> Index: src/java/org/apache/lucene/index/DirectoryReader.java
> ===================================================================
> --- src/java/org/apache/lucene/index/DirectoryReader.java     (revision 
> 919119)
> +++ src/java/org/apache/lucene/index/DirectoryReader.java     (working copy)
> @@ -145,7 +145,7 @@
>      for (int i=0;i<numSegments;i++) {
>        boolean success = false;
>        try {
> -        final SegmentInfo info = infos.info(upto);
> +        final SegmentInfo info = infos.info(i);
>          if (info.dir == dir) {
>            readers[upto++] = writer.readerPool.getReadOnlyClone(info, true, 
> termInfosIndexDivisor);
>          }
> {code}

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to