mirror of https://github.com/apache/lucene.git
remove files of dropped segments right after merge
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1232943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
374f6fc6c1
commit
3d66fa922a
|
@ -3174,6 +3174,8 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
||||||
|
|
||||||
if (dropSegment) {
|
if (dropSegment) {
|
||||||
readerPool.drop(merge.info);
|
readerPool.drop(merge.info);
|
||||||
|
deleter.deleteNewFiles(merge.info.files());
|
||||||
|
assert !segmentInfos.contains(merge.info);
|
||||||
} else {
|
} else {
|
||||||
if (mergedDeletes != null && !poolReaders) {
|
if (mergedDeletes != null && !poolReaders) {
|
||||||
mergedDeletes.writeLiveDocs(directory);
|
mergedDeletes.writeLiveDocs(directory);
|
||||||
|
@ -3191,7 +3193,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
||||||
|
|
||||||
closeMergeReaders(merge, false);
|
closeMergeReaders(merge, false);
|
||||||
|
|
||||||
if (merge.maxNumSegments != -1) {
|
if (merge.maxNumSegments != -1 && !dropSegment) {
|
||||||
// cascade the forceMerge:
|
// cascade the forceMerge:
|
||||||
if (!segmentsToMerge.containsKey(merge.info)) {
|
if (!segmentsToMerge.containsKey(merge.info)) {
|
||||||
segmentsToMerge.put(merge.info, Boolean.FALSE);
|
segmentsToMerge.put(merge.info, Boolean.FALSE);
|
||||||
|
|
Loading…
Reference in New Issue