[TEST] Never flush in the test where we rely on recovering from translog
This commit is contained in:
parent
795dd8111f
commit
2064ba33f2
|
@ -31,6 +31,7 @@ import org.elasticsearch.cluster.routing.ShardIterator;
|
||||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
import org.elasticsearch.index.shard.IndexShard;
|
||||||
import org.elasticsearch.monitor.fs.FsStats;
|
import org.elasticsearch.monitor.fs.FsStats;
|
||||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||||
import org.elasticsearch.test.engine.MockInternalEngine;
|
import org.elasticsearch.test.engine.MockInternalEngine;
|
||||||
|
@ -79,6 +80,7 @@ public class CorruptedTranslogTests extends ElasticsearchIntegrationTest {
|
||||||
.put("index.number_of_replicas", 0)
|
.put("index.number_of_replicas", 0)
|
||||||
.put("index.refresh_interval", "-1")
|
.put("index.refresh_interval", "-1")
|
||||||
.put(MockInternalEngine.FLUSH_ON_CLOSE_RATIO, 0.0d) // never flush - always recover from translog
|
.put(MockInternalEngine.FLUSH_ON_CLOSE_RATIO, 0.0d) // never flush - always recover from translog
|
||||||
|
.put(IndexShard.INDEX_FLUSH_ON_CLOSE, false) // never flush - always recover from translog
|
||||||
.put("index.gateway.local.sync", "1s") // fsync the translog every second
|
.put("index.gateway.local.sync", "1s") // fsync the translog every second
|
||||||
));
|
));
|
||||||
ensureYellow();
|
ensureYellow();
|
||||||
|
|
Loading…
Reference in New Issue