Skip to content

Commit 229967d

Browse files
committed
Failing when a segment is not found is very bad for the Engine
1 parent f5dae71 commit 229967d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/index/engine/SegmentMergeMemoryEstimator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ private static long estimateSegmentMemory(String segmentName, IndexReader indexR
4545
}
4646
}
4747

48-
throw new IllegalArgumentException("Segment not found: " + segmentName);
48+
// Segment not found, we can't estimate it
49+
return 0;
4950
}
5051

5152
private static long estimateSegmentMemory(SegmentReader reader) {

0 commit comments

Comments
 (0)