File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
server/src/main/java/org/elasticsearch/index/engine Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public class ThreadPoolMergeScheduler extends MergeScheduler implements Elastics
77
77
* @param indexSettings used to obtain the {@link MergeSchedulerConfig}
78
78
* @param threadPoolMergeExecutorService the executor service used to execute merge tasks from this scheduler
79
79
* @param mergeMemoryEstimateProvider provides an estimate for how much memory a merge will take
80
- * @param mergeMetrics
80
+ * @param mergeMetrics metrics related to merges
81
81
*/
82
82
public ThreadPoolMergeScheduler (
83
83
ShardId shardId ,
@@ -540,7 +540,7 @@ public OnGoingMerge getOnGoingMerge() {
540
540
541
541
private static long getNewSegmentSize (MergePolicy .OneMerge currentMerge ) {
542
542
try {
543
- return currentMerge .getMergeInfo (). sizeInBytes ();
543
+ return currentMerge .getMergeInfo () != null ? currentMerge . getMergeInfo (). sizeInBytes () : currentMerge . estimatedMergeBytes ;
544
544
} catch (FileNotFoundException | NoSuchFileException e ) {
545
545
// It is (rarely) possible that the merged segment could be merged away by the IndexWriter prior to reaching this point.
546
546
// Once the IW creates the new segment, it could be exposed to be included in a new merge. That merge can be executed
You can’t perform that action at this time.
0 commit comments