From c56609a0adc9bafa67fc59fe7d584318d111ee4b Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 27 Jun 2010 12:14:38 +0300 Subject: [PATCH] fix default merge size to not truncate on long --- .../index/merge/policy/LogByteSizeMergePolicyProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java index 764cb6d60ad..2b7cd906833 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java @@ -44,7 +44,7 @@ public class LogByteSizeMergePolicyProvider extends AbstractIndexShardComponent super(store.shardId(), store.indexSettings()); Preconditions.checkNotNull(store, "Store must be provided to merge policy"); - this.minMergeSize = componentSettings.getAsBytesSize("min_merge_size", new ByteSizeValue((long) LogByteSizeMergePolicy.DEFAULT_MIN_MERGE_MB * 1024 * 1024, ByteSizeUnit.BYTES)); + this.minMergeSize = componentSettings.getAsBytesSize("min_merge_size", new ByteSizeValue((long) (LogByteSizeMergePolicy.DEFAULT_MIN_MERGE_MB * 1024 * 1024), ByteSizeUnit.BYTES)); this.maxMergeSize = componentSettings.getAsBytesSize("max_merge_size", new ByteSizeValue((long) LogByteSizeMergePolicy.DEFAULT_MAX_MERGE_MB, ByteSizeUnit.MB)); this.mergeFactor = componentSettings.getAsInt("merge_factor", LogByteSizeMergePolicy.DEFAULT_MERGE_FACTOR); this.maxMergeDocs = componentSettings.getAsInt("max_merge_docs", LogByteSizeMergePolicy.DEFAULT_MAX_MERGE_DOCS);