diff --git a/docs/reference/migration/migrate_8_0/http.asciidoc b/docs/reference/migration/migrate_8_0/http.asciidoc new file mode 100644 index 000000000000..268af539adfc --- /dev/null +++ b/docs/reference/migration/migrate_8_0/http.asciidoc @@ -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`. \ No newline at end of file diff --git a/docs/reference/migration/migrate_8_0/network.asciidoc b/docs/reference/migration/migrate_8_0/network.asciidoc new file mode 100644 index 000000000000..239691a2ee3b --- /dev/null +++ b/docs/reference/migration/migrate_8_0/network.asciidoc @@ -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. \ No newline at end of file diff --git a/docs/reference/migration/migrate_8_0/transport.asciidoc b/docs/reference/migration/migrate_8_0/transport.asciidoc new file mode 100644 index 000000000000..c996a51fce4c --- /dev/null +++ b/docs/reference/migration/migrate_8_0/transport.asciidoc @@ -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` \ No newline at end of file diff --git a/server/src/main/java/org/elasticsearch/common/network/NetworkService.java b/server/src/main/java/org/elasticsearch/common/network/NetworkService.java index babc83a17722..cdae56a4e59c 100644 --- a/server/src/main/java/org/elasticsearch/common/network/NetworkService.java +++ b/server/src/main/java/org/elasticsearch/common/network/NetworkService.java @@ -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; @@ -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 { @@ -58,9 +56,6 @@ public final class NetworkService { Setting.byteSizeSetting("network.tcp.send_buffer_size", new ByteSizeValue(-1), Property.NodeScope); public static final Setting TCP_RECEIVE_BUFFER_SIZE = Setting.byteSizeSetting("network.tcp.receive_buffer_size", new ByteSizeValue(-1), Property.NodeScope); - public static final Setting 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 diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index 315e6175a3a3..82ae117c3e24 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -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, @@ -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, @@ -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, diff --git a/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java b/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java index 2a5639f2e72c..58d30edf7994 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java +++ b/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java @@ -107,10 +107,8 @@ public final class HttpTransportSettings { // Tcp socket settings - public static final Setting 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 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 SETTING_HTTP_TCP_KEEP_ALIVE = boolSetting("http.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope); public static final Setting SETTING_HTTP_TCP_REUSE_ADDRESS = diff --git a/server/src/main/java/org/elasticsearch/transport/TransportSettings.java b/server/src/main/java/org/elasticsearch/transport/TransportSettings.java index 1dd5541b0e2e..b89c06de84a1 100644 --- a/server/src/main/java/org/elasticsearch/transport/TransportSettings.java +++ b/server/src/main/java/org/elasticsearch/transport/TransportSettings.java @@ -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; @@ -52,84 +53,48 @@ public final class TransportSettings { listSetting("transport.bind_host", HOST, Function.identity(), Setting.Property.NodeScope); public static final Setting.AffixSetting> BIND_HOST_PROFILE = affixKeySetting("transport.profiles.", "bind_host", key -> listSetting(key, BIND_HOST, Function.identity(), Setting.Property.NodeScope)); - public static final Setting OLD_PORT = - new Setting<>("transport.tcp.port", "9300-9400", Function.identity(), Setting.Property.NodeScope, Setting.Property.Deprecated); public static final Setting 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 PORT_PROFILE = affixKeySetting("transport.profiles.", "port", key -> new Setting<>(key, PORT, Function.identity(), Setting.Property.NodeScope)); public static final Setting PUBLISH_PORT = intSetting("transport.publish_port", -1, -1, Setting.Property.NodeScope); public static final Setting.AffixSetting PUBLISH_PORT_PROFILE = affixKeySetting("transport.profiles.", "publish_port", key -> intSetting(key, -1, -1, Setting.Property.NodeScope)); - public static final Setting OLD_TRANSPORT_COMPRESS = - boolSetting("transport.tcp.compress", false, Setting.Property.NodeScope, Setting.Property.Deprecated); public static final Setting 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 PING_SCHEDULE = timeSetting("transport.ping_schedule", TimeValue.timeValueSeconds(-1), Setting.Property.NodeScope); - public static final Setting TCP_CONNECT_TIMEOUT = - timeSetting("transport.tcp.connect_timeout", NetworkService.TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope, - Setting.Property.Deprecated); public static final Setting 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 DEFAULT_FEATURES_SETTING = Setting.groupSetting(FEATURE_PREFIX + ".", Setting.Property.NodeScope); // Tcp socket settings - public static final Setting OLD_TCP_NO_DELAY = - boolSetting("transport.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope, Setting.Property.Deprecated); public static final Setting TCP_NO_DELAY = - boolSetting("transport.tcp.no_delay", OLD_TCP_NO_DELAY, Setting.Property.NodeScope); - public static final Setting.AffixSetting 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 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 TCP_KEEP_ALIVE = boolSetting("transport.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope); - public static final Setting.AffixSetting 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 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 TCP_REUSE_ADDRESS = boolSetting("transport.tcp.reuse_address", NetworkService.TCP_REUSE_ADDRESS, Setting.Property.NodeScope); - public static final Setting.AffixSetting 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 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 TCP_SEND_BUFFER_SIZE = Setting.byteSizeSetting("transport.tcp.send_buffer_size", NetworkService.TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope); - public static final Setting.AffixSetting 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 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 TCP_RECEIVE_BUFFER_SIZE = Setting.byteSizeSetting("transport.tcp.receive_buffer_size", NetworkService.TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope); - public static final Setting.AffixSetting 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 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