From b6e43c59cf70f622ce9956c15b0da1f9b8604649 Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Wed, 6 Oct 2021 09:49:27 -0400 Subject: [PATCH] runtime updates Signed-off-by: Alyssa Wilk --- docs/root/version_history/current.rst | 1 + source/common/http/conn_pool_base.cc | 3 +-- source/common/runtime/runtime_features.cc | 1 - test/common/http/http2/conn_pool_test.cc | 4 ---- .../http2_flood_integration_test.cc | 21 ++----------------- 5 files changed, 4 insertions(+), 26 deletions(-) diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst index 6a0de6ce7bdc3..7739f3842fbe0 100644 --- a/docs/root/version_history/current.rst +++ b/docs/root/version_history/current.rst @@ -21,6 +21,7 @@ Removed Config or Runtime *Normally occurs at the end of the* :ref:`deprecation period ` * compression: removed ``envoy.reloadable_features.enable_compression_without_content_length_header`` runtime guard and legacy code paths. +* http: removed ``envoy.reloadable_features.improved_stream_limit_handling`` and legacy code paths. * http: removed ``envoy.reloadable_features.return_502_for_upstream_protocol_errors``. Envoy will always return 502 code upon encountering upstream protocol error. * http: removed ``envoy.reloadable_features.treat_upstream_connect_timeout_as_connect_failure`` and legacy code paths. diff --git a/source/common/http/conn_pool_base.cc b/source/common/http/conn_pool_base.cc index 8bc119a38f871..295220d79db91 100644 --- a/source/common/http/conn_pool_base.cc +++ b/source/common/http/conn_pool_base.cc @@ -113,8 +113,7 @@ void MultiplexedActiveClientBase::onGoAway(Http::GoAwayErrorCode) { // not considering http/2 connections connected until the SETTINGS frame is // received, but that would result in a latency penalty instead. void MultiplexedActiveClientBase::onSettings(ReceivedSettings& settings) { - if (Runtime::runtimeFeatureEnabled("envoy.reloadable_features.improved_stream_limit_handling") && - settings.maxConcurrentStreams().has_value() && + if (settings.maxConcurrentStreams().has_value() && settings.maxConcurrentStreams().value() < concurrent_stream_limit_) { int64_t old_unused_capacity = currentUnusedCapacity(); // Given config limits old_unused_capacity should never exceed int32_t. diff --git a/source/common/runtime/runtime_features.cc b/source/common/runtime/runtime_features.cc index dcbb89dec7326..fd5750f4bec64 100644 --- a/source/common/runtime/runtime_features.cc +++ b/source/common/runtime/runtime_features.cc @@ -75,7 +75,6 @@ constexpr const char* runtime_features[] = { "envoy.reloadable_features.http_reject_path_with_fragment", "envoy.reloadable_features.http_strip_fragment_from_path_unsafe_if_disabled", "envoy.reloadable_features.http_transport_failure_reason_in_body", - "envoy.reloadable_features.improved_stream_limit_handling", "envoy.reloadable_features.internal_redirects_with_body", "envoy.reloadable_features.listener_reuse_port_default_enabled", "envoy.reloadable_features.listener_wildcard_match_ip_family", diff --git a/test/common/http/http2/conn_pool_test.cc b/test/common/http/http2/conn_pool_test.cc index 7a1c272a1796c..23c86c527b225 100644 --- a/test/common/http/http2/conn_pool_test.cc +++ b/test/common/http/http2/conn_pool_test.cc @@ -1488,10 +1488,6 @@ TEST_F(Http2ConnPoolImplTest, PreconnectWithMultiplexing) { } TEST_F(Http2ConnPoolImplTest, PreconnectWithSettings) { - TestScopedRuntime scoped_runtime; - Runtime::LoaderSingleton::getExisting()->mergeValues( - {{"envoy.reloadable_features.improved_stream_limit_handling", "true"}}); - cluster_->http2_options_.mutable_max_concurrent_streams()->set_value(2); ON_CALL(*cluster_, perUpstreamPreconnectRatio).WillByDefault(Return(1.5)); diff --git a/test/integration/http2_flood_integration_test.cc b/test/integration/http2_flood_integration_test.cc index a5c9d864fb7d2..ddd9810a86b9f 100644 --- a/test/integration/http2_flood_integration_test.cc +++ b/test/integration/http2_flood_integration_test.cc @@ -1499,23 +1499,7 @@ TEST_P(Http2FloodMitigationTest, UpstreamFloodDetectionIsOnByDefault) { "cluster.cluster_0.http2.outbound_control_flood"); } -class Http2ManyStreamsTest - : public testing::TestWithParam>, - public Http2RawFrameIntegrationTest { -protected: - Http2ManyStreamsTest() : Http2RawFrameIntegrationTest(std::get<0>(GetParam())) { - config_helper_.addRuntimeOverride("envoy.reloadable_features.improved_stream_limit_handling", - useImprovedStreamLimitHandling() ? "true" : "false"); - } - - bool useImprovedStreamLimitHandling() const { return std::get<1>(GetParam()); } -}; - -INSTANTIATE_TEST_SUITE_P( - IpVersionsAndRuntimeFeature, Http2ManyStreamsTest, - testing::Combine(testing::ValuesIn(TestEnvironment::getIpVersionsForTest()), testing::Bool())); - -TEST_P(Http2ManyStreamsTest, UpstreamRstStreamStormOnDownstreamCloseRegressionTest) { +TEST_P(Http2FloodMitigationTest, UpstreamRstStreamStormOnDownstreamCloseRegressionTest) { const uint32_t num_requests = 80; envoy::config::core::v3::Http2ProtocolOptions config; @@ -1555,8 +1539,7 @@ TEST_P(Http2ManyStreamsTest, UpstreamRstStreamStormOnDownstreamCloseRegressionTe // The disconnect shouldn't trigger an outbound control frame flood. EXPECT_EQ(0, test_server_->counter("cluster.cluster_0.http2.outbound_control_flood")->value()); // Verify that the upstream connections are still active. - EXPECT_EQ(useImprovedStreamLimitHandling() ? 2 : 1, - test_server_->gauge("cluster.cluster_0.upstream_cx_active")->value()); + EXPECT_EQ(2, test_server_->gauge("cluster.cluster_0.upstream_cx_active")->value()); } } // namespace Envoy