浏览代码

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

Relates to #32279
Vladimir Dolzhenko 7 年之前
父节点
当前提交
00b272af32

+ 0 - 4
docs/reference/index-modules.asciidoc

@@ -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.
 --
 

+ 4 - 0
docs/reference/migration/migrate_7_0/indices.asciidoc

@@ -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.

+ 1 - 2
server/src/main/java/org/elasticsearch/index/IndexSettings.java

@@ -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);
 

+ 0 - 4
server/src/main/java/org/elasticsearch/index/shard/IndexShard.java

@@ -301,10 +301,6 @@ public class IndexShard extends AbstractIndexShardComponent implements IndicesCl
         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);

+ 1 - 1
server/src/test/java/org/elasticsearch/action/admin/indices/template/put/MetaDataIndexTemplateServiceTests.java

@@ -69,7 +69,7 @@ public class MetaDataIndexTemplateServiceTests extends ESSingleNodeTestCase {
                 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() {

+ 0 - 10
server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

@@ -2798,16 +2798,6 @@ public class IndexShardTests extends IndexShardTestCase {
         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;