You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/12/10 22:02:00 UTC

[jira] Commented: (LUCENE-2809) IndexWriter.numDocs doesn't take into account applied but not flushed deletes

    [ https://issues.apache.org/jira/browse/LUCENE-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970308#action_12970308 ] 

Michael McCandless commented on LUCENE-2809:
--------------------------------------------

Committed to 4.0, 3.x... I'll leave this open to remind us to backport if we ever do another 2.9.x/3.0.x release.

> IndexWriter.numDocs doesn't take into account applied but not flushed deletes
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-2809
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2809
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9.5, 3.0.4, 3.1, 4.0
>
>
> The javadoc states that buffered deletes are not taken into account and so you must call commit first.
> But, if you do that, and you're using CMS, and you're unlucky enough to have a background merge commit just after you call commit but before you call .numDocs, you can still get a wrong count back.
> The fix is trivial -- numDocs should also consult any pooled readers for their current del count.
> This is causing an intermittent failure in the new TestNRTThreads.

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