Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completely drop index.shard.check_on_startup: fix for 7.0 #33194

Merged
4 changes: 0 additions & 4 deletions docs/reference/index-modules.asciidoc
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
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.
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
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
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
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