completely drop `index.shard.check_on_startup: fix` for 7.0 (#33194)
Relates to #32279
This commit is contained in:
parent
6a77cb4211
commit
00b272af32
|
@ -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
|
Check for both physical and logical corruption. This is much more
|
||||||
expensive in terms of CPU and memory usage.
|
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.
|
WARNING: Expert only. Checking shards may take a lot of time on large indices.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
|
@ -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
|
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.
|
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`.
|
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.
|
|
@ -75,11 +75,10 @@ public final class IndexSettings {
|
||||||
switch(s) {
|
switch(s) {
|
||||||
case "false":
|
case "false":
|
||||||
case "true":
|
case "true":
|
||||||
case "fix":
|
|
||||||
case "checksum":
|
case "checksum":
|
||||||
return s;
|
return s;
|
||||||
default:
|
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);
|
}, Property.IndexScope);
|
||||||
|
|
||||||
|
|
|
@ -301,10 +301,6 @@ public class IndexShard extends AbstractIndexShardComponent implements IndicesCl
|
||||||
logger.debug("state: [CREATED]");
|
logger.debug("state: [CREATED]");
|
||||||
|
|
||||||
this.checkIndexOnStartup = indexSettings.getValue(IndexSettings.INDEX_CHECK_ON_STARTUP);
|
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);
|
this.translogConfig = new TranslogConfig(shardId, shardPath().resolveTranslog(), indexSettings, bigArrays);
|
||||||
final String aId = shardRouting.allocationId().getId();
|
final String aId = shardRouting.allocationId().getId();
|
||||||
this.globalCheckpointListeners = new GlobalCheckpointListeners(shardId, threadPool.executor(ThreadPool.Names.LISTENER), logger);
|
this.globalCheckpointListeners = new GlobalCheckpointListeners(shardId, threadPool.executor(ThreadPool.Names.LISTENER), logger);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class MetaDataIndexTemplateServiceTests extends ESSingleNodeTestCase {
|
||||||
containsString("Failed to parse value [0] for setting [index.number_of_shards] must be >= 1"));
|
containsString("Failed to parse value [0] for setting [index.number_of_shards] must be >= 1"));
|
||||||
assertThat(throwables.get(0).getMessage(),
|
assertThat(throwables.get(0).getMessage(),
|
||||||
containsString("unknown value for [index.shard.check_on_startup] " +
|
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() {
|
public void testIndexTemplateValidationAccumulatesValidationErrors() {
|
||||||
|
|
|
@ -2798,16 +2798,6 @@ public class IndexShardTests extends IndexShardTestCase {
|
||||||
closeShards(newShard);
|
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 {
|
class Result {
|
||||||
private final int localCheckpoint;
|
private final int localCheckpoint;
|
||||||
private final int maxSeqNo;
|
private final int maxSeqNo;
|
||||||
|
|
Loading…
Reference in New Issue