mirror of https://github.com/apache/lucene.git
add exceptin in registerMerge && fixed test
This commit is contained in:
parent
cac2e633b2
commit
d14f5d4a25
|
@ -4761,7 +4761,11 @@ public class IndexWriter
|
|||
+ segString(info)
|
||||
+ " does not exist in live infos");
|
||||
}
|
||||
return false;
|
||||
throw new MergePolicy.MergeException(
|
||||
"MergePolicy selected a segment ("
|
||||
+ info.info.name
|
||||
+ ") that is not in the current index "
|
||||
+ segString());
|
||||
}
|
||||
if (info.info.dir != directoryOrig) {
|
||||
isExternal = true;
|
||||
|
|
|
@ -454,7 +454,7 @@ public class TestConcurrentMergeScheduler extends LuceneTestCase {
|
|||
// return many merges.
|
||||
MergeSpecification spec = new MergeSpecification();
|
||||
List<SegmentCommitInfo> oneMerge = new ArrayList<>();
|
||||
for (SegmentCommitInfo sci : segmentsToMerge.keySet()) {
|
||||
for (SegmentCommitInfo sci : segmentInfos) {
|
||||
oneMerge.add(sci);
|
||||
if (oneMerge.size() >= 10) {
|
||||
spec.add(new OneMerge(new ArrayList<>(oneMerge)));
|
||||
|
|
Loading…
Reference in New Issue