[experiments] Clean up some rolled out experiments

pull/35195/head
Craig Tiller 1 year ago
parent 6e18346c96
commit 201612612b
  1. 45
      bazel/experiments.bzl
  2. 8
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  3. 20
      src/core/ext/transport/chttp2/transport/flow_control.cc
  4. 2
      src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
  5. 6
      src/core/ext/transport/chttp2/transport/parsing.cc
  6. 10
      src/core/ext/transport/chttp2/transport/writing.cc
  7. 225
      src/core/lib/experiments/experiments.cc
  8. 111
      src/core/lib/experiments/experiments.h
  9. 66
      src/core/lib/experiments/experiments.yaml
  10. 64
      src/core/lib/iomgr/combiner.cc
  11. 5
      src/core/lib/transport/metadata_batch.h

@ -17,14 +17,10 @@
"""Dictionary of tags to experiments so we know when to test different experiments."""
EXPERIMENT_ENABLES = {
"block_excessive_requests_before_settings_ack": "block_excessive_requests_before_settings_ack",
"call_status_override_on_cancellation": "call_status_override_on_cancellation",
"canary_client_privacy": "canary_client_privacy",
"client_idleness": "client_idleness",
"client_privacy": "client_privacy",
"combiner_offload_to_event_engine": "combiner_offload_to_event_engine",
"chttp2_batch_requests": "chttp2_batch_requests,combiner_offload_to_event_engine",
"chttp2_offload_on_rst_stream": "chttp2_offload_on_rst_stream,combiner_offload_to_event_engine",
"event_engine_client": "event_engine_client",
"event_engine_dns": "event_engine_dns",
"event_engine_listener": "event_engine_listener",
@ -32,7 +28,6 @@ EXPERIMENT_ENABLES = {
"http2_stats_fix": "http2_stats_fix",
"keepalive_fix": "keepalive_fix",
"keepalive_server_fix": "keepalive_server_fix",
"lazier_stream_updates": "lazier_stream_updates",
"memory_pressure_controller": "memory_pressure_controller",
"monitoring_experiment": "monitoring_experiment",
"multiping": "multiping",
@ -40,10 +35,9 @@ EXPERIMENT_ENABLES = {
"peer_state_based_framing": "peer_state_based_framing",
"pending_queue_cap": "pending_queue_cap",
"pick_first_happy_eyeballs": "pick_first_happy_eyeballs",
"ping_on_rst_stream": "ping_on_rst_stream",
"promise_based_client_call": "promise_based_client_call",
"promise_based_inproc_transport": "promise_based_inproc_transport",
"promise_based_server_call": "lazier_stream_updates,promise_based_server_call",
"promise_based_server_call": "promise_based_server_call",
"red_max_concurrent_streams": "red_max_concurrent_streams",
"registered_method_lookup_in_transport": "registered_method_lookup_in_transport",
"registered_methods_map": "registered_methods_map",
@ -51,15 +45,11 @@ EXPERIMENT_ENABLES = {
"round_robin_delegate_to_pick_first": "round_robin_delegate_to_pick_first",
"rstpit": "rstpit",
"schedule_cancellation_over_write": "schedule_cancellation_over_write",
"separate_ping_from_keepalive": "separate_ping_from_keepalive",
"server_privacy": "server_privacy",
"settings_timeout": "settings_timeout",
"tarpit": "tarpit",
"tcp_frame_size_tuning": "tcp_frame_size_tuning",
"tcp_rcv_lowat": "tcp_rcv_lowat",
"trace_record_callops": "trace_record_callops",
"unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size",
"uniquely_unowned": "uniquely_unowned",
"work_serializer_clears_time_cache": "work_serializer_clears_time_cache",
"work_serializer_dispatch": "work_serializer_dispatch",
"write_size_policy": "write_size_policy",
@ -116,17 +106,9 @@ EXPERIMENTS = {
],
},
"on": {
"bad_client_test": [
"block_excessive_requests_before_settings_ack",
"tarpit",
],
"core_end2end_test": [
"event_engine_listener",
],
"cpp_end2end_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
],
"cpp_lb_end2end_test": [
"pick_first_happy_eyeballs",
"round_robin_delegate_to_pick_first",
@ -136,9 +118,6 @@ EXPERIMENTS = {
"event_engine_listener",
],
"flow_control_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
"lazier_stream_updates",
"overload_protection",
"write_size_cap",
"write_size_policy",
@ -206,23 +185,12 @@ EXPERIMENTS = {
],
},
"on": {
"bad_client_test": [
"block_excessive_requests_before_settings_ack",
"tarpit",
],
"cpp_end2end_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
],
"cpp_lb_end2end_test": [
"pick_first_happy_eyeballs",
"round_robin_delegate_to_pick_first",
"wrr_delegate_to_pick_first",
],
"flow_control_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
"lazier_stream_updates",
"overload_protection",
"write_size_cap",
"write_size_policy",
@ -300,17 +268,9 @@ EXPERIMENTS = {
],
},
"on": {
"bad_client_test": [
"block_excessive_requests_before_settings_ack",
"tarpit",
],
"core_end2end_test": [
"event_engine_listener",
],
"cpp_end2end_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
],
"cpp_lb_end2end_test": [
"pick_first_happy_eyeballs",
"round_robin_delegate_to_pick_first",
@ -320,9 +280,6 @@ EXPERIMENTS = {
"event_engine_listener",
],
"flow_control_test": [
"chttp2_batch_requests",
"chttp2_offload_on_rst_stream",
"lazier_stream_updates",
"overload_protection",
"write_size_cap",
"write_size_policy",

@ -503,10 +503,8 @@ static void read_channel_args(grpc_chttp2_transport* t,
if (max_requests_per_read.has_value()) {
t->max_requests_per_read =
grpc_core::Clamp(*max_requests_per_read, 1, 10000);
} else if (grpc_core::IsChttp2BatchRequestsEnabled()) {
t->max_requests_per_read = 32;
} else {
t->max_requests_per_read = std::numeric_limits<size_t>::max();
t->max_requests_per_read = 32;
}
if (channel_args.GetBool(GRPC_ARG_ENABLE_CHANNELZ)
@ -523,8 +521,8 @@ static void read_channel_args(grpc_chttp2_transport* t,
t->ack_pings = channel_args.GetBool("grpc.http2.ack_pings").value_or(true);
t->allow_tarpit = channel_args.GetBool(GRPC_ARG_HTTP_ALLOW_TARPIT)
.value_or(grpc_core::IsTarpitEnabled());
t->allow_tarpit =
channel_args.GetBool(GRPC_ARG_HTTP_ALLOW_TARPIT).value_or(true);
t->min_tarpit_duration_ms =
channel_args
.GetDurationFromIntMillis(GRPC_ARG_HTTP_TARPIT_MIN_DURATION_MS)

@ -422,23 +422,9 @@ FlowControlAction StreamFlowControl::UpdateAction(FlowControlAction action) {
}
// min_progress_size_ > 0 means we have a reader ready to read.
if (min_progress_size_ > 0) {
if (IsLazierStreamUpdatesEnabled()) {
if (announced_window_delta_ <=
-static_cast<int64_t>(tfc_->sent_init_window()) / 2) {
urgency = FlowControlAction::Urgency::UPDATE_IMMEDIATELY;
}
} else {
// If we're into initial window to receive that data we should wake up
// and send an update.
if (announced_window_delta_ < 0) {
urgency = FlowControlAction::Urgency::UPDATE_IMMEDIATELY;
} else if (announced_window_delta_ == 0 &&
tfc_->queued_init_window() == 0) {
// Special case when initial window size is zero, meaning that
// announced_window_delta cannot become negative (it may already be so
// however).
urgency = FlowControlAction::Urgency::UPDATE_IMMEDIATELY;
}
if (announced_window_delta_ <=
-static_cast<int64_t>(tfc_->sent_init_window()) / 2) {
urgency = FlowControlAction::Urgency::UPDATE_IMMEDIATELY;
}
}
action.set_send_stream_update(urgency);

@ -126,7 +126,7 @@ grpc_error_handle grpc_chttp2_rst_stream_parser_parse(void* parser,
grpc_core::StatusIntProperty::kHttp2Error,
static_cast<intptr_t>(reason));
}
if (grpc_core::IsPingOnRstStreamEnabled() && !t->is_client &&
if (!t->is_client &&
absl::Bernoulli(t->bitgen, t->ping_on_rst_stream_percent / 100.0)) {
++t->num_pending_induced_frames;
t->ping_callbacks.RequestPing();

@ -395,8 +395,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
cur += t->incoming_frame_size;
t->incoming_stream = nullptr;
if (t->incoming_frame_type == GRPC_CHTTP2_FRAME_RST_STREAM &&
grpc_core::IsChttp2OffloadOnRstStreamEnabled()) {
if (t->incoming_frame_type == GRPC_CHTTP2_FRAME_RST_STREAM) {
requests_started = std::numeric_limits<size_t>::max();
}
goto dts_fh_0; // loop
@ -702,8 +701,7 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
t, std::string(t->peer_string.as_string_view()).c_str(),
t->incoming_stream_id, t->last_new_stream_id));
return init_header_skip_frame_parser(t, priority_type, is_eoh);
} else if (grpc_core::IsBlockExcessiveRequestsBeforeSettingsAckEnabled() &&
t->num_incoming_streams_before_settings_ack == 0) {
} else if (t->num_incoming_streams_before_settings_ack == 0) {
GRPC_CHTTP2_IF_TRACING(gpr_log(
GPR_ERROR,
"transport:%p SERVER peer:%s rejecting grpc_chttp2_stream id=%d, "

@ -280,8 +280,7 @@ class WriteContext {
t_->settings[GRPC_LOCAL_SETTINGS],
t_->force_send_settings,
GRPC_CHTTP2_NUM_SETTINGS));
if (grpc_core::IsSettingsTimeoutEnabled() &&
t_->keepalive_timeout != grpc_core::Duration::Infinity()) {
if (t_->keepalive_timeout != grpc_core::Duration::Infinity()) {
GPR_ASSERT(
t_->settings_ack_watchdog ==
grpc_event_engine::experimental::EventEngine::TaskHandle::kInvalid);
@ -734,9 +733,7 @@ void grpc_chttp2_end_write(grpc_chttp2_transport* t, grpc_error_handle error) {
t->keepalive_timeout != grpc_core::Duration::Infinity()) {
// Set ping timeout after finishing write so we don't measure our own send
// time.
const auto timeout = grpc_core::IsSeparatePingFromKeepaliveEnabled()
? t->ping_timeout
: t->keepalive_timeout;
const auto timeout = t->ping_timeout;
auto id = t->ping_callbacks.OnPingTimeout(
timeout, t->event_engine.get(), [t = t->Ref()] {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
@ -750,8 +747,7 @@ void grpc_chttp2_end_write(grpc_chttp2_transport* t, grpc_error_handle error) {
id.value());
}
if (grpc_core::IsSeparatePingFromKeepaliveEnabled() &&
t->keepalive_incoming_data_wanted &&
if (t->keepalive_incoming_data_wanted &&
t->keepalive_timeout < t->ping_timeout &&
t->keepalive_ping_timeout_handle !=
grpc_event_engine::experimental::EventEngine::TaskHandle::

@ -24,10 +24,6 @@
#if defined(GRPC_CFSTREAM)
namespace {
const char* const description_block_excessive_requests_before_settings_ack =
"If set, block excessive requests before receiving SETTINGS ACK.";
const char* const
additional_constraints_block_excessive_requests_before_settings_ack = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -41,21 +37,6 @@ const char* const description_client_idleness =
const char* const additional_constraints_client_idleness = "{}";
const char* const description_client_privacy = "If set, client privacy";
const char* const additional_constraints_client_privacy = "{}";
const char* const description_combiner_offload_to_event_engine =
"Offload Combiner work onto the EventEngine instead of the Executor.";
const char* const additional_constraints_combiner_offload_to_event_engine =
"{}";
const char* const description_chttp2_batch_requests =
"Cap the number of requests received by one transport read prior to "
"offload.";
const char* const additional_constraints_chttp2_batch_requests = "{}";
const uint8_t required_experiments_chttp2_batch_requests[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_chttp2_offload_on_rst_stream =
"Offload work on RST_STREAM.";
const char* const additional_constraints_chttp2_offload_on_rst_stream = "{}";
const uint8_t required_experiments_chttp2_offload_on_rst_stream[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_event_engine_client =
"Use EventEngine clients instead of iomgr's grpc_tcp_client";
const char* const additional_constraints_event_engine_client = "{}";
@ -79,10 +60,6 @@ const char* const description_keepalive_server_fix =
"Allows overriding keepalive_permit_without_calls for servers. Refer "
"https://github.com/grpc/grpc/pull/33917 for more information.";
const char* const additional_constraints_keepalive_server_fix = "{}";
const char* const description_lazier_stream_updates =
"Allow streams to consume up to 50% of the incoming window before we force "
"send a flow control update.";
const char* const additional_constraints_lazier_stream_updates = "{}";
const char* const description_memory_pressure_controller =
"New memory pressure controller";
const char* const additional_constraints_memory_pressure_controller = "{}";
@ -112,10 +89,6 @@ const char* const additional_constraints_pending_queue_cap = "{}";
const char* const description_pick_first_happy_eyeballs =
"Use Happy Eyeballs in pick_first.";
const char* const additional_constraints_pick_first_happy_eyeballs = "{}";
const char* const description_ping_on_rst_stream =
"Send a ping on receiving some RST_STREAM frames on the server (proportion "
"configurable via grpc.http2.ping_on_rst_stream_percent channel arg).";
const char* const additional_constraints_ping_on_rst_stream = "{}";
const char* const description_promise_based_client_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
@ -127,8 +100,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const uint8_t required_experiments_promise_based_server_call[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdLazierStreamUpdates)};
const char* const description_red_max_concurrent_streams =
"Perform random early rejection of requests that would exceed a newly "
"reduced MAX_CONCURRENT_STREAMS but are allowed by the current.";
@ -158,20 +129,8 @@ const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
"{}";
const char* const description_separate_ping_from_keepalive =
"Keep a different keepalive timeout (resolution is seeing data after "
"sending a ping) from a ping timeout (resolution is getting a ping ack "
"after sending a ping) The first can be short and determines liveness. The "
"second can be longer and determines protocol correctness.";
const char* const additional_constraints_separate_ping_from_keepalive = "{}";
const char* const description_server_privacy = "If set, server privacy";
const char* const additional_constraints_server_privacy = "{}";
const char* const description_settings_timeout =
"If set, use the settings timeout to send settings frame to the peer.";
const char* const additional_constraints_settings_timeout = "{}";
const char* const description_tarpit =
"If set, tarpit invalid requests for some amount of time";
const char* const additional_constraints_tarpit = "{}";
const char* const description_tcp_frame_size_tuning =
"If set, enables TCP to use RPC size estimation made by higher layers. TCP "
"would not indicate completion of a read operation until a specified "
@ -188,10 +147,6 @@ const char* const description_unconstrained_max_quota_buffer_size =
"Discard the cap on the max free pool size for one memory allocator";
const char* const additional_constraints_unconstrained_max_quota_buffer_size =
"{}";
const char* const description_uniquely_unowned =
"Ensure HPACK table takes a unique copy of data when parsing unknown "
"metadata";
const char* const additional_constraints_uniquely_unowned = "{}";
const char* const description_work_serializer_clears_time_cache =
"Have the work serializer clear the time cache when it dispatches work.";
const char* const additional_constraints_work_serializer_clears_time_cache =
@ -223,10 +178,6 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"block_excessive_requests_before_settings_ack",
description_block_excessive_requests_before_settings_ack,
additional_constraints_block_excessive_requests_before_settings_ack,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -237,16 +188,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_client_idleness, nullptr, 0, true, true},
{"client_privacy", description_client_privacy,
additional_constraints_client_privacy, nullptr, 0, false, false},
{"combiner_offload_to_event_engine",
description_combiner_offload_to_event_engine,
additional_constraints_combiner_offload_to_event_engine, nullptr, 0, true,
true},
{"chttp2_batch_requests", description_chttp2_batch_requests,
additional_constraints_chttp2_batch_requests,
required_experiments_chttp2_batch_requests, 1, true, true},
{"chttp2_offload_on_rst_stream", description_chttp2_offload_on_rst_stream,
additional_constraints_chttp2_offload_on_rst_stream,
required_experiments_chttp2_offload_on_rst_stream, 1, true, true},
{"event_engine_client", description_event_engine_client,
additional_constraints_event_engine_client, nullptr, 0, false, true},
{"event_engine_dns", description_event_engine_dns,
@ -261,8 +202,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_keepalive_fix, nullptr, 0, false, false},
{"keepalive_server_fix", description_keepalive_server_fix,
additional_constraints_keepalive_server_fix, nullptr, 0, false, false},
{"lazier_stream_updates", description_lazier_stream_updates,
additional_constraints_lazier_stream_updates, nullptr, 0, true, true},
{"memory_pressure_controller", description_memory_pressure_controller,
additional_constraints_memory_pressure_controller, nullptr, 0, false,
true},
@ -278,8 +217,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_pending_queue_cap, nullptr, 0, true, true},
{"pick_first_happy_eyeballs", description_pick_first_happy_eyeballs,
additional_constraints_pick_first_happy_eyeballs, nullptr, 0, true, true},
{"ping_on_rst_stream", description_ping_on_rst_stream,
additional_constraints_ping_on_rst_stream, nullptr, 0, true, true},
{"promise_based_client_call", description_promise_based_client_call,
additional_constraints_promise_based_client_call, nullptr, 0, false, true},
{"promise_based_inproc_transport",
@ -287,8 +224,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call,
required_experiments_promise_based_server_call, 1, false, true},
additional_constraints_promise_based_server_call, nullptr, 0, false, true},
{"red_max_concurrent_streams", description_red_max_concurrent_streams,
additional_constraints_red_max_concurrent_streams, nullptr, 0, false,
true},
@ -311,15 +247,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,
true},
{"separate_ping_from_keepalive", description_separate_ping_from_keepalive,
additional_constraints_separate_ping_from_keepalive, nullptr, 0, true,
true},
{"server_privacy", description_server_privacy,
additional_constraints_server_privacy, nullptr, 0, false, false},
{"settings_timeout", description_settings_timeout,
additional_constraints_settings_timeout, nullptr, 0, true, true},
{"tarpit", description_tarpit, additional_constraints_tarpit, nullptr, 0,
true, true},
{"tcp_frame_size_tuning", description_tcp_frame_size_tuning,
additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true},
{"tcp_rcv_lowat", description_tcp_rcv_lowat,
@ -330,8 +259,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_unconstrained_max_quota_buffer_size,
additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0,
false, true},
{"uniquely_unowned", description_uniquely_unowned,
additional_constraints_uniquely_unowned, nullptr, 0, true, true},
{"work_serializer_clears_time_cache",
description_work_serializer_clears_time_cache,
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
@ -351,10 +278,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
#elif defined(GPR_WINDOWS)
namespace {
const char* const description_block_excessive_requests_before_settings_ack =
"If set, block excessive requests before receiving SETTINGS ACK.";
const char* const
additional_constraints_block_excessive_requests_before_settings_ack = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -368,21 +291,6 @@ const char* const description_client_idleness =
const char* const additional_constraints_client_idleness = "{}";
const char* const description_client_privacy = "If set, client privacy";
const char* const additional_constraints_client_privacy = "{}";
const char* const description_combiner_offload_to_event_engine =
"Offload Combiner work onto the EventEngine instead of the Executor.";
const char* const additional_constraints_combiner_offload_to_event_engine =
"{}";
const char* const description_chttp2_batch_requests =
"Cap the number of requests received by one transport read prior to "
"offload.";
const char* const additional_constraints_chttp2_batch_requests = "{}";
const uint8_t required_experiments_chttp2_batch_requests[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_chttp2_offload_on_rst_stream =
"Offload work on RST_STREAM.";
const char* const additional_constraints_chttp2_offload_on_rst_stream = "{}";
const uint8_t required_experiments_chttp2_offload_on_rst_stream[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_event_engine_client =
"Use EventEngine clients instead of iomgr's grpc_tcp_client";
const char* const additional_constraints_event_engine_client = "{}";
@ -406,10 +314,6 @@ const char* const description_keepalive_server_fix =
"Allows overriding keepalive_permit_without_calls for servers. Refer "
"https://github.com/grpc/grpc/pull/33917 for more information.";
const char* const additional_constraints_keepalive_server_fix = "{}";
const char* const description_lazier_stream_updates =
"Allow streams to consume up to 50% of the incoming window before we force "
"send a flow control update.";
const char* const additional_constraints_lazier_stream_updates = "{}";
const char* const description_memory_pressure_controller =
"New memory pressure controller";
const char* const additional_constraints_memory_pressure_controller = "{}";
@ -439,10 +343,6 @@ const char* const additional_constraints_pending_queue_cap = "{}";
const char* const description_pick_first_happy_eyeballs =
"Use Happy Eyeballs in pick_first.";
const char* const additional_constraints_pick_first_happy_eyeballs = "{}";
const char* const description_ping_on_rst_stream =
"Send a ping on receiving some RST_STREAM frames on the server (proportion "
"configurable via grpc.http2.ping_on_rst_stream_percent channel arg).";
const char* const additional_constraints_ping_on_rst_stream = "{}";
const char* const description_promise_based_client_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
@ -454,8 +354,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const uint8_t required_experiments_promise_based_server_call[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdLazierStreamUpdates)};
const char* const description_red_max_concurrent_streams =
"Perform random early rejection of requests that would exceed a newly "
"reduced MAX_CONCURRENT_STREAMS but are allowed by the current.";
@ -485,20 +383,8 @@ const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
"{}";
const char* const description_separate_ping_from_keepalive =
"Keep a different keepalive timeout (resolution is seeing data after "
"sending a ping) from a ping timeout (resolution is getting a ping ack "
"after sending a ping) The first can be short and determines liveness. The "
"second can be longer and determines protocol correctness.";
const char* const additional_constraints_separate_ping_from_keepalive = "{}";
const char* const description_server_privacy = "If set, server privacy";
const char* const additional_constraints_server_privacy = "{}";
const char* const description_settings_timeout =
"If set, use the settings timeout to send settings frame to the peer.";
const char* const additional_constraints_settings_timeout = "{}";
const char* const description_tarpit =
"If set, tarpit invalid requests for some amount of time";
const char* const additional_constraints_tarpit = "{}";
const char* const description_tcp_frame_size_tuning =
"If set, enables TCP to use RPC size estimation made by higher layers. TCP "
"would not indicate completion of a read operation until a specified "
@ -515,10 +401,6 @@ const char* const description_unconstrained_max_quota_buffer_size =
"Discard the cap on the max free pool size for one memory allocator";
const char* const additional_constraints_unconstrained_max_quota_buffer_size =
"{}";
const char* const description_uniquely_unowned =
"Ensure HPACK table takes a unique copy of data when parsing unknown "
"metadata";
const char* const additional_constraints_uniquely_unowned = "{}";
const char* const description_work_serializer_clears_time_cache =
"Have the work serializer clear the time cache when it dispatches work.";
const char* const additional_constraints_work_serializer_clears_time_cache =
@ -550,10 +432,6 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"block_excessive_requests_before_settings_ack",
description_block_excessive_requests_before_settings_ack,
additional_constraints_block_excessive_requests_before_settings_ack,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -564,16 +442,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_client_idleness, nullptr, 0, true, true},
{"client_privacy", description_client_privacy,
additional_constraints_client_privacy, nullptr, 0, false, false},
{"combiner_offload_to_event_engine",
description_combiner_offload_to_event_engine,
additional_constraints_combiner_offload_to_event_engine, nullptr, 0, true,
true},
{"chttp2_batch_requests", description_chttp2_batch_requests,
additional_constraints_chttp2_batch_requests,
required_experiments_chttp2_batch_requests, 1, true, true},
{"chttp2_offload_on_rst_stream", description_chttp2_offload_on_rst_stream,
additional_constraints_chttp2_offload_on_rst_stream,
required_experiments_chttp2_offload_on_rst_stream, 1, true, true},
{"event_engine_client", description_event_engine_client,
additional_constraints_event_engine_client, nullptr, 0, false, true},
{"event_engine_dns", description_event_engine_dns,
@ -588,8 +456,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_keepalive_fix, nullptr, 0, false, false},
{"keepalive_server_fix", description_keepalive_server_fix,
additional_constraints_keepalive_server_fix, nullptr, 0, false, false},
{"lazier_stream_updates", description_lazier_stream_updates,
additional_constraints_lazier_stream_updates, nullptr, 0, true, true},
{"memory_pressure_controller", description_memory_pressure_controller,
additional_constraints_memory_pressure_controller, nullptr, 0, false,
true},
@ -605,8 +471,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_pending_queue_cap, nullptr, 0, true, true},
{"pick_first_happy_eyeballs", description_pick_first_happy_eyeballs,
additional_constraints_pick_first_happy_eyeballs, nullptr, 0, true, true},
{"ping_on_rst_stream", description_ping_on_rst_stream,
additional_constraints_ping_on_rst_stream, nullptr, 0, true, true},
{"promise_based_client_call", description_promise_based_client_call,
additional_constraints_promise_based_client_call, nullptr, 0, false, true},
{"promise_based_inproc_transport",
@ -614,8 +478,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call,
required_experiments_promise_based_server_call, 1, false, true},
additional_constraints_promise_based_server_call, nullptr, 0, false, true},
{"red_max_concurrent_streams", description_red_max_concurrent_streams,
additional_constraints_red_max_concurrent_streams, nullptr, 0, false,
true},
@ -638,15 +501,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,
true},
{"separate_ping_from_keepalive", description_separate_ping_from_keepalive,
additional_constraints_separate_ping_from_keepalive, nullptr, 0, true,
true},
{"server_privacy", description_server_privacy,
additional_constraints_server_privacy, nullptr, 0, false, false},
{"settings_timeout", description_settings_timeout,
additional_constraints_settings_timeout, nullptr, 0, true, true},
{"tarpit", description_tarpit, additional_constraints_tarpit, nullptr, 0,
true, true},
{"tcp_frame_size_tuning", description_tcp_frame_size_tuning,
additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true},
{"tcp_rcv_lowat", description_tcp_rcv_lowat,
@ -657,8 +513,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_unconstrained_max_quota_buffer_size,
additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0,
false, true},
{"uniquely_unowned", description_uniquely_unowned,
additional_constraints_uniquely_unowned, nullptr, 0, true, true},
{"work_serializer_clears_time_cache",
description_work_serializer_clears_time_cache,
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
@ -678,10 +532,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
#else
namespace {
const char* const description_block_excessive_requests_before_settings_ack =
"If set, block excessive requests before receiving SETTINGS ACK.";
const char* const
additional_constraints_block_excessive_requests_before_settings_ack = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -695,21 +545,6 @@ const char* const description_client_idleness =
const char* const additional_constraints_client_idleness = "{}";
const char* const description_client_privacy = "If set, client privacy";
const char* const additional_constraints_client_privacy = "{}";
const char* const description_combiner_offload_to_event_engine =
"Offload Combiner work onto the EventEngine instead of the Executor.";
const char* const additional_constraints_combiner_offload_to_event_engine =
"{}";
const char* const description_chttp2_batch_requests =
"Cap the number of requests received by one transport read prior to "
"offload.";
const char* const additional_constraints_chttp2_batch_requests = "{}";
const uint8_t required_experiments_chttp2_batch_requests[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_chttp2_offload_on_rst_stream =
"Offload work on RST_STREAM.";
const char* const additional_constraints_chttp2_offload_on_rst_stream = "{}";
const uint8_t required_experiments_chttp2_offload_on_rst_stream[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdCombinerOffloadToEventEngine)};
const char* const description_event_engine_client =
"Use EventEngine clients instead of iomgr's grpc_tcp_client";
const char* const additional_constraints_event_engine_client = "{}";
@ -733,10 +568,6 @@ const char* const description_keepalive_server_fix =
"Allows overriding keepalive_permit_without_calls for servers. Refer "
"https://github.com/grpc/grpc/pull/33917 for more information.";
const char* const additional_constraints_keepalive_server_fix = "{}";
const char* const description_lazier_stream_updates =
"Allow streams to consume up to 50% of the incoming window before we force "
"send a flow control update.";
const char* const additional_constraints_lazier_stream_updates = "{}";
const char* const description_memory_pressure_controller =
"New memory pressure controller";
const char* const additional_constraints_memory_pressure_controller = "{}";
@ -766,10 +597,6 @@ const char* const additional_constraints_pending_queue_cap = "{}";
const char* const description_pick_first_happy_eyeballs =
"Use Happy Eyeballs in pick_first.";
const char* const additional_constraints_pick_first_happy_eyeballs = "{}";
const char* const description_ping_on_rst_stream =
"Send a ping on receiving some RST_STREAM frames on the server (proportion "
"configurable via grpc.http2.ping_on_rst_stream_percent channel arg).";
const char* const additional_constraints_ping_on_rst_stream = "{}";
const char* const description_promise_based_client_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
@ -781,8 +608,6 @@ const char* const description_promise_based_server_call =
"If set, use the new gRPC promise based call code when it's appropriate "
"(ie when all filters in a stack are promise based)";
const char* const additional_constraints_promise_based_server_call = "{}";
const uint8_t required_experiments_promise_based_server_call[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdLazierStreamUpdates)};
const char* const description_red_max_concurrent_streams =
"Perform random early rejection of requests that would exceed a newly "
"reduced MAX_CONCURRENT_STREAMS but are allowed by the current.";
@ -812,20 +637,8 @@ const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
"{}";
const char* const description_separate_ping_from_keepalive =
"Keep a different keepalive timeout (resolution is seeing data after "
"sending a ping) from a ping timeout (resolution is getting a ping ack "
"after sending a ping) The first can be short and determines liveness. The "
"second can be longer and determines protocol correctness.";
const char* const additional_constraints_separate_ping_from_keepalive = "{}";
const char* const description_server_privacy = "If set, server privacy";
const char* const additional_constraints_server_privacy = "{}";
const char* const description_settings_timeout =
"If set, use the settings timeout to send settings frame to the peer.";
const char* const additional_constraints_settings_timeout = "{}";
const char* const description_tarpit =
"If set, tarpit invalid requests for some amount of time";
const char* const additional_constraints_tarpit = "{}";
const char* const description_tcp_frame_size_tuning =
"If set, enables TCP to use RPC size estimation made by higher layers. TCP "
"would not indicate completion of a read operation until a specified "
@ -842,10 +655,6 @@ const char* const description_unconstrained_max_quota_buffer_size =
"Discard the cap on the max free pool size for one memory allocator";
const char* const additional_constraints_unconstrained_max_quota_buffer_size =
"{}";
const char* const description_uniquely_unowned =
"Ensure HPACK table takes a unique copy of data when parsing unknown "
"metadata";
const char* const additional_constraints_uniquely_unowned = "{}";
const char* const description_work_serializer_clears_time_cache =
"Have the work serializer clear the time cache when it dispatches work.";
const char* const additional_constraints_work_serializer_clears_time_cache =
@ -877,10 +686,6 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"block_excessive_requests_before_settings_ack",
description_block_excessive_requests_before_settings_ack,
additional_constraints_block_excessive_requests_before_settings_ack,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -891,16 +696,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_client_idleness, nullptr, 0, true, true},
{"client_privacy", description_client_privacy,
additional_constraints_client_privacy, nullptr, 0, false, false},
{"combiner_offload_to_event_engine",
description_combiner_offload_to_event_engine,
additional_constraints_combiner_offload_to_event_engine, nullptr, 0, true,
true},
{"chttp2_batch_requests", description_chttp2_batch_requests,
additional_constraints_chttp2_batch_requests,
required_experiments_chttp2_batch_requests, 1, true, true},
{"chttp2_offload_on_rst_stream", description_chttp2_offload_on_rst_stream,
additional_constraints_chttp2_offload_on_rst_stream,
required_experiments_chttp2_offload_on_rst_stream, 1, true, true},
{"event_engine_client", description_event_engine_client,
additional_constraints_event_engine_client, nullptr, 0, false, true},
{"event_engine_dns", description_event_engine_dns,
@ -915,8 +710,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_keepalive_fix, nullptr, 0, false, false},
{"keepalive_server_fix", description_keepalive_server_fix,
additional_constraints_keepalive_server_fix, nullptr, 0, false, false},
{"lazier_stream_updates", description_lazier_stream_updates,
additional_constraints_lazier_stream_updates, nullptr, 0, true, true},
{"memory_pressure_controller", description_memory_pressure_controller,
additional_constraints_memory_pressure_controller, nullptr, 0, false,
true},
@ -932,8 +725,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_pending_queue_cap, nullptr, 0, true, true},
{"pick_first_happy_eyeballs", description_pick_first_happy_eyeballs,
additional_constraints_pick_first_happy_eyeballs, nullptr, 0, true, true},
{"ping_on_rst_stream", description_ping_on_rst_stream,
additional_constraints_ping_on_rst_stream, nullptr, 0, true, true},
{"promise_based_client_call", description_promise_based_client_call,
additional_constraints_promise_based_client_call, nullptr, 0, false, true},
{"promise_based_inproc_transport",
@ -941,8 +732,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"promise_based_server_call", description_promise_based_server_call,
additional_constraints_promise_based_server_call,
required_experiments_promise_based_server_call, 1, false, true},
additional_constraints_promise_based_server_call, nullptr, 0, false, true},
{"red_max_concurrent_streams", description_red_max_concurrent_streams,
additional_constraints_red_max_concurrent_streams, nullptr, 0, false,
true},
@ -965,15 +755,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,
true},
{"separate_ping_from_keepalive", description_separate_ping_from_keepalive,
additional_constraints_separate_ping_from_keepalive, nullptr, 0, true,
true},
{"server_privacy", description_server_privacy,
additional_constraints_server_privacy, nullptr, 0, false, false},
{"settings_timeout", description_settings_timeout,
additional_constraints_settings_timeout, nullptr, 0, true, true},
{"tarpit", description_tarpit, additional_constraints_tarpit, nullptr, 0,
true, true},
{"tcp_frame_size_tuning", description_tcp_frame_size_tuning,
additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true},
{"tcp_rcv_lowat", description_tcp_rcv_lowat,
@ -984,8 +767,6 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_unconstrained_max_quota_buffer_size,
additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0,
false, true},
{"uniquely_unowned", description_uniquely_unowned,
additional_constraints_uniquely_unowned, nullptr, 0, true, true},
{"work_serializer_clears_time_cache",
description_work_serializer_clears_time_cache,
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,

@ -57,8 +57,6 @@ namespace grpc_core {
#ifdef GRPC_EXPERIMENTS_ARE_FINAL
#if defined(GRPC_CFSTREAM)
#define GRPC_EXPERIMENT_IS_INCLUDED_BLOCK_EXCESSIVE_REQUESTS_BEFORE_SETTINGS_ACK
inline bool IsBlockExcessiveRequestsBeforeSettingsAckEnabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -73,12 +71,6 @@ inline bool IsCanaryClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_IDLENESS
inline bool IsClientIdlenessEnabled() { return true; }
inline bool IsClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_BATCH_REQUESTS
inline bool IsChttp2BatchRequestsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_OFFLOAD_ON_RST_STREAM
inline bool IsChttp2OffloadOnRstStreamEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return false; }
inline bool IsEventEngineDnsEnabled() { return false; }
inline bool IsEventEngineListenerEnabled() { return false; }
@ -87,8 +79,6 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsHttp2StatsFixEnabled() { return true; }
inline bool IsKeepaliveFixEnabled() { return false; }
inline bool IsKeepaliveServerFixEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
inline bool IsLazierStreamUpdatesEnabled() { return true; }
inline bool IsMemoryPressureControllerEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
inline bool IsMonitoringExperimentEnabled() { return true; }
@ -100,8 +90,6 @@ inline bool IsPeerStateBasedFramingEnabled() { return false; }
inline bool IsPendingQueueCapEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_HAPPY_EYEBALLS
inline bool IsPickFirstHappyEyeballsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PING_ON_RST_STREAM
inline bool IsPingOnRstStreamEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
@ -114,19 +102,11 @@ inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; }
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
inline bool IsRstpitEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SEPARATE_PING_FROM_KEEPALIVE
inline bool IsSeparatePingFromKeepaliveEnabled() { return true; }
inline bool IsServerPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SETTINGS_TIMEOUT
inline bool IsSettingsTimeoutEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_TARPIT
inline bool IsTarpitEnabled() { return true; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
inline bool IsTcpRcvLowatEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUELY_UNOWNED
inline bool IsUniquelyUnownedEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE
inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; }
inline bool IsWorkSerializerDispatchEnabled() { return false; }
@ -138,8 +118,6 @@ inline bool IsWriteSizeCapEnabled() { return true; }
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#elif defined(GPR_WINDOWS)
#define GRPC_EXPERIMENT_IS_INCLUDED_BLOCK_EXCESSIVE_REQUESTS_BEFORE_SETTINGS_ACK
inline bool IsBlockExcessiveRequestsBeforeSettingsAckEnabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -154,12 +132,6 @@ inline bool IsCanaryClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_IDLENESS
inline bool IsClientIdlenessEnabled() { return true; }
inline bool IsClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_BATCH_REQUESTS
inline bool IsChttp2BatchRequestsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_OFFLOAD_ON_RST_STREAM
inline bool IsChttp2OffloadOnRstStreamEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return false; }
inline bool IsEventEngineDnsEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
@ -169,8 +141,6 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsHttp2StatsFixEnabled() { return true; }
inline bool IsKeepaliveFixEnabled() { return false; }
inline bool IsKeepaliveServerFixEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
inline bool IsLazierStreamUpdatesEnabled() { return true; }
inline bool IsMemoryPressureControllerEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
inline bool IsMonitoringExperimentEnabled() { return true; }
@ -182,8 +152,6 @@ inline bool IsPeerStateBasedFramingEnabled() { return false; }
inline bool IsPendingQueueCapEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_HAPPY_EYEBALLS
inline bool IsPickFirstHappyEyeballsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PING_ON_RST_STREAM
inline bool IsPingOnRstStreamEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
@ -196,19 +164,11 @@ inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; }
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
inline bool IsRstpitEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SEPARATE_PING_FROM_KEEPALIVE
inline bool IsSeparatePingFromKeepaliveEnabled() { return true; }
inline bool IsServerPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SETTINGS_TIMEOUT
inline bool IsSettingsTimeoutEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_TARPIT
inline bool IsTarpitEnabled() { return true; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
inline bool IsTcpRcvLowatEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUELY_UNOWNED
inline bool IsUniquelyUnownedEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE
inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; }
inline bool IsWorkSerializerDispatchEnabled() { return false; }
@ -220,8 +180,6 @@ inline bool IsWriteSizeCapEnabled() { return true; }
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#else
#define GRPC_EXPERIMENT_IS_INCLUDED_BLOCK_EXCESSIVE_REQUESTS_BEFORE_SETTINGS_ACK
inline bool IsBlockExcessiveRequestsBeforeSettingsAckEnabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -236,12 +194,6 @@ inline bool IsCanaryClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_IDLENESS
inline bool IsClientIdlenessEnabled() { return true; }
inline bool IsClientPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_BATCH_REQUESTS
inline bool IsChttp2BatchRequestsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_OFFLOAD_ON_RST_STREAM
inline bool IsChttp2OffloadOnRstStreamEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return false; }
inline bool IsEventEngineDnsEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
@ -251,8 +203,6 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsHttp2StatsFixEnabled() { return true; }
inline bool IsKeepaliveFixEnabled() { return false; }
inline bool IsKeepaliveServerFixEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
inline bool IsLazierStreamUpdatesEnabled() { return true; }
inline bool IsMemoryPressureControllerEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
inline bool IsMonitoringExperimentEnabled() { return true; }
@ -264,8 +214,6 @@ inline bool IsPeerStateBasedFramingEnabled() { return false; }
inline bool IsPendingQueueCapEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_HAPPY_EYEBALLS
inline bool IsPickFirstHappyEyeballsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PING_ON_RST_STREAM
inline bool IsPingOnRstStreamEnabled() { return true; }
inline bool IsPromiseBasedClientCallEnabled() { return false; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsPromiseBasedServerCallEnabled() { return false; }
@ -278,19 +226,11 @@ inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; }
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
inline bool IsRstpitEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SEPARATE_PING_FROM_KEEPALIVE
inline bool IsSeparatePingFromKeepaliveEnabled() { return true; }
inline bool IsServerPrivacyEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_SETTINGS_TIMEOUT
inline bool IsSettingsTimeoutEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_TARPIT
inline bool IsTarpitEnabled() { return true; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
inline bool IsTcpRcvLowatEnabled() { return false; }
inline bool IsTraceRecordCallopsEnabled() { return false; }
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUELY_UNOWNED
inline bool IsUniquelyUnownedEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE
inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; }
inline bool IsWorkSerializerDispatchEnabled() { return false; }
@ -304,14 +244,10 @@ inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#else
enum ExperimentIds {
kExperimentIdBlockExcessiveRequestsBeforeSettingsAck,
kExperimentIdCallStatusOverrideOnCancellation,
kExperimentIdCanaryClientPrivacy,
kExperimentIdClientIdleness,
kExperimentIdClientPrivacy,
kExperimentIdCombinerOffloadToEventEngine,
kExperimentIdChttp2BatchRequests,
kExperimentIdChttp2OffloadOnRstStream,
kExperimentIdEventEngineClient,
kExperimentIdEventEngineDns,
kExperimentIdEventEngineListener,
@ -319,7 +255,6 @@ enum ExperimentIds {
kExperimentIdHttp2StatsFix,
kExperimentIdKeepaliveFix,
kExperimentIdKeepaliveServerFix,
kExperimentIdLazierStreamUpdates,
kExperimentIdMemoryPressureController,
kExperimentIdMonitoringExperiment,
kExperimentIdMultiping,
@ -327,7 +262,6 @@ enum ExperimentIds {
kExperimentIdPeerStateBasedFraming,
kExperimentIdPendingQueueCap,
kExperimentIdPickFirstHappyEyeballs,
kExperimentIdPingOnRstStream,
kExperimentIdPromiseBasedClientCall,
kExperimentIdPromiseBasedInprocTransport,
kExperimentIdPromiseBasedServerCall,
@ -338,15 +272,11 @@ enum ExperimentIds {
kExperimentIdRoundRobinDelegateToPickFirst,
kExperimentIdRstpit,
kExperimentIdScheduleCancellationOverWrite,
kExperimentIdSeparatePingFromKeepalive,
kExperimentIdServerPrivacy,
kExperimentIdSettingsTimeout,
kExperimentIdTarpit,
kExperimentIdTcpFrameSizeTuning,
kExperimentIdTcpRcvLowat,
kExperimentIdTraceRecordCallops,
kExperimentIdUnconstrainedMaxQuotaBufferSize,
kExperimentIdUniquelyUnowned,
kExperimentIdWorkSerializerClearsTimeCache,
kExperimentIdWorkSerializerDispatch,
kExperimentIdWriteSizePolicy,
@ -354,11 +284,6 @@ enum ExperimentIds {
kExperimentIdWrrDelegateToPickFirst,
kNumExperiments
};
#define GRPC_EXPERIMENT_IS_INCLUDED_BLOCK_EXCESSIVE_REQUESTS_BEFORE_SETTINGS_ACK
inline bool IsBlockExcessiveRequestsBeforeSettingsAckEnabled() {
return IsExperimentEnabled(
kExperimentIdBlockExcessiveRequestsBeforeSettingsAck);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
inline bool IsCallStatusOverrideOnCancellationEnabled() {
return IsExperimentEnabled(kExperimentIdCallStatusOverrideOnCancellation);
@ -375,18 +300,6 @@ inline bool IsClientIdlenessEnabled() {
inline bool IsClientPrivacyEnabled() {
return IsExperimentEnabled(kExperimentIdClientPrivacy);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
inline bool IsCombinerOffloadToEventEngineEnabled() {
return IsExperimentEnabled(kExperimentIdCombinerOffloadToEventEngine);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_BATCH_REQUESTS
inline bool IsChttp2BatchRequestsEnabled() {
return IsExperimentEnabled(kExperimentIdChttp2BatchRequests);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_CHTTP2_OFFLOAD_ON_RST_STREAM
inline bool IsChttp2OffloadOnRstStreamEnabled() {
return IsExperimentEnabled(kExperimentIdChttp2OffloadOnRstStream);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
inline bool IsEventEngineClientEnabled() {
return IsExperimentEnabled(kExperimentIdEventEngineClient);
@ -415,10 +328,6 @@ inline bool IsKeepaliveFixEnabled() {
inline bool IsKeepaliveServerFixEnabled() {
return IsExperimentEnabled(kExperimentIdKeepaliveServerFix);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
inline bool IsLazierStreamUpdatesEnabled() {
return IsExperimentEnabled(kExperimentIdLazierStreamUpdates);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_MEMORY_PRESSURE_CONTROLLER
inline bool IsMemoryPressureControllerEnabled() {
return IsExperimentEnabled(kExperimentIdMemoryPressureController);
@ -447,10 +356,6 @@ inline bool IsPendingQueueCapEnabled() {
inline bool IsPickFirstHappyEyeballsEnabled() {
return IsExperimentEnabled(kExperimentIdPickFirstHappyEyeballs);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_PING_ON_RST_STREAM
inline bool IsPingOnRstStreamEnabled() {
return IsExperimentEnabled(kExperimentIdPingOnRstStream);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_CLIENT_CALL
inline bool IsPromiseBasedClientCallEnabled() {
return IsExperimentEnabled(kExperimentIdPromiseBasedClientCall);
@ -491,22 +396,10 @@ inline bool IsRstpitEnabled() {
inline bool IsScheduleCancellationOverWriteEnabled() {
return IsExperimentEnabled(kExperimentIdScheduleCancellationOverWrite);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_SEPARATE_PING_FROM_KEEPALIVE
inline bool IsSeparatePingFromKeepaliveEnabled() {
return IsExperimentEnabled(kExperimentIdSeparatePingFromKeepalive);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY
inline bool IsServerPrivacyEnabled() {
return IsExperimentEnabled(kExperimentIdServerPrivacy);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_SETTINGS_TIMEOUT
inline bool IsSettingsTimeoutEnabled() {
return IsExperimentEnabled(kExperimentIdSettingsTimeout);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_TARPIT
inline bool IsTarpitEnabled() {
return IsExperimentEnabled(kExperimentIdTarpit);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING
inline bool IsTcpFrameSizeTuningEnabled() {
return IsExperimentEnabled(kExperimentIdTcpFrameSizeTuning);
@ -523,10 +416,6 @@ inline bool IsTraceRecordCallopsEnabled() {
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() {
return IsExperimentEnabled(kExperimentIdUnconstrainedMaxQuotaBufferSize);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUELY_UNOWNED
inline bool IsUniquelyUnownedEnabled() {
return IsExperimentEnabled(kExperimentIdUniquelyUnowned);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE
inline bool IsWorkSerializerClearsTimeCacheEnabled() {
return IsExperimentEnabled(kExperimentIdWorkSerializerClearsTimeCache);

@ -37,12 +37,6 @@
# This file only defines the experiments. Refer to rollouts.yaml for the rollout
# state of each experiment.
- name: block_excessive_requests_before_settings_ack
description:
If set, block excessive requests before receiving SETTINGS ACK.
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: [bad_client_test]
- name: call_status_override_on_cancellation
description:
Avoid overriding call status of successfully finished calls if it races with
@ -57,20 +51,6 @@
owner: alishananda@google.com
test_tags: []
allow_in_fuzzing_config: false
- name: chttp2_batch_requests
description:
Cap the number of requests received by one transport read prior to offload.
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: ["cpp_end2end_test", "flow_control_test"]
requires: [combiner_offload_to_event_engine]
- name: chttp2_offload_on_rst_stream
description:
Offload work on RST_STREAM.
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: ["cpp_end2end_test", "flow_control_test"]
requires: [combiner_offload_to_event_engine]
- name: client_idleness
description: If enabled, client channel idleness is enabled by default.
expiry: 2023/12/15
@ -83,12 +63,6 @@
owner: alishananda@google.com
test_tags: []
allow_in_fuzzing_config: false
- name: combiner_offload_to_event_engine
description:
Offload Combiner work onto the EventEngine instead of the Executor.
expiry: 2024/01/15
owner: hork@google.com
test_tags: []
- name: event_engine_client
description: Use EventEngine clients instead of iomgr's grpc_tcp_client
expiry: 2024/01/21
@ -133,13 +107,6 @@
owner: yashkt@google.com
test_tags: []
allow_in_fuzzing_config: false
- name: lazier_stream_updates
description:
Allow streams to consume up to 50% of the incoming window before we
force send a flow control update.
expiry: 2024/01/23
owner: ctiller@google.com
test_tags: [flow_control_test]
- name: memory_pressure_controller
description: New memory pressure controller
expiry: 2024/05/05
@ -188,13 +155,6 @@
expiry: 2024/01/15
owner: roth@google.com
test_tags: ["lb_unit_test", "cpp_lb_end2end_test", "xds_end2end_test"]
- name: ping_on_rst_stream
description:
Send a ping on receiving some RST_STREAM frames on the server
(proportion configurable via grpc.http2.ping_on_rst_stream_percent channel arg).
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: []
- name: promise_based_client_call
description:
If set, use the new gRPC promise based call code when it's appropriate
@ -216,7 +176,6 @@
expiry: 2024/06/14
owner: ctiller@google.com
test_tags: ["core_end2end_test", "cpp_end2end_test", "xds_end2end_test", "logging_test"]
requires: [lazier_stream_updates]
- name: red_max_concurrent_streams
description:
Perform random early rejection of requests that would exceed a newly reduced
@ -262,15 +221,6 @@
expiry: 2024/01/01
owner: vigneshbabu@google.com
test_tags: []
- name: separate_ping_from_keepalive
description:
Keep a different keepalive timeout (resolution is seeing data after sending a ping)
from a ping timeout (resolution is getting a ping ack after sending a ping)
The first can be short and determines liveness.
The second can be longer and determines protocol correctness.
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: []
- name: server_privacy
description:
If set, server privacy
@ -278,18 +228,6 @@
owner: alishananda@google.com
test_tags: []
allow_in_fuzzing_config: false
- name: settings_timeout
description:
If set, use the settings timeout to send settings frame to the peer.
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: []
- name: tarpit
description:
If set, tarpit invalid requests for some amount of time
expiry: 2024/03/03
owner: ctiller@google.com
test_tags: [bad_client_test]
- name: tcp_frame_size_tuning
description:
If set, enables TCP to use RPC size estimation made by higher layers.
@ -314,10 +252,6 @@
expiry: 2024/02/01
owner: ctiller@google.com
test_tags: [resource_quota_test]
- name: uniquely_unowned
description: Ensure HPACK table takes a unique copy of data when parsing unknown metadata
expiry: 2024/03/03
owner: ctiller@google.com
- name: work_serializer_clears_time_cache
description:
Have the work serializer clear the time cache when it dispatches work.

@ -59,11 +59,7 @@ grpc_core::Combiner* grpc_combiner_create(
std::shared_ptr<grpc_event_engine::experimental::EventEngine>
event_engine) {
grpc_core::Combiner* lock = new grpc_core::Combiner();
if (grpc_core::IsCombinerOffloadToEventEngineEnabled()) {
lock->event_engine = event_engine;
} else {
GRPC_CLOSURE_INIT(&lock->offload, offload, lock, nullptr);
}
lock->event_engine = event_engine;
gpr_ref_init(&lock->refs, 1);
gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED);
grpc_closure_list_init(&lock->final_list);
@ -173,27 +169,18 @@ static void move_next() {
}
}
static void offload(void* arg, grpc_error_handle /*error*/) {
grpc_core::Combiner* lock = static_cast<grpc_core::Combiner*>(arg);
push_last_on_exec_ctx(lock);
}
static void queue_offload(grpc_core::Combiner* lock) {
move_next();
// Make the combiner look uncontended by storing a non-null value here, so
// that we don't immediately offload again.
gpr_atm_no_barrier_store(&lock->initiating_exec_ctx_or_null, 1);
GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p queue_offload", lock));
if (grpc_core::IsCombinerOffloadToEventEngineEnabled()) {
lock->event_engine->Run([lock] {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx(0);
push_last_on_exec_ctx(lock);
exec_ctx.Flush();
});
} else {
grpc_core::Executor::Run(&lock->offload, absl::OkStatus());
}
lock->event_engine->Run([lock] {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx(0);
push_last_on_exec_ctx(lock);
exec_ctx.Flush();
});
}
bool grpc_combiner_continue_exec_ctx() {
@ -215,33 +202,14 @@ bool grpc_combiner_continue_exec_ctx() {
grpc_core::ExecCtx::Get()->IsReadyToFinish(),
lock->time_to_execute_final_list));
if (grpc_core::IsCombinerOffloadToEventEngineEnabled()) {
// offload only if both (1) the combiner is contended and has more than one
// closure to execute, and (2) the current execution context needs to finish
// as soon as possible
if (contended && grpc_core::ExecCtx::Get()->IsReadyToFinish()) {
// this execution context wants to move on: schedule remaining work to be
// picked up on the executor
queue_offload(lock);
return true;
}
} else {
// TODO(ctiller): delete this when the combiner_offload_to_event_engine
// experiment is removed.
// offload only if all the following conditions are true:
// 1. the combiner is contended and has more than one closure to execute
// 2. the current execution context needs to finish as soon as possible
// 3. the current thread is not a worker for any background poller
// 4. the DEFAULT executor is threaded
if (contended && grpc_core::ExecCtx::Get()->IsReadyToFinish() &&
!grpc_iomgr_platform_is_any_background_poller_thread() &&
grpc_core::Executor::IsThreadedDefault()) {
// this execution context wants to move on: schedule remaining work to be
// picked up on the executor
queue_offload(lock);
return true;
}
// offload only if both (1) the combiner is contended and has more than one
// closure to execute, and (2) the current execution context needs to finish
// as soon as possible
if (contended && grpc_core::ExecCtx::Get()->IsReadyToFinish()) {
// this execution context wants to move on: schedule remaining work to be
// picked up on the executor
queue_offload(lock);
return true;
}
if (!lock->time_to_execute_final_list ||
@ -294,7 +262,7 @@ bool grpc_combiner_continue_exec_ctx() {
// Define a macro to ease readability of the following switch statement.
#define OLD_STATE_WAS(orphaned, elem_count) \
(((orphaned) ? 0 : STATE_UNORPHANED) | \
((elem_count)*STATE_ELEM_COUNT_LOW_BIT))
((elem_count) * STATE_ELEM_COUNT_LOW_BIT))
// Depending on what the previous state was, we need to perform different
// actions.
switch (old_state) {

@ -649,9 +649,8 @@ class ParseHelper {
return ParsedMetadata<Container>(
typename ParsedMetadata<Container>::FromSlicePair{},
Slice::FromCopiedString(key),
IsUniquelyUnownedEnabled() && will_keep_past_request_lifetime_
? value_.TakeUniquelyOwned()
: std::move(value_),
will_keep_past_request_lifetime_ ? value_.TakeUniquelyOwned()
: std::move(value_),
transport_size_);
}

Loading…
Cancel
Save