Prechádzať zdrojové kódy

Revert "Add a deprecation notice to shadow replicas (#22025)"

This reverts commit 0da190234c87838df5d37f2375e901351e05e03d.
Boaz Leskes 8 rokov pred
rodič
commit
f88ab76067

+ 4 - 7
core/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java

@@ -190,11 +190,11 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
         Setting.intSetting(SETTING_NUMBER_OF_REPLICAS, 1, 0, Property.Dynamic, Property.IndexScope);
     public static final String SETTING_SHADOW_REPLICAS = "index.shadow_replicas";
     public static final Setting<Boolean> INDEX_SHADOW_REPLICAS_SETTING =
-        Setting.boolSetting(SETTING_SHADOW_REPLICAS, false, Property.IndexScope, Property.Deprecated);
+        Setting.boolSetting(SETTING_SHADOW_REPLICAS, false, Property.IndexScope);
 
     public static final String SETTING_SHARED_FILESYSTEM = "index.shared_filesystem";
     public static final Setting<Boolean> INDEX_SHARED_FILESYSTEM_SETTING =
-        Setting.boolSetting(SETTING_SHARED_FILESYSTEM, INDEX_SHADOW_REPLICAS_SETTING, Property.IndexScope, Property.Deprecated);
+        Setting.boolSetting(SETTING_SHARED_FILESYSTEM, false, Property.IndexScope);
 
     public static final String SETTING_AUTO_EXPAND_REPLICAS = "index.auto_expand_replicas";
     public static final Setting<AutoExpandReplicas> INDEX_AUTO_EXPAND_REPLICAS_SETTING = AutoExpandReplicas.SETTING;
@@ -232,11 +232,10 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
     public static final String SETTING_INDEX_UUID = "index.uuid";
     public static final String SETTING_DATA_PATH = "index.data_path";
     public static final Setting<String> INDEX_DATA_PATH_SETTING =
-        new Setting<>(SETTING_DATA_PATH, "", Function.identity(), Property.IndexScope, Property.Deprecated);
+        new Setting<>(SETTING_DATA_PATH, "", Function.identity(), Property.IndexScope);
     public static final String SETTING_SHARED_FS_ALLOW_RECOVERY_ON_ANY_NODE = "index.shared_filesystem.recover_on_any_node";
     public static final Setting<Boolean> INDEX_SHARED_FS_ALLOW_RECOVERY_ON_ANY_NODE_SETTING =
-        Setting.boolSetting(SETTING_SHARED_FS_ALLOW_RECOVERY_ON_ANY_NODE, false,
-            Property.Dynamic, Property.IndexScope, Property.Deprecated);
+        Setting.boolSetting(SETTING_SHARED_FS_ALLOW_RECOVERY_ON_ANY_NODE, false, Property.Dynamic, Property.IndexScope);
     public static final String INDEX_UUID_NA_VALUE = "_na_";
 
     public static final String INDEX_ROUTING_REQUIRE_GROUP_PREFIX = "index.routing.allocation.require";
@@ -1218,7 +1217,6 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
      * {@link #isIndexUsingShadowReplicas(org.elasticsearch.common.settings.Settings)}.
      */
     public static boolean isOnSharedFilesystem(Settings settings) {
-        // don't use the settings directly, not to trigger manny deprecation
         return settings.getAsBoolean(SETTING_SHARED_FILESYSTEM, isIndexUsingShadowReplicas(settings));
     }
 
@@ -1228,7 +1226,6 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
      * setting for this is <code>false</code>.
      */
     public static boolean isIndexUsingShadowReplicas(Settings settings) {
-        // don't use the settings directly, not to trigger manny deprecation
         return settings.getAsBoolean(SETTING_SHADOW_REPLICAS, false);
     }
 

+ 1 - 2
core/src/main/java/org/elasticsearch/env/Environment.java

@@ -56,8 +56,7 @@ public class Environment {
     public static final Setting<String> PATH_LOGS_SETTING = Setting.simpleString("path.logs", Property.NodeScope);
     public static final Setting<List<String>> PATH_REPO_SETTING =
         Setting.listSetting("path.repo", Collections.emptyList(), Function.identity(), Property.NodeScope);
-    public static final Setting<String> PATH_SHARED_DATA_SETTING = Setting.simpleString("path.shared_data",
-        Property.NodeScope, Property.Deprecated);
+    public static final Setting<String> PATH_SHARED_DATA_SETTING = Setting.simpleString("path.shared_data", Property.NodeScope);
     public static final Setting<String> PIDFILE_SETTING = Setting.simpleString("pidfile", Property.NodeScope);
 
     private final Settings settings;

+ 2 - 1
core/src/main/java/org/elasticsearch/env/NodeEnvironment.java

@@ -38,6 +38,7 @@ import org.elasticsearch.common.Randomness;
 import org.elasticsearch.common.SuppressForbidden;
 import org.elasticsearch.common.UUIDs;
 import org.elasticsearch.common.io.FileSystemUtils;
+import org.elasticsearch.common.logging.DeprecationLogger;
 import org.elasticsearch.common.logging.Loggers;
 import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Setting.Property;
@@ -161,7 +162,7 @@ public final class NodeEnvironment  implements Closeable {
      * If true automatically append node lock id to custom data paths.
      */
     public static final Setting<Boolean> ADD_NODE_LOCK_ID_TO_CUSTOM_PATH =
-        Setting.boolSetting("node.add_lock_id_to_custom_path", true, Property.NodeScope, Property.Deprecated);
+        Setting.boolSetting("node.add_lock_id_to_custom_path", true, Property.NodeScope);
 
 
     /**

+ 1 - 1
docs/reference/indices/shadow-replicas.asciidoc

@@ -1,7 +1,7 @@
 [[indices-shadow-replicas]]
 == Shadow replica indices
 
-deprecated[5.2.0, Shadow replicas don't see much usage and we are planning to remove them]
+experimental[]
 
 If you would like to use a shared filesystem, you can use the shadow replicas
 settings to choose where on disk the data for an index should be kept, as well

+ 0 - 5
docs/reference/migration/migrate_6_0/indices.asciidoc

@@ -27,8 +27,3 @@ PUT _template/template_2
 }
 --------------------------------------------------
 // CONSOLE
-
-
-=== Shadow Replicas are deprecated
-
-<<indices-shadow-replicas,Shadow Replicas>> don't see much usage and we are planning to remove them.