Skip to content

Commit d495ed9

Browse files
authored
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.
1 parent 4164f1e commit d495ed9

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

docs/reference/migration/migrate_8_0/settings.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ processors.
4444
In Elasticsearch 7.7.0, the setting `cluster.remote.connect` was deprecated in
4545
favor of setting `node.remote_cluster_client`. In Elasticsearch 8.0.0, the
4646
setting `cluster.remote.connect` is removed.
47+
48+
[float]
49+
==== `node.local_storage` is deprecated
50+
51+
In Elasticsearch 7.8.0, the setting `node.local_storage` was deprecated and
52+
beginning in Elasticsearch 8.0.0 all nodes will require local storage.

server/src/main/java/org/elasticsearch/node/Node.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ public class Node implements Closeable {
210210
* and {@link #NODE_MASTER_SETTING} must also be false.
211211
*
212212
*/
213-
public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING = Setting.boolSetting("node.local_storage", true, Property.NodeScope);
213+
public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING =
214+
Setting.boolSetting("node.local_storage", true, Property.Deprecated, Property.NodeScope);
214215
public static final Setting<String> NODE_NAME_SETTING = Setting.simpleString("node.name", Property.NodeScope);
215216
public static final Setting.AffixSetting<String> NODE_ATTRIBUTES = Setting.prefixKeySetting("node.attr.", (key) ->
216217
new Setting<>(key, "", (value) -> {

server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.apache.lucene.util.LuceneTestCase;
2323
import org.elasticsearch.common.SuppressForbidden;
2424
import org.elasticsearch.common.io.PathUtils;
25+
import org.elasticsearch.common.settings.Setting;
2526
import org.elasticsearch.common.settings.Settings;
2627
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
2728
import org.elasticsearch.common.util.set.Sets;
@@ -403,6 +404,7 @@ public void testNodeIdNotPersistedAtInitialization() throws IOException {
403404
env = newNodeEnvironment(Settings.EMPTY);
404405
assertThat(env.nodeId(), not(equalTo(nodeID)));
405406
env.close();
407+
assertSettingDeprecationsAndWarnings(new Setting<?>[]{Node.NODE_LOCAL_STORAGE_SETTING});
406408
}
407409

408410
public void testExistingTempFiles() throws IOException {

0 commit comments

Comments
 (0)