[
https://issues.apache.org/jira/browse/LUCENE-2299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873867#action_12873867
]
Shai Erera commented on LUCENE-2299:
------------------------------------
bq. In 4.0 this is automatically fixed since addIndexes is now well behaved!
So is in 3.1.
> 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]