diff --git a/docs/reference/index-modules/translog.asciidoc b/docs/reference/index-modules/translog.asciidoc index e5215fe3f59..03490937638 100644 --- a/docs/reference/index-modules/translog.asciidoc +++ b/docs/reference/index-modules/translog.asciidoc @@ -11,7 +11,7 @@ parameters: |======================================================================= |Setting |Description |index.translog.flush_threshold_ops |After how many operations to flush. -Defaults to `5000`. +Defaults to `unlimited`. |index.translog.flush_threshold_size |Once the translog hits this size, a flush will happen. Defaults to `200mb`. diff --git a/src/main/java/org/elasticsearch/index/translog/TranslogService.java b/src/main/java/org/elasticsearch/index/translog/TranslogService.java index d4bec95703d..7647869b0ab 100644 --- a/src/main/java/org/elasticsearch/index/translog/TranslogService.java +++ b/src/main/java/org/elasticsearch/index/translog/TranslogService.java @@ -67,7 +67,7 @@ public class TranslogService extends AbstractIndexShardComponent { this.indexShard = indexShard; this.translog = translog; - this.flushThresholdOperations = componentSettings.getAsInt("flush_threshold_ops", componentSettings.getAsInt("flush_threshold", 5000)); + this.flushThresholdOperations = componentSettings.getAsInt("flush_threshold_ops", componentSettings.getAsInt("flush_threshold", Integer.MAX_VALUE)); this.flushThresholdSize = componentSettings.getAsBytesSize("flush_threshold_size", new ByteSizeValue(200, ByteSizeUnit.MB)); this.flushThresholdPeriod = componentSettings.getAsTime("flush_threshold_period", TimeValue.timeValueMinutes(30)); this.interval = componentSettings.getAsTime("interval", timeValueMillis(5000));