lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (Reopened) (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (LUCENE-3546) IW#nrtIsCurrent retruns true if changes are in del queue but not in bufferedDeleteStream yet
Date Tue, 01 Nov 2011 12:54:32 GMT

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

Simon Willnauer reopened LUCENE-3546:
-------------------------------------


I wasn't completely wrong here. The DWDQ#anyChanges() implementation actually has this particular
issue. Patch follows...
                
> IW#nrtIsCurrent retruns true if changes are in del queue but not in bufferedDeleteStream
yet
> --------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3546
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3546
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.0
>
>
> 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:
> {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();
>    }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message