mirror of https://github.com/apache/lucene.git
LUCENE-2680: deletes were being double-applied
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1063936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51dc4159e6
commit
5a9c5aae0b
|
@ -2895,10 +2895,6 @@ public class IndexWriter implements Closeable {
|
|||
final synchronized void mergeInit(MergePolicy.OneMerge merge) throws IOException {
|
||||
boolean success = false;
|
||||
try {
|
||||
// Lock order: IW -> BD
|
||||
if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
|
||||
checkpoint();
|
||||
}
|
||||
_mergeInit(merge);
|
||||
success = true;
|
||||
} finally {
|
||||
|
@ -2929,6 +2925,11 @@ public class IndexWriter implements Closeable {
|
|||
if (merge.isAborted())
|
||||
return;
|
||||
|
||||
// Lock order: IW -> BD
|
||||
if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
|
||||
checkpoint();
|
||||
}
|
||||
|
||||
// Bind a new segment name here so even with
|
||||
// ConcurrentMergePolicy we keep deterministic segment
|
||||
// names.
|
||||
|
|
Loading…
Reference in New Issue