when we fix maxMergeAtOnce, make sure to not set it to 1 as its an illegal value
This commit is contained in:
parent
a8c9e580ed
commit
ebc0c8cc6d
|
@ -82,6 +82,10 @@ public class TieredMergePolicyProvider extends AbstractIndexShardComponent imple
|
||||||
// fixing maxMergeAtOnce, see TieredMergePolicy#setMaxMergeAtOnce
|
// fixing maxMergeAtOnce, see TieredMergePolicy#setMaxMergeAtOnce
|
||||||
if (!(segmentsPerTier >= maxMergeAtOnce)) {
|
if (!(segmentsPerTier >= maxMergeAtOnce)) {
|
||||||
int newMaxMergeAtOnce = (int) segmentsPerTier;
|
int newMaxMergeAtOnce = (int) segmentsPerTier;
|
||||||
|
// max merge at once should be at least 2
|
||||||
|
if (newMaxMergeAtOnce <= 1) {
|
||||||
|
newMaxMergeAtOnce = 2;
|
||||||
|
}
|
||||||
logger.debug("[tiered] merge policy changing max_merge_at_once from [{}] to [{}] because segments_per_tier [{}] has to be higher or equal to it", maxMergeAtOnce, newMaxMergeAtOnce, segmentsPerTier);
|
logger.debug("[tiered] merge policy changing max_merge_at_once from [{}] to [{}] because segments_per_tier [{}] has to be higher or equal to it", maxMergeAtOnce, newMaxMergeAtOnce, segmentsPerTier);
|
||||||
this.maxMergeAtOnce = newMaxMergeAtOnce;
|
this.maxMergeAtOnce = newMaxMergeAtOnce;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue