[
https://issues.apache.org/jira/browse/LUCENE-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553920
]
Michael Busch commented on LUCENE-1097:
---------------------------------------
Mike,
cool patch! It looks like you added the abort check to all the
different spots in SegmentMerger and CFSWriter where most of
the merge time is spent: mergeFields, mergeTerms, mergeNorms,
and mergeVectors. So an abort should never take long, no
matter which part of the merge is being done when
IndexWriter.close(false) is called. Good!
I'm wondering how you came up with the values you pass in
checkAbort.work()? And does this abort checking have a
performance impact?
In the future when we add more files (e. g. for column
fields) we have to remember to add corresponding abort checks
to new code that we add to SegmentMerger. I think it would be
good if you added some comments to SegmentMerger.merge() that
reminds us and gives some hints how to determine the values
for checkAbort.work().
The abort logic should work with all merge policies, right?
Not only with background merges?
I think this patch finally makes LUCENE-887 obsolete. I'll
close it.
> IndexWriter.close(false) does not actually stop background merge threads
> ------------------------------------------------------------------------
>
> Key: LUCENE-1097
> URL: https://issues.apache.org/jira/browse/LUCENE-1097
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 2.3
>
> Attachments: LUCENE-1097.patch
>
>
> Right now when you close(false), IndexWriter marks any running merges
> as aborted but then does not wait for these merges to finish. This
> can cause problems because those threads still hold files open, so,
> someone might think they can call close(false) and then (say) delete
> all files from that directory, which would fail on Windows.
> Instead, close(false) should notify each running merge that it has
> been aborted, and not return until all running merges are done. Then,
> SegmentMerger should periodically check whether it has been aborted
> and stop if so.
--
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]