Skip to content

Commit

Permalink
Remove deprecated transport settings
Browse files Browse the repository at this point in the history
This is related to elastic#36652. There are a number of transport settings that
were deprecated and replaced with new versions in 7.x. This commit
removes them from 8.0.
  • Loading branch information
Tim-Brooks committed Apr 5, 2019
1 parent f49436d commit 5a82602
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 64 deletions.
9 changes: 9 additions & 0 deletions docs/reference/migration/migrate_8_0/http.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[float]
[[breaking_80_http_changes]]
=== HTTP changes

[float]
==== Removal of old HTTP settings

The `http.tcp_no_delay` setting was deprecated in 7.x and has been removed in 8.0. It has been replaced by
`http.tcp.no_delay`.
10 changes: 10 additions & 0 deletions docs/reference/migration/migrate_8_0/network.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[float]
[[breaking_80_network_changes]]
=== Network changes

[float]
==== Removal of old network settings

The `network.tcp.connect_timeout` setting was deprecated in 7.x and has been removed in 8.0. This setting
was a fallback setting for `transport.connect_timeout`. To change the default connection timeout for client
connections `transport.connect_timeout` should be modified.
19 changes: 19 additions & 0 deletions docs/reference/migration/migrate_8_0/transport.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[float]
[[breaking_80_transport_changes]]
=== Transport changes

[float]
==== Removal of old transport settings

The following settings have been deprecated in 7.x and removed in 8.0. Each setting has a replacement
setting that was introduced in 6.7.

- `transport.tcp.port` replaced by `transport.port`
- `transport.tcp.compress` replaced by `transport.compress`
- `transport.tcp.connect_timeout` replaced by `transport.connect_timeout`
- `transport.tcp_no_delay` replaced by `transport.tcp.no_delay`
- `transport.profiles.profile_name.tcp_no_delay` replaced by `transport.profiles.profile_name.tcp.no_delay`
- `transport.profiles.profile_name.tcp_keep_alive` replaced by `transport.profiles.profile_name.tcp.keep_alive`
- `transport.profiles.profile_name.reuse_address` replaced by `transport.profiles.profile_name.tcp.reuse_address`
- `transport.profiles.profile_name.send_buffer_size` replaced by `transport.profiles.profile_name.tcp.send_buffer_size`
- `transport.profiles.profile_name.receive_buffer_size` replaced by `transport.profiles.profile_name.tcp.receive_buffer_size`
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue;

import java.io.IOException;
import java.net.InetAddress;
Expand All @@ -32,7 +31,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;

