Skip to content

Commit

Permalink
deprecate `envoy.reloadable_features.upstream_wait_for_response_heade…
Browse files Browse the repository at this point in the history
…rs_before_disabling_read` (#35502)

Remove
`envoy.reloadable_features.upstream_wait_for_response_headers_before_disabling_read`
and update change log.

Risk Level: low
Testing: N/A
Docs Changes: N/A
Release Notes: Yes
Platform Specific Features: N/A
Fixes #30427

Signed-off-by: Dan Zhang <danzh@google.com>
Co-authored-by: Dan Zhang <danzh@google.com>
  • Loading branch information
danzh2010 and danzh1989 authored Jul 31, 2024
1 parent ca51f36 commit b0cc284
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
4 changes: 4 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ removed_config_or_runtime:
- area: stateful_session
change: |
Removed ``envoy.reloadable_features.stateful_session_encode_ttl_in_cookie`` runtime flag and legacy code paths.
- area: upstream flow control
change: |
Removed ``envoy.reloadable_features.upstream_wait_for_response_headers_before_disabling_read`` runtime flag
and legacy code paths.
new_features:
- area: tls
Expand Down
13 changes: 0 additions & 13 deletions source/common/router/upstream_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ UpstreamRequest::UpstreamRequest(RouterFilterInterface& parent,
record_timeout_budget_(parent_.cluster()->timeoutBudgetStats().has_value()),
cleaned_up_(false), had_upstream_(false),
stream_options_({can_send_early_data, can_use_http3}), grpc_rq_success_deferred_(false),
upstream_wait_for_response_headers_before_disabling_read_(Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.upstream_wait_for_response_headers_before_disabling_read")),
enable_half_close_(enable_half_close) {
if (auto tracing_config = parent_.callbacks()->tracingConfig(); tracing_config.has_value()) {
if (tracing_config->spawnUpstreamSpan() || parent_.config().start_child_span_) {
Expand Down Expand Up @@ -717,17 +715,6 @@ void UpstreamRequest::clearRequestEncoder() {
}

void UpstreamRequest::readDisableOrDefer(bool disable) {
if (!upstream_wait_for_response_headers_before_disabling_read_) {
if (disable) {
parent_.cluster()->trafficStats()->upstream_flow_control_paused_reading_total_.inc();
upstream_->readDisable(true);
} else {
parent_.cluster()->trafficStats()->upstream_flow_control_resumed_reading_total_.inc();
upstream_->readDisable(false);
}
return;
}

if (disable) {
// See comments on deferred_read_disabling_count_ for when we do and don't defer.
if (parent_.downstreamResponseStarted()) {
Expand Down
1 change: 0 additions & 1 deletion source/common/router/upstream_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ class UpstreamRequest : public Logger::Loggable<Logger::Id::router>,
bool had_upstream_ : 1;
Http::ConnectionPool::Instance::StreamOptions stream_options_;
bool grpc_rq_success_deferred_ : 1;
bool upstream_wait_for_response_headers_before_disabling_read_ : 1;
bool enable_half_close_ : 1;
};

Expand Down
1 change: 0 additions & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ RUNTIME_GUARD(envoy_reloadable_features_udp_socket_apply_aggregated_read_limit);
RUNTIME_GUARD(envoy_reloadable_features_uhv_allow_malformed_url_encoding);
RUNTIME_GUARD(envoy_reloadable_features_upstream_allow_connect_with_2xx);
RUNTIME_GUARD(envoy_reloadable_features_upstream_remote_address_use_connection);
RUNTIME_GUARD(envoy_reloadable_features_upstream_wait_for_response_headers_before_disabling_read);
RUNTIME_GUARD(envoy_reloadable_features_use_http3_header_normalisation);
RUNTIME_GUARD(envoy_reloadable_features_use_typed_metadata_in_proxy_protocol_listener);
RUNTIME_GUARD(envoy_reloadable_features_validate_connect);
Expand Down
2 changes: 0 additions & 2 deletions test/integration/multiplexed_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2927,8 +2927,6 @@ TEST_P(MultiplexedIntegrationTest, PerTryTimeoutWhileDownstreamStopsReading) {
if (downstreamProtocol() != Http::CodecType::HTTP2) {
return;
}
config_helper_.addRuntimeOverride(
"envoy.reloadable_features.upstream_wait_for_response_headers_before_disabling_read", "true");

config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) -> void {
RELEASE_ASSERT(bootstrap.mutable_static_resources()->listeners_size() >= 1, "");
Expand Down

0 comments on commit b0cc284

Please sign in to comment.