Skip to content

Commit

Permalink
completely drop index.shard.check_on_startup: fix for 7.0 (#33194)
Browse files Browse the repository at this point in the history
Relates to #32279
  • Loading branch information
Vladimir Dolzhenko committed Aug 31, 2018
1 parent 6a77cb4 commit 00b272a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 21 deletions.
4 changes: 0 additions & 4 deletions docs/reference/index-modules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ corruption is detected, it will prevent the shard from being opened. Accepts:
Check for both physical and logical corruption. This is much more
expensive in terms of CPU and memory usage.

`fix`::

The same as `false`. This option is deprecated and will be completely removed in 7.0.

WARNING: Expert only. Checking shards may take a lot of time on large indices.
--

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/migration/migrate_7_0/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ The parent circuit breaker defines a new setting `indices.breaker.total.use_real
heap memory instead of only considering the reserved memory by child circuit breakers. When this
setting is `true`, the default parent breaker limit also changes from 70% to 95% of the JVM heap size.
The previous behavior can be restored by setting `indices.breaker.total.use_real_memory` to `false`.

==== `fix` value for `index.shard.check_on_startup` is removed

Deprecated option value `fix` for setting `index.shard.check_on_startup` is not supported.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ public final class IndexSettings {
switch(s) {
case "false":
case "true":
case "fix":
case "checksum":
return s;
default:
throw new IllegalArgumentException("unknown value for [index.shard.check_on_startup] must be one of [true, false, fix, checksum] but was: " + s);
throw new IllegalArgumentException("unknown value for [index.shard.check_on_startup] must be one of [true, false, checksum] but was: " + s);
}
}, Property.IndexScope);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,6 @@ public IndexShard(
logger.debug("state: [CREATED]");

this.checkIndexOnStartup = indexSettings.getValue(IndexSettings.INDEX_CHECK_ON_STARTUP);
if ("fix".equals(checkIndexOnStartup)) {
deprecationLogger.deprecated("Setting [index.shard.check_on_startup] is set to deprecated value [fix], "
+ "which has no effect and will not be accepted in future");
}
this.translogConfig = new TranslogConfig(shardId, shardPath().resolveTranslog(), indexSettings, bigArrays);
final String aId = shardRouting.allocationId().getId();
this.globalCheckpointListeners = new GlobalCheckpointListeners(shardId, threadPool.executor(ThreadPool.Names.LISTENER), logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testIndexTemplateInvalidNumberOfShards() {
containsString("Failed to parse value [0] for setting [index.number_of_shards] must be >= 1"));
assertThat(throwables.get(0).getMessage(),
containsString("unknown value for [index.shard.check_on_startup] " +
"must be one of [true, false, fix, checksum] but was: blargh"));
"must be one of [true, false, checksum] but was: blargh"));
}

public void testIndexTemplateValidationAccumulatesValidationErrors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2798,16 +2798,6 @@ public void testReadSnapshotAndCheckIndexConcurrently() throws Exception {
closeShards(newShard);
}

public void testCheckOnStartupDeprecatedValue() throws Exception {
final Settings settings = Settings.builder().put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), "fix").build();

final IndexShard newShard = newShard(true, settings);
closeShards(newShard);

assertWarnings("Setting [index.shard.check_on_startup] is set to deprecated value [fix], "
+ "which has no effect and will not be accepted in future");
}

class Result {
private final int localCheckpoint;
private final int maxSeqNo;
Expand Down

0 comments on commit 00b272a

Please sign in to comment.