public final class NetworkService {
Expand All @@ -58,9 +56,6 @@ public final class NetworkService {
Setting.byteSizeSetting("network.tcp.send_buffer_size", new ByteSizeValue(-1), Property.NodeScope);
public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE =
Setting.byteSizeSetting("network.tcp.receive_buffer_size", new ByteSizeValue(-1), Property.NodeScope);
public static final Setting<TimeValue> TCP_CONNECT_TIMEOUT =
Setting.timeSetting("network.tcp.connect_timeout", new TimeValue(30, TimeUnit.SECONDS), Property.NodeScope,
Setting.Property.Deprecated);

/**
* A custom name resolver can support custom lookup keys (my_net_key:ipv4) and also change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ public void apply(Settings value, Settings current, Settings previous) {
HttpTransportSettings.SETTING_HTTP_MAX_INITIAL_LINE_LENGTH,
HttpTransportSettings.SETTING_HTTP_READ_TIMEOUT,
HttpTransportSettings.SETTING_HTTP_RESET_COOKIES,
HttpTransportSettings.OLD_SETTING_HTTP_TCP_NO_DELAY,
HttpTransportSettings.SETTING_HTTP_TCP_NO_DELAY,
HttpTransportSettings.SETTING_HTTP_TCP_KEEP_ALIVE,
HttpTransportSettings.SETTING_HTTP_TCP_REUSE_ADDRESS,
Expand Down Expand Up @@ -309,32 +308,23 @@ public void apply(Settings value, Settings current, Settings previous) {
TransportSettings.PUBLISH_HOST_PROFILE,
TransportSettings.BIND_HOST,
TransportSettings.BIND_HOST_PROFILE,
TransportSettings.OLD_PORT,
TransportSettings.PORT,
TransportSettings.PORT_PROFILE,
TransportSettings.PUBLISH_PORT,
TransportSettings.PUBLISH_PORT_PROFILE,
TransportSettings.OLD_TRANSPORT_COMPRESS,
TransportSettings.TRANSPORT_COMPRESS,
TransportSettings.PING_SCHEDULE,
TransportSettings.TCP_CONNECT_TIMEOUT,
TransportSettings.CONNECT_TIMEOUT,
TransportSettings.DEFAULT_FEATURES_SETTING,
TransportSettings.OLD_TCP_NO_DELAY,
TransportSettings.TCP_NO_DELAY,
TransportSettings.OLD_TCP_NO_DELAY_PROFILE,
TransportSettings.TCP_NO_DELAY_PROFILE,
TransportSettings.TCP_KEEP_ALIVE,
TransportSettings.OLD_TCP_KEEP_ALIVE_PROFILE,
TransportSettings.TCP_KEEP_ALIVE_PROFILE,
TransportSettings.TCP_REUSE_ADDRESS,
TransportSettings.OLD_TCP_REUSE_ADDRESS_PROFILE,
TransportSettings.TCP_REUSE_ADDRESS_PROFILE,
TransportSettings.TCP_SEND_BUFFER_SIZE,
TransportSettings.OLD_TCP_SEND_BUFFER_SIZE_PROFILE,
TransportSettings.TCP_SEND_BUFFER_SIZE_PROFILE,
TransportSettings.TCP_RECEIVE_BUFFER_SIZE,
TransportSettings.OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE,
TransportSettings.TCP_RECEIVE_BUFFER_SIZE_PROFILE,
TransportSettings.CONNECTIONS_PER_NODE_RECOVERY,
TransportSettings.CONNECTIONS_PER_NODE_BULK,
Expand All @@ -352,7 +342,6 @@ public void apply(Settings value, Settings current, Settings previous) {
NetworkService.TCP_REUSE_ADDRESS,
NetworkService.TCP_SEND_BUFFER_SIZE,
NetworkService.TCP_RECEIVE_BUFFER_SIZE,
NetworkService.TCP_CONNECT_TIMEOUT,
IndexSettings.QUERY_STRING_ANALYZE_WILDCARD,
IndexSettings.QUERY_STRING_ALLOW_LEADING_WILDCARD,
ScriptService.SCRIPT_CACHE_SIZE_SETTING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ public final class HttpTransportSettings {

// Tcp socket settings

public static final Setting<Boolean> OLD_SETTING_HTTP_TCP_NO_DELAY =
boolSetting("http.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope, Setting.Property.Deprecated);
public static final Setting<Boolean> SETTING_HTTP_TCP_NO_DELAY =
boolSetting("http.tcp.no_delay", OLD_SETTING_HTTP_TCP_NO_DELAY, Setting.Property.NodeScope);
boolSetting("http.tcp.no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope);
public static final Setting<Boolean> SETTING_HTTP_TCP_KEEP_ALIVE =
boolSetting("http.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope);
public static final Setting<Boolean> SETTING_HTTP_TCP_REUSE_ADDRESS =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;

import static java.util.Collections.emptyList;
Expand All @@ -52,84 +53,48 @@ public final class TransportSettings {
listSetting("transport.bind_host", HOST, Function.identity(), Setting.Property.NodeScope);
public static final Setting.AffixSetting<List<String>> BIND_HOST_PROFILE = affixKeySetting("transport.profiles.", "bind_host",
key -> listSetting(key, BIND_HOST, Function.identity(), Setting.Property.NodeScope));
public static final Setting<String> OLD_PORT =
new Setting<>("transport.tcp.port", "9300-9400", Function.identity(), Setting.Property.NodeScope, Setting.Property.Deprecated);
public static final Setting<String> PORT =
new Setting<>("transport.port", OLD_PORT, Function.identity(), Setting.Property.NodeScope);
new Setting<>("transport.port", "9300-9400", Function.identity(), Setting.Property.NodeScope);
public static final Setting.AffixSetting<String> PORT_PROFILE = affixKeySetting("transport.profiles.", "port",
key -> new Setting<>(key, PORT, Function.identity(), Setting.Property.NodeScope));
public static final Setting<Integer> PUBLISH_PORT =
intSetting("transport.publish_port", -1, -1, Setting.Property.NodeScope);
public static final Setting.AffixSetting<Integer> PUBLISH_PORT_PROFILE = affixKeySetting("transport.profiles.", "publish_port",
key -> intSetting(key, -1, -1, Setting.Property.NodeScope));
public static final Setting<Boolean> OLD_TRANSPORT_COMPRESS =
boolSetting("transport.tcp.compress", false, Setting.Property.NodeScope, Setting.Property.Deprecated);
public static final Setting<Boolean> TRANSPORT_COMPRESS =
boolSetting("transport.compress", OLD_TRANSPORT_COMPRESS, Setting.Property.NodeScope);
boolSetting("transport.compress", false, Setting.Property.NodeScope);
// the scheduled internal ping interval setting, defaults to disabled (-1)
public static final Setting<TimeValue> PING_SCHEDULE =
timeSetting("transport.ping_schedule", TimeValue.timeValueSeconds(-1), Setting.Property.NodeScope);
public static final Setting<TimeValue> TCP_CONNECT_TIMEOUT =
timeSetting("transport.tcp.connect_timeout", NetworkService.TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope,
Setting.Property.Deprecated);
public static final Setting<TimeValue> CONNECT_TIMEOUT =
timeSetting("transport.connect_timeout", TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope);
timeSetting("transport.connect_timeout", new TimeValue(30, TimeUnit.SECONDS), Setting.Property.NodeScope);
public static final Setting<Settings> DEFAULT_FEATURES_SETTING = Setting.groupSetting(FEATURE_PREFIX + ".", Setting.Property.NodeScope);

// Tcp socket settings

public static final Setting<Boolean> OLD_TCP_NO_DELAY =
boolSetting("transport.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope, Setting.Property.Deprecated);
public static final Setting<Boolean> TCP_NO_DELAY =
boolSetting("transport.tcp.no_delay", OLD_TCP_NO_DELAY, Setting.Property.NodeScope);
public static final Setting.AffixSetting<Boolean> OLD_TCP_NO_DELAY_PROFILE =
affixKeySetting("transport.profiles.", "tcp_no_delay", key -> boolSetting(key, TCP_NO_DELAY, Setting.Property.NodeScope,
Setting.Property.Deprecated));
boolSetting("transport.tcp.no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope);
public static final Setting.AffixSetting<Boolean> TCP_NO_DELAY_PROFILE =
affixKeySetting("transport.profiles.", "tcp.no_delay",
key -> boolSetting(key,
fallback(key, OLD_TCP_NO_DELAY_PROFILE, "tcp\\.no_delay$", "tcp_no_delay"),
Setting.Property.NodeScope));
affixKeySetting("transport.profiles.", "tcp.no_delay", key -> boolSetting(key, TCP_NO_DELAY, Setting.Property.NodeScope));
public static final Setting<Boolean> TCP_KEEP_ALIVE =
boolSetting("transport.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope);
public static final Setting.AffixSetting<Boolean> OLD_TCP_KEEP_ALIVE_PROFILE =
affixKeySetting("transport.profiles.", "tcp_keep_alive",
key -> boolSetting(key, TCP_KEEP_ALIVE, Setting.Property.NodeScope, Setting.Property.Deprecated));
public static final Setting.AffixSetting<Boolean> TCP_KEEP_ALIVE_PROFILE =
affixKeySetting("transport.profiles.", "tcp.keep_alive",
key -> boolSetting(key,
fallback(key, OLD_TCP_KEEP_ALIVE_PROFILE, "tcp\\.keep_alive$", "tcp_keep_alive"),
Setting.Property.NodeScope));
key -> boolSetting(key, TCP_KEEP_ALIVE, Setting.Property.NodeScope));
public static final Setting<Boolean> TCP_REUSE_ADDRESS =
boolSetting("transport.tcp.reuse_address", NetworkService.TCP_REUSE_ADDRESS, Setting.Property.NodeScope);
public static final Setting.AffixSetting<Boolean> OLD_TCP_REUSE_ADDRESS_PROFILE =
affixKeySetting("transport.profiles.", "reuse_address", key -> boolSetting(key, TCP_REUSE_ADDRESS, Setting.Property.NodeScope,
Setting.Property.Deprecated));
public static final Setting.AffixSetting<Boolean> TCP_REUSE_ADDRESS_PROFILE =
affixKeySetting("transport.profiles.", "tcp.reuse_address",
key -> boolSetting(key,
fallback(key, OLD_TCP_REUSE_ADDRESS_PROFILE, "tcp\\.reuse_address$", "reuse_address"),
Setting.Property.NodeScope));
affixKeySetting("transport.profiles.", "tcp.reuse_address", key -> boolSetting(key, TCP_REUSE_ADDRESS, Setting.Property.NodeScope));
public static final Setting<ByteSizeValue> TCP_SEND_BUFFER_SIZE =
Setting.byteSizeSetting("transport.tcp.send_buffer_size", NetworkService.TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope);
public static final Setting.AffixSetting<ByteSizeValue> OLD_TCP_SEND_BUFFER_SIZE_PROFILE =
affixKeySetting("transport.profiles.", "send_buffer_size",
key -> Setting.byteSizeSetting(key, TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope, Setting.Property.Deprecated));
public static final Setting.AffixSetting<ByteSizeValue> TCP_SEND_BUFFER_SIZE_PROFILE =
affixKeySetting("transport.profiles.", "tcp.send_buffer_size",
key -> Setting.byteSizeSetting(key,
fallback(key, OLD_TCP_SEND_BUFFER_SIZE_PROFILE, "tcp\\.send_buffer_size$", "send_buffer_size"),
Setting.Property.NodeScope));
key -> Setting.byteSizeSetting(key, TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope));
public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE =
Setting.byteSizeSetting("transport.tcp.receive_buffer_size", NetworkService.TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope);
public static final Setting.AffixSetting<ByteSizeValue> OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE =
affixKeySetting("transport.profiles.", "receive_buffer_size",
key -> Setting.byteSizeSetting(key, TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope, Setting.Property.Deprecated));
public static final Setting.AffixSetting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE_PROFILE =
affixKeySetting("transport.profiles.", "tcp.receive_buffer_size",
key -> Setting.byteSizeSetting(key,
fallback(key, OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE, "tcp\\.receive_buffer_size$", "receive_buffer_size"),
Setting.Property.NodeScope));
key -> Setting.byteSizeSetting(key, TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope));

// Connections per node settings

Expand Down

0 comments on commit 5a82602

Please sign in to comment.