Deprecate max_local_storage_nodes (#42426)

Allows this setting to be removed in 8.0, see #42428
This commit is contained in:
Yannick Welsch 2019-05-23 15:59:55 +02:00 committed by GitHub
parent 85ff9543b7
commit f57fdc57e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -282,8 +282,8 @@ your data! The RPM and Debian distributions do this for you already.
=== `node.max_local_storage_nodes`
The <<data-path,data path>> can be shared by multiple nodes, even by nodes from different
clusters. This is very useful for testing failover and different configurations on your development
machine. In production, however, it is recommended to run only one node of Elasticsearch per server.
clusters. It is recommended however to only run one node of Elasticsearch using the same data path.
This setting is deprecated in 7.x and will be removed in version 8.0.
By default, Elasticsearch is configured to prevent more than one node from sharing the same data
path. To allow for more than one node (e.g., on your development machine), use the setting

View File

@ -164,7 +164,7 @@ public final class NodeEnvironment implements Closeable {
* Maximum number of data nodes that should run in an environment.
*/
public static final Setting<Integer> MAX_LOCAL_STORAGE_NODES_SETTING = Setting.intSetting("node.max_local_storage_nodes", 1, 1,
Property.NodeScope);
Property.NodeScope, Property.Deprecated);
/**
* Seed for determining a persisted unique uuid of this node. If the node has already a persisted uuid on disk,

View File

@ -73,6 +73,8 @@ public class NodeEnvironmentTests extends ESTestCase {
int max = NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.get(
Settings.builder().put(NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.getKey(), value).build());
assertEquals(value, max);
assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " +
"See the breaking changes documentation for the next major version.");
}
public void testNodeLockSingleEnvironment() throws IOException {
@ -95,6 +97,8 @@ public class NodeEnvironmentTests extends ESTestCase {
}
env.close();
assertThat(env.lockedShards(), empty());
assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " +
"See the breaking changes documentation for the next major version.");
}
@SuppressForbidden(reason = "System.out.*")
@ -129,6 +133,8 @@ public class NodeEnvironmentTests extends ESTestCase {
assertEquals(first.nodeDataPaths()[i].getParent(), second.nodeDataPaths()[i].getParent());
}
IOUtils.close(first, second);
assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " +
"See the breaking changes documentation for the next major version.");
}
public void testShardLock() throws Exception {