Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3546

IW#nrtIsCurrent retruns true if changes are in del queue but not in bufferedDeleteStream yet

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      spinnoff from SOLR-2861 - since the delete queue is not necessarily applied entirely on each request there is a chance that there are changes in the delete queue but not yet in buffered deletes. this can prevent NRT readers from reopen when they should... this shows the problematic code:

      Index: java/org/apache/lucene/index/IndexWriter.java
      ===================================================================
      --- java/org/apache/lucene/index/IndexWriter.java	(revision 1195214)
      +++ java/org/apache/lucene/index/IndexWriter.java	(working copy)
      @@ -4074,7 +4074,7 @@
         synchronized boolean nrtIsCurrent(SegmentInfos infos) {
           //System.out.println("IW.nrtIsCurrent " + (infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedDeletesStream.any()));
           ensureOpen();
      -    return infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedDeletesStream.any();
      +    return infos.version == segmentInfos.version && !docWriter.anyChanges() && !docWriter.deleteQueue.anyChanges();
         }
      

        Attachments

        1. LUCENE-3546.patch
          3 kB
          Simon Willnauer

          Issue Links

            Activity

              People

              • Assignee:
                simonw Simon Willnauer
                Reporter:
                simonw Simon Willnauer
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: