rename check setting to check on startup

This commit is contained in:
Shay Banon 2011-10-20 16:17:38 +02:00
parent ff977926a9
commit 932215d6fa
4 changed files with 7 additions and 7 deletions

View File

@ -120,7 +120,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
private final Object mutex = new Object();
private final boolean checkIndex;
private final boolean checkIndexOnStartup;
private volatile IndexShardState state;
@ -166,7 +166,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
logger.debug("state: [CREATED]");
this.checkIndex = indexSettings.getAsBoolean("index.shard.check_index", false);
this.checkIndexOnStartup = indexSettings.getAsBoolean("index.shard.check_on_startup", false);
}
public MergeSchedulerProvider mergeScheduler() {
@ -261,7 +261,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
if (state == IndexShardState.RELOCATED) {
throw new IndexShardRelocatedException(shardId);
}
if (checkIndex) {
if (checkIndexOnStartup) {
checkIndex(true);
}
engine.start();
@ -512,7 +512,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
throw new IndexShardNotRecoveringException(shardId, state);
}
// also check here, before we apply the translog
if (checkIndex) {
if (checkIndexOnStartup) {
checkIndex(true);
}
engine.start();

View File

@ -217,7 +217,7 @@ public class FullRestartStressTest {
int numberOfNodes = 2;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_index", true)
.put("index.shard.check_on_startup", true)
.put("gateway.type", "local")
.put("gateway.recover_after_nodes", numberOfNodes)
.put("index.number_of_shards", 1)

View File

@ -46,7 +46,7 @@ public class ManyIndicesStressTest {
int numberOfDocs = 100;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_index", false)
.put("index.shard.check_on_startup", false)
.put("gateway.type", "fs")
.put("index.number_of_shards", 1)
.build();

View File

@ -339,7 +339,7 @@ public class RollingRestartStressTest {
System.setProperty("es.logger.prefix", "");
Settings settings = settingsBuilder()
.put("index.shard.check_index", true)
.put("index.shard.check_on_startup", true)
.put("gateway.type", "none")
.put("path.data", "data/data1,data/data2")
.build();