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: [email protected]
For additional commands, e-mail: [email protected]