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 cde873fa577..babc83a1772 100644 --- a/server/src/main/java/org/elasticsearch/common/network/NetworkService.java +++ b/server/src/main/java/org/elasticsearch/common/network/NetworkService.java @@ -58,9 +58,9 @@ 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); - // TODO: Deprecate in 7.0 public static final Setting TCP_CONNECT_TIMEOUT = - Setting.timeSetting("network.tcp.connect_timeout", new TimeValue(30, TimeUnit.SECONDS), Property.NodeScope); + 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/http/HttpTransportSettings.java b/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java index ddd8bfa7385..2a5639f2e72 100644 --- a/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java +++ b/server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java @@ -107,9 +107,8 @@ public final class HttpTransportSettings { // Tcp socket settings - // TODO: Deprecate in 7.0 public static final Setting OLD_SETTING_HTTP_TCP_NO_DELAY = - boolSetting("http.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope); + 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); public static final Setting SETTING_HTTP_TCP_KEEP_ALIVE = diff --git a/server/src/main/java/org/elasticsearch/transport/TransportSettings.java b/server/src/main/java/org/elasticsearch/transport/TransportSettings.java index 60e230004ca..253177836a9 100644 --- a/server/src/main/java/org/elasticsearch/transport/TransportSettings.java +++ b/server/src/main/java/org/elasticsearch/transport/TransportSettings.java @@ -52,9 +52,8 @@ 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)); - // TODO: Deprecate in 7.0 public static final Setting OLD_PORT = - new Setting<>("transport.tcp.port", "9300-9400", Function.identity(), Setting.Property.NodeScope); + 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); public static final Setting.AffixSetting PORT_PROFILE = affixKeySetting("transport.profiles.", "port", @@ -63,31 +62,29 @@ public final class TransportSettings { 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)); - // TODO: Deprecate in 7.0 public static final Setting OLD_TRANSPORT_COMPRESS = - boolSetting("transport.tcp.compress", false, Setting.Property.NodeScope); + 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); // 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); - // TODO: Deprecate in 7.0 public static final Setting TCP_CONNECT_TIMEOUT = - timeSetting("transport.tcp.connect_timeout", NetworkService.TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope); + 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); public static final Setting DEFAULT_FEATURES_SETTING = Setting.groupSetting(FEATURE_PREFIX + ".", Setting.Property.NodeScope); // Tcp socket settings - // TODO: Deprecate in 7.0 public static final Setting OLD_TCP_NO_DELAY = - boolSetting("transport.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope); + 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); - // TODO: Deprecate in 7.0 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)); + affixKeySetting("transport.profiles.", "tcp_no_delay", key -> boolSetting(key, TCP_NO_DELAY, Setting.Property.NodeScope, + Setting.Property.Deprecated)); public static final Setting.AffixSetting TCP_NO_DELAY_PROFILE = affixKeySetting("transport.profiles.", "tcp.no_delay", key -> boolSetting(key, @@ -95,9 +92,9 @@ public final class TransportSettings { Setting.Property.NodeScope)); public static final Setting TCP_KEEP_ALIVE = boolSetting("transport.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope); - // TODO: Deprecate in 7.0 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)); + 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, @@ -105,9 +102,9 @@ public final class TransportSettings { Setting.Property.NodeScope)); public static final Setting TCP_REUSE_ADDRESS = boolSetting("transport.tcp.reuse_address", NetworkService.TCP_REUSE_ADDRESS, Setting.Property.NodeScope); - // TODO: Deprecate in 7.0 public static final Setting.AffixSetting OLD_TCP_REUSE_ADDRESS_PROFILE = - affixKeySetting("transport.profiles.", "reuse_address", key -> boolSetting(key, TCP_REUSE_ADDRESS, Setting.Property.NodeScope)); + 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, @@ -115,10 +112,9 @@ public final class TransportSettings { 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); - // TODO: Deprecate in 7.0 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)); + 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, @@ -126,10 +122,9 @@ public final class TransportSettings { 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); - // TODO: Deprecate in 7.0 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)); + 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, diff --git a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java index 32215b204fb..567607c6e15 100644 --- a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java @@ -2585,7 +2585,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase { Settings defaultProfileSettings = Settings.builder() .put("transport.profiles.default.tcp.no_delay", enable) .put("transport.profiles.default.tcp.keep_alive", enable) - .put("transport.profiles.default.reuse_address", enable) + .put("transport.profiles.default.tcp.reuse_address", enable) .put("transport.profiles.default.tcp.send_buffer_size", "43000b") .put("transport.profiles.default.tcp.receive_buffer_size", "42000b") .put("transport.profiles.default.port", "9700-9800") @@ -2598,7 +2598,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase { Settings profileSettings = Settings.builder() .put("transport.profiles.some_profile.tcp.no_delay", enable) .put("transport.profiles.some_profile.tcp.keep_alive", enable) - .put("transport.profiles.some_profile.reuse_address", enable) + .put("transport.profiles.some_profile.tcp.reuse_address", enable) .put("transport.profiles.some_profile.tcp.send_buffer_size", "43000b") .put("transport.profiles.some_profile.tcp.receive_buffer_size", "42000b") .put("transport.profiles.some_profile.port", "9700-9800")