Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] [Resolved] (LUCENE-4080) SegmentReader.numDeletedDocs() sometimes gives an incorrect numDeletedDocs

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Jul 4, 2012, 3:26 AM

Post #1 of 1 (53 views)
Permalink
[jira] [Resolved] (LUCENE-4080) SegmentReader.numDeletedDocs() sometimes gives an incorrect numDeletedDocs

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

Adrien Grand resolved LUCENE-4080.
----------------------------------

Resolution: Fixed
Fix Version/s: (was: 4.1)
4.0
Assignee: Adrien Grand

Thanks for your feedback, Mike. I just committed (r1357195 on trunk and r1357212 on branch 4.x).

> SegmentReader.numDeletedDocs() sometimes gives an incorrect numDeletedDocs
> --------------------------------------------------------------------------
>
> Key: LUCENE-4080
> URL: https://issues.apache.org/jira/browse/LUCENE-4080
> Project: Lucene - Java
> Issue Type: Bug
> Components: core/index
> Affects Versions: 4.0, 4.1
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Trivial
> Fix For: 4.0
>
> Attachments: LUCENE-4080.patch, LUCENE-4080.patch, LUCENE-4080.patch
>
>
> At merge time, SegmentReader sometimes gives an incorrect value for numDeletedDocs.
> From LUCENE-2357:
> bq. As far as I know, [SegmenterReader.numDeletedDocs() is] only unreliable in this context (SegmentReader passed to SegmentMerger for merging); this is because we allow newly marked deleted docs to happen concurrently up until the moment we need to pass the SR instance to the merger (search for "// Must sync to ensure BufferedDeletesStream" in IndexWriter.java) ... but it would be nice to fix that, so I think open a new issue (it won't block this one)? We should be able to make a new SR instance, sharing the same core as the current one but using the correct delCount...
> bq. It would be cleaner (but I think hairier) to create a new SR for merging that holds the correct delCount, but let's do that under the separate issue.
> bq. it would be best if the SegmentReader's numDeletedDocs were always correct, but, fixing that in IndexWriter is somewhat tricky. Ie, the fix could be hairy but the end result ("SegmentReader.numDeletedDocs can always be trusted") would be cleaner...

--
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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.