lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-2299) if you open an NRT reader while addIndexes* is running it may miss segments
Date Sun, 07 Mar 2010 11:59:27 GMT
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
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 3.1


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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message