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 {
|
final synchronized void mergeInit(MergePolicy.OneMerge merge) throws IOException {
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
try {
|
try {
|
||||||
// Lock order: IW -> BD
|
|
||||||
if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
|
|
||||||
checkpoint();
|
|
||||||
}
|
|
||||||
_mergeInit(merge);
|
_mergeInit(merge);
|
||||||
success = true;
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2929,6 +2925,11 @@ public class IndexWriter implements Closeable {
|
||||||
if (merge.isAborted())
|
if (merge.isAborted())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Lock order: IW -> BD
|
||||||
|
if (bufferedDeletes.applyDeletes(readerPool, segmentInfos, merge.segments)) {
|
||||||
|
checkpoint();
|
||||||
|
}
|
||||||
|
|
||||||
// Bind a new segment name here so even with
|
// Bind a new segment name here so even with
|
||||||
// ConcurrentMergePolicy we keep deterministic segment
|
// ConcurrentMergePolicy we keep deterministic segment
|
||||||
// names.
|
// names.
|
||||||
|
|
Loading…
Reference in New Issue