Skip to content

Commit

Permalink
Revert "Add a deprecation notice to shadow replicas (#22025)"
Browse files Browse the repository at this point in the history
This reverts commit 0da1902.
  • Loading branch information
bleskes committed Jan 16, 2017
1 parent b887681 commit f88ab76
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ static Setting<Integer> buildNumberOfShardsSetting() {
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;
Expand Down Expand Up @@ -232,11 +232,10 @@ static Setting<Integer> buildNumberOfShardsSetting() {
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";
Expand Down Expand Up @@ -1218,7 +1217,6 @@ public static IndexMetaData fromXContent(XContentParser parser) throws IOExcepti
* {@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));
}

Expand All @@ -1228,7 +1226,6 @@ public static boolean isOnSharedFilesystem(Settings settings) {
* 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);
}

Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/org/elasticsearch/env/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
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;
Expand Down Expand Up @@ -161,7 +162,7 @@ public String toString() {
* 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);


/**
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/indices/shadow-replicas.asciidoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 0 additions & 5 deletions docs/reference/migration/migrate_6_0/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit f88ab76

Please sign in to comment.