Skip to content

Commit f003378

Browse files
committed
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 60437b4 commit f003378

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

docs/reference/migration/index.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ For information about how to upgrade your cluster, see <<setup-upgrade>>.
1111

1212
--
1313

14+
include::migrate_7_8.asciidoc[]
1415
include::migrate_7_7.asciidoc[]
1516
include::migrate_7_6.asciidoc[]
1617
include::migrate_7_5.asciidoc[]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[[breaking-changes-7.8]]
2+
== Breaking changes in 7.8
3+
++++
4+
<titleabbrev>7.8</titleabbrev>
5+
++++
6+
7+
This section discusses the changes that you need to be aware of when migrating
8+
your application to Elasticsearch 7.8.
9+
10+
See also <<release-highlights>> and <<es-release-notes>>.
11+
12+
coming[7.8.0]
13+
14+
//NOTE: The notable-breaking-changes tagged regions are re-used in the
15+
//Installation and Upgrade Guide
16+
17+
//tag::notable-breaking-changes[]
18+
19+
//end::notable-breaking-changes[]
20+
21+
[discrete]
22+
[[breaking_78_settings_changes]]
23+
=== Settings changes
24+
25+
[discrete]
26+
[[deprecate-node-local-storage]]
27+
==== `node.local_storage` is deprecated
28+
29+
In Elasticsearch 7.8.0, the setting `node.local_storage` was deprecated and
30+
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
@@ -214,7 +214,8 @@ public class Node implements Closeable {
214214
* and {@link #NODE_MASTER_SETTING} must also be false.
215215
*
216216
*/
217-
public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING = Setting.boolSetting("node.local_storage", true, Property.NodeScope);
217+
public static final Setting<Boolean> NODE_LOCAL_STORAGE_SETTING =
218+
Setting.boolSetting("node.local_storage", true, Property.Deprecated, Property.NodeScope);
218219
public static final Setting<String> NODE_NAME_SETTING = Setting.simpleString("node.name", Property.NodeScope);
219220
public static final Setting.AffixSetting<String> NODE_ATTRIBUTES = Setting.prefixKeySetting("node.attr.", (key) ->
220221
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;
@@ -438,6 +439,7 @@ public void testNodeIdNotPersistedAtInitialization() throws IOException {
438439
env = newNodeEnvironment(Settings.EMPTY);
439440
assertThat(env.nodeId(), not(equalTo(nodeID)));
440441
env.close();
442+
assertSettingDeprecationsAndWarnings(new Setting<?>[]{Node.NODE_LOCAL_STORAGE_SETTING});
441443
}
442444

443445
public void testExistingTempFiles() throws IOException {

0 commit comments

Comments
 (0)