Browse Source

Deprecate node local storage setting (#54374)

This setting is not documented and has dubious value since it means
there can be nodes in the cluster (non-data and non-master nodes) that
do not have persistent node IDs. This does not have any use cases so
this commit removes the setting.
Jason Tedor 5 years ago
parent
commit
d495ed956f

+ 6 - 0
docs/reference/migration/migrate_8_0/settings.asciidoc

@@ -44,3 +44,9 @@ processors.
 In Elasticsearch 7.7.0, the setting `cluster.remote.connect` was deprecated in
 favor of setting `node.remote_cluster_client`. In Elasticsearch 8.0.0, the
 setting `cluster.remote.connect` is removed.
+
+[float]
+==== `node.local_storage` is deprecated
+
+In Elasticsearch 7.8.0, the setting `node.local_storage` was deprecated and
+beginning in Elasticsearch 8.0.0 all nodes will require local storage.

+ 2 - 1
server/src/main/java/org/elasticsearch/node/Node.java

@@ -210,7 +210,8 @@ public class Node implements Closeable {
     * and {@link #NODE_MASTER_SETTING} must also be false.
     *
     */
-    public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING = Setting.boolSetting("node.local_storage", true, Property.NodeScope);
+    public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING =
+        Setting.boolSetting("node.local_storage", true, Property.Deprecated, Property.NodeScope);
     public static final Setting<String> NODE_NAME_SETTING = Setting.simpleString("node.name", Property.NodeScope);
     public static final Setting.AffixSetting<String> NODE_ATTRIBUTES = Setting.prefixKeySetting("node.attr.", (key) ->
         new Setting<>(key, "", (value) -> {

+ 2 - 0
server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java

@@ -22,6 +22,7 @@ import org.apache.lucene.index.SegmentInfos;
 import org.apache.lucene.util.LuceneTestCase;
 import org.elasticsearch.common.SuppressForbidden;
 import org.elasticsearch.common.io.PathUtils;
+import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.util.concurrent.AbstractRunnable;
 import org.elasticsearch.common.util.set.Sets;
@@ -403,6 +404,7 @@ public class NodeEnvironmentTests extends ESTestCase {
         env = newNodeEnvironment(Settings.EMPTY);
         assertThat(env.nodeId(), not(equalTo(nodeID)));
         env.close();
+        assertSettingDeprecationsAndWarnings(new Setting<?>[]{Node.NODE_LOCAL_STORAGE_SETTING});
     }
 
     public void testExistingTempFiles() throws IOException {