From f66cf0d70d113c64a1c3d5a657e08bd7388c8fd6 Mon Sep 17 00:00:00 2001 From: "David G. Quintas" Date: Mon, 12 Feb 2018 20:55:27 -0800 Subject: Revert "Revert "Revert "grpclb re-resolution""" --- src/core/ext/filters/client_channel/lb_policy.cc | 7 +- src/core/ext/filters/client_channel/lb_policy.h | 4 + .../client_channel/lb_policy/grpclb/grpclb.cc | 133 ++++++++++----------- .../lb_policy/pick_first/pick_first.cc | 11 +- .../lb_policy/round_robin/round_robin.cc | 11 +- 5 files changed, 89 insertions(+), 77 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc index 27fb2ad1f4..cc4fe7ec62 100644 --- a/src/core/ext/filters/client_channel/lb_policy.cc +++ b/src/core/ext/filters/client_channel/lb_policy.cc @@ -118,8 +118,7 @@ void grpc_lb_policy_update_locked(grpc_lb_policy* policy, void grpc_lb_policy_set_reresolve_closure_locked( grpc_lb_policy* policy, grpc_closure* request_reresolution) { - GPR_ASSERT(policy->request_reresolution == nullptr); - policy->request_reresolution = request_reresolution; + policy->vtable->set_reresolve_closure_locked(policy, request_reresolution); } void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, @@ -134,8 +133,8 @@ void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, grpc_lb_trace->name(), policy, grpc_error_string(error)); } } else { - if (grpc_lb_trace->enabled()) { - gpr_log(GPR_DEBUG, "%s %p: no available re-resolution closure.", + if (grpc_lb_trace->enabled() && error == GRPC_ERROR_NONE) { + gpr_log(GPR_DEBUG, "%s %p: re-resolution already in progress.", grpc_lb_trace->name(), policy); } } diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 6edd314d5e..30660cb83d 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -107,6 +107,10 @@ struct grpc_lb_policy_vtable { void (*update_locked)(grpc_lb_policy* policy, const grpc_lb_policy_args* args); + + /** \see grpc_lb_policy_set_reresolve_closure */ + void (*set_reresolve_closure_locked)(grpc_lb_policy* policy, + grpc_closure* request_reresolution); }; #ifndef NDEBUG diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 1c8809eabc..04bf798267 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -249,7 +249,7 @@ typedef struct glb_lb_policy { /** the RR policy to use of the backend servers returned by the LB server */ grpc_lb_policy* rr_policy; - /** the connectivity state of the embedded RR policy */ + grpc_closure on_rr_connectivity_changed; grpc_connectivity_state rr_connectivity_state; bool started_picking; @@ -292,12 +292,6 @@ typedef struct glb_lb_policy { /** called upon changes to the LB channel's connectivity. */ grpc_closure lb_channel_on_connectivity_changed; - /** called upon changes to the RR's connectivity. */ - grpc_closure rr_on_connectivity_changed; - - /** called upon reresolution request from the RR policy. */ - grpc_closure rr_on_reresolution_requested; - /************************************************************/ /* client data associated with the LB server communication */ /************************************************************/ @@ -596,8 +590,9 @@ static grpc_lb_addresses* extract_backend_addresses_locked( return backend_addresses; } -static void update_lb_connectivity_status_locked(glb_lb_policy* glb_policy, - grpc_error* rr_state_error) { +static void update_lb_connectivity_status_locked( + glb_lb_policy* glb_policy, grpc_connectivity_state rr_state, + grpc_error* rr_state_error) { const grpc_connectivity_state curr_glb_state = grpc_connectivity_state_check(&glb_policy->state_tracker); /* The new connectivity status is a function of the previous one and the new @@ -629,7 +624,7 @@ static void update_lb_connectivity_status_locked(glb_lb_policy* glb_policy, * * (*) This function mustn't be called during shutting down. */ GPR_ASSERT(curr_glb_state != GRPC_CHANNEL_SHUTDOWN); - switch (glb_policy->rr_connectivity_state) { + switch (rr_state) { case GRPC_CHANNEL_TRANSIENT_FAILURE: case GRPC_CHANNEL_SHUTDOWN: GPR_ASSERT(rr_state_error != GRPC_ERROR_NONE); @@ -643,12 +638,11 @@ static void update_lb_connectivity_status_locked(glb_lb_policy* glb_policy, gpr_log( GPR_INFO, "[grpclb %p] Setting grpclb's state to %s from new RR policy %p state.", - glb_policy, - grpc_connectivity_state_name(glb_policy->rr_connectivity_state), + glb_policy, grpc_connectivity_state_name(rr_state), glb_policy->rr_policy); } - grpc_connectivity_state_set(&glb_policy->state_tracker, - glb_policy->rr_connectivity_state, rr_state_error, + grpc_connectivity_state_set(&glb_policy->state_tracker, rr_state, + rr_state_error, "update_lb_connectivity_status_locked"); } @@ -746,36 +740,11 @@ static void lb_policy_args_destroy(grpc_lb_policy_args* args) { gpr_free(args); } -static void rr_on_reresolution_requested_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = (glb_lb_policy*)arg; - if (glb_policy->shutting_down || error != GRPC_ERROR_NONE) { - GRPC_LB_POLICY_UNREF(&glb_policy->base, - "rr_on_reresolution_requested_locked"); - return; - } - if (grpc_lb_glb_trace.enabled()) { - gpr_log( - GPR_DEBUG, - "[grpclb %p] Re-resolution requested from the internal RR policy (%p).", - glb_policy, glb_policy->rr_policy); - } - // If we are talking to a balancer, we expect to get updated addresses form - // the balancer, so we can ignore the re-resolution request from the RR - // policy. Otherwise, handle the re-resolution request using glb's original - // re-resolution closure. - if (glb_policy->lb_calld == nullptr || - !glb_policy->lb_calld->seen_initial_response) { - grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, - GRPC_ERROR_NONE); - } - // Give back the wrapper closure to the RR policy. - grpc_lb_policy_set_reresolve_closure_locked( - glb_policy->rr_policy, &glb_policy->rr_on_reresolution_requested); -} - +static void on_rr_connectivity_changed_locked(void* arg, grpc_error* error); static void create_rr_locked(glb_lb_policy* glb_policy, grpc_lb_policy_args* args) { GPR_ASSERT(glb_policy->rr_policy == nullptr); + grpc_lb_policy* new_rr_policy = grpc_lb_policy_create("round_robin", args); if (new_rr_policy == nullptr) { gpr_log(GPR_ERROR, @@ -788,25 +757,29 @@ static void create_rr_locked(glb_lb_policy* glb_policy, glb_policy->rr_policy); return; } - GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_reresolution_requested_locked"); grpc_lb_policy_set_reresolve_closure_locked( - new_rr_policy, &glb_policy->rr_on_reresolution_requested); + new_rr_policy, glb_policy->base.request_reresolution); + glb_policy->base.request_reresolution = nullptr; glb_policy->rr_policy = new_rr_policy; grpc_error* rr_state_error = nullptr; glb_policy->rr_connectivity_state = grpc_lb_policy_check_connectivity_locked( glb_policy->rr_policy, &rr_state_error); /* Connectivity state is a function of the RR policy updated/created */ - update_lb_connectivity_status_locked(glb_policy, rr_state_error); + update_lb_connectivity_status_locked( + glb_policy, glb_policy->rr_connectivity_state, rr_state_error); /* Add the gRPC LB's interested_parties pollset_set to that of the newly * created RR policy. This will make the RR policy progress upon activity on * gRPC LB, which in turn is tied to the application's call */ grpc_pollset_set_add_pollset_set(glb_policy->rr_policy->interested_parties, glb_policy->base.interested_parties); + GRPC_CLOSURE_INIT(&glb_policy->on_rr_connectivity_changed, + on_rr_connectivity_changed_locked, glb_policy, + grpc_combiner_scheduler(glb_policy->base.combiner)); /* Subscribe to changes to the connectivity of the new RR */ - GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_connectivity_changed_locked"); + GRPC_LB_POLICY_REF(&glb_policy->base, "glb_rr_connectivity_cb"); grpc_lb_policy_notify_on_state_change_locked( glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->rr_on_connectivity_changed); + &glb_policy->on_rr_connectivity_changed); grpc_lb_policy_exit_idle_locked(glb_policy->rr_policy); // Send pending picks to RR policy. pending_pick* pp; @@ -854,18 +827,28 @@ static void rr_handover_locked(glb_lb_policy* glb_policy) { lb_policy_args_destroy(args); } -static void rr_on_connectivity_changed_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = (glb_lb_policy*)arg; +static void on_rr_connectivity_changed_locked(void* arg, grpc_error* error) { + glb_lb_policy* glb_policy = static_cast(arg); if (glb_policy->shutting_down) { - GRPC_LB_POLICY_UNREF(&glb_policy->base, - "rr_on_connectivity_changed_locked"); + GRPC_LB_POLICY_UNREF(&glb_policy->base, "glb_rr_connectivity_cb"); + return; + } + if (glb_policy->rr_connectivity_state == GRPC_CHANNEL_SHUTDOWN) { + /* An RR policy that has transitioned into the SHUTDOWN connectivity state + * should not be considered for picks or updates: the SHUTDOWN state is a + * sink, policies can't transition back from it. .*/ + GRPC_LB_POLICY_UNREF(glb_policy->rr_policy, "rr_connectivity_shutdown"); + glb_policy->rr_policy = nullptr; + GRPC_LB_POLICY_UNREF(&glb_policy->base, "glb_rr_connectivity_cb"); return; } - update_lb_connectivity_status_locked(glb_policy, GRPC_ERROR_REF(error)); - // Resubscribe. Reuse the "rr_on_connectivity_changed_locked" ref. + /* rr state != SHUTDOWN && !glb_policy->shutting down: biz as usual */ + update_lb_connectivity_status_locked( + glb_policy, glb_policy->rr_connectivity_state, GRPC_ERROR_REF(error)); + /* Resubscribe. Reuse the "glb_rr_connectivity_cb" ref. */ grpc_lb_policy_notify_on_state_change_locked( glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->rr_on_connectivity_changed); + &glb_policy->on_rr_connectivity_changed); } static void destroy_balancer_name(void* balancer_name) { @@ -988,6 +971,8 @@ static void glb_shutdown_locked(grpc_lb_policy* pol, if (glb_policy->rr_policy != nullptr) { grpc_lb_policy_shutdown_locked(glb_policy->rr_policy, nullptr); GRPC_LB_POLICY_UNREF(glb_policy->rr_policy, "glb_shutdown"); + } else { + grpc_lb_policy_try_reresolve(pol, &grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); } // We destroy the LB channel here because // glb_lb_channel_on_connectivity_changed_cb needs a valid glb_policy @@ -999,7 +984,6 @@ static void glb_shutdown_locked(grpc_lb_policy* pol, } grpc_connectivity_state_set(&glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "glb_shutdown"); - grpc_lb_policy_try_reresolve(pol, &grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); // Clear pending picks. pending_pick* pp = glb_policy->pending_picks; glb_policy->pending_picks = nullptr; @@ -1639,8 +1623,6 @@ static void lb_on_server_status_received_locked(void* arg, grpc_error* error) { lb_calld, lb_calld->lb_call, grpc_error_string(error)); gpr_free(status_details); } - grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, - GRPC_ERROR_NONE); // If this lb_calld is still in use, this call ended because of a failure so // we want to retry connecting. Otherwise, we have deliberately ended this // call and no further action is required. @@ -1669,15 +1651,16 @@ static void lb_on_fallback_timer_locked(void* arg, grpc_error* error) { glb_policy->fallback_timer_callback_pending = false; /* If we receive a serverlist after the timer fires but before this callback * actually runs, don't fall back. */ - if (glb_policy->serverlist == nullptr && !glb_policy->shutting_down && - error == GRPC_ERROR_NONE) { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Falling back to use backends from resolver", - glb_policy); + if (glb_policy->serverlist == nullptr) { + if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE) { + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Falling back to use backends from resolver", + glb_policy); + } + GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); + rr_handover_locked(glb_policy); } - GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); - rr_handover_locked(glb_policy); } GRPC_LB_POLICY_UNREF(&glb_policy->base, "grpclb_fallback_timer"); } @@ -1798,6 +1781,19 @@ static void glb_lb_channel_on_connectivity_changed_cb(void* arg, } } +static void glb_set_reresolve_closure_locked( + grpc_lb_policy* policy, grpc_closure* request_reresolution) { + glb_lb_policy* glb_policy = reinterpret_cast(policy); + GPR_ASSERT(!glb_policy->shutting_down); + GPR_ASSERT(glb_policy->base.request_reresolution == nullptr); + if (glb_policy->rr_policy != nullptr) { + grpc_lb_policy_set_reresolve_closure_locked(glb_policy->rr_policy, + request_reresolution); + } else { + glb_policy->base.request_reresolution = request_reresolution; + } +} + /* Code wiring the policy with the rest of the core */ static const grpc_lb_policy_vtable glb_lb_policy_vtable = { glb_destroy, @@ -1809,7 +1805,8 @@ static const grpc_lb_policy_vtable glb_lb_policy_vtable = { glb_exit_idle_locked, glb_check_connectivity_locked, glb_notify_on_state_change_locked, - glb_update_locked}; + glb_update_locked, + glb_set_reresolve_closure_locked}; static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, grpc_lb_policy_args* args) { @@ -1890,12 +1887,6 @@ static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, return nullptr; } grpc_subchannel_index_ref(); - GRPC_CLOSURE_INIT(&glb_policy->rr_on_connectivity_changed, - rr_on_connectivity_changed_locked, glb_policy, - grpc_combiner_scheduler(args->combiner)); - GRPC_CLOSURE_INIT(&glb_policy->rr_on_reresolution_requested, - rr_on_reresolution_requested_locked, glb_policy, - grpc_combiner_scheduler(args->combiner)); GRPC_CLOSURE_INIT(&glb_policy->lb_channel_on_connectivity_changed, glb_lb_channel_on_connectivity_changed_cb, glb_policy, grpc_combiner_scheduler(args->combiner)); diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 296bdcb247..1485f7caf5 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -520,6 +520,14 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { } } +static void pf_set_reresolve_closure_locked( + grpc_lb_policy* policy, grpc_closure* request_reresolution) { + pick_first_lb_policy* p = reinterpret_cast(policy); + GPR_ASSERT(!p->shutdown); + GPR_ASSERT(policy->request_reresolution == nullptr); + policy->request_reresolution = request_reresolution; +} + static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { pf_destroy, pf_shutdown_locked, @@ -530,7 +538,8 @@ static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { pf_exit_idle_locked, pf_check_connectivity_locked, pf_notify_on_state_change_locked, - pf_update_locked}; + pf_update_locked, + pf_set_reresolve_closure_locked}; static void pick_first_factory_ref(grpc_lb_policy_factory* factory) {} diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index b5b4c44ef1..cefd0d8d7d 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -620,6 +620,14 @@ static void rr_update_locked(grpc_lb_policy* policy, } } +static void rr_set_reresolve_closure_locked( + grpc_lb_policy* policy, grpc_closure* request_reresolution) { + round_robin_lb_policy* p = reinterpret_cast(policy); + GPR_ASSERT(!p->shutdown); + GPR_ASSERT(policy->request_reresolution == nullptr); + policy->request_reresolution = request_reresolution; +} + static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { rr_destroy, rr_shutdown_locked, @@ -630,7 +638,8 @@ static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { rr_exit_idle_locked, rr_check_connectivity_locked, rr_notify_on_state_change_locked, - rr_update_locked}; + rr_update_locked, + rr_set_reresolve_closure_locked}; static void round_robin_factory_ref(grpc_lb_policy_factory* factory) {} -- cgit v1.2.3 From ef58813f0ad62dc3870e5261d475752c294ab2d5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 13 Feb 2018 14:15:31 -0800 Subject: Fix inproc transport to destroy the send_message byte stream. --- src/core/ext/transport/inproc/inproc_transport.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 2022eaffe5..04f6580096 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -506,6 +506,14 @@ static void fail_helper_locked(inproc_stream* s, grpc_error* error) { GRPC_ERROR_UNREF(error); } +// TODO(vpai): It should not be necessary to drain the incoming byte +// stream and create a new one; instead, we should simply pass the byte +// stream from the sender directly to the receiver as-is. +// +// Note that fixing this will also avoid the assumption in this code +// that the incoming byte stream's next() call will always return +// synchronously. That assumption is true today but may not always be +// true in the future. static void message_transfer_locked(inproc_stream* sender, inproc_stream* receiver) { size_t remaining = @@ -532,6 +540,8 @@ static void message_transfer_locked(inproc_stream* sender, remaining -= GRPC_SLICE_LENGTH(message_slice); grpc_slice_buffer_add(&receiver->recv_message, message_slice); } while (remaining > 0); + grpc_byte_stream_destroy( + sender->send_message_op->payload->send_message.send_message); grpc_slice_buffer_stream_init(&receiver->recv_stream, &receiver->recv_message, 0); -- cgit v1.2.3 From e010dc932a87ebe141e567de6d728b7317b8d19d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 13 Feb 2018 14:56:01 -0800 Subject: Fix http_server filter to destroy its byte stream if it isn't returned. --- src/core/ext/filters/http/server/http_server_filter.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index 63bc2bd59f..aeb0c39df9 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -52,7 +52,6 @@ struct call_data { grpc_closure* recv_message_ready; grpc_closure* on_complete; grpc_byte_stream** pp_recv_message; - grpc_slice_buffer read_slice_buffer; grpc_slice_buffer_stream read_stream; /** Receive closures are chained: we inject this closure as the on_done_recv @@ -224,13 +223,15 @@ static grpc_error* server_filter_incoming_metadata(grpc_call_element* elem, /* decode payload from query and add to the slice buffer to be returned */ const int k_url_safe = 1; + grpc_slice_buffer read_slice_buffer; + grpc_slice_buffer_init(&read_slice_buffer); grpc_slice_buffer_add( - &calld->read_slice_buffer, + &read_slice_buffer, grpc_base64_decode_with_len( reinterpret_cast GRPC_SLICE_START_PTR(query_slice), GRPC_SLICE_LENGTH(query_slice), k_url_safe)); - grpc_slice_buffer_stream_init(&calld->read_stream, - &calld->read_slice_buffer, 0); + grpc_slice_buffer_stream_init(&calld->read_stream, &read_slice_buffer, 0); + grpc_slice_buffer_destroy_internal(&read_slice_buffer); calld->seen_path_with_query = true; grpc_slice_unref_internal(query_slice); } else { @@ -393,7 +394,6 @@ static grpc_error* init_call_elem(grpc_call_element* elem, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&calld->hs_recv_message_ready, hs_recv_message_ready, elem, grpc_schedule_on_exec_ctx); - grpc_slice_buffer_init(&calld->read_slice_buffer); return GRPC_ERROR_NONE; } @@ -402,7 +402,9 @@ static void destroy_call_elem(grpc_call_element* elem, const grpc_call_final_info* final_info, grpc_closure* ignored) { call_data* calld = static_cast(elem->call_data); - grpc_slice_buffer_destroy_internal(&calld->read_slice_buffer); + if (calld->seen_path_with_query && !calld->payload_bin_delivered) { + grpc_byte_stream_destroy(&calld->read_stream.base); + } } /* Constructor for channel_data */ -- cgit v1.2.3 From 49cab8f4c6e7642a376eb1ec835a4790a53d19a3 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Wed, 14 Feb 2018 07:36:33 -0800 Subject: Fix handshaker crash --- src/core/ext/filters/client_channel/http_connect_handshaker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 6bb4cefe73..88bcc03a3c 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -254,7 +254,8 @@ static void http_connect_handshaker_do_handshake( // If not found, invoke on_handshake_done without doing anything. const grpc_arg* arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_SERVER); - if (arg == nullptr) { + if (arg == nullptr || arg->type != GRPC_ARG_STRING) { + gpr_log(GPR_INFO, "HTTP CONNECT channel arg not found or invalid"); // Set shutdown to true so that subsequent calls to // http_connect_handshaker_shutdown() do nothing. gpr_mu_lock(&handshaker->mu); -- cgit v1.2.3 From 2159f859c7f44baf0aa20d7527f56e1dcf684477 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 14 Feb 2018 07:51:13 -0800 Subject: Fix inproc transport to destroy send_message byte stream on failure. --- src/core/ext/transport/inproc/inproc_transport.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 04f6580096..64add3ca0b 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -480,6 +480,8 @@ static void fail_helper_locked(inproc_stream* s, grpc_error* error) { s->recv_message_op = nullptr; } if (s->send_message_op) { + grpc_byte_stream_destroy( + s->send_message_op->payload->send_message.send_message); complete_if_batch_end_locked( s, error, s->send_message_op, "fail_helper scheduling send-message-on-complete"); @@ -602,6 +604,8 @@ static void op_state_machine(void* arg, grpc_error* error) { (s->trailing_md_sent || other->recv_trailing_md_op)) { // A server send will never be matched if the client is waiting // for trailing metadata already + grpc_byte_stream_destroy( + s->send_message_op->payload->send_message.send_message); complete_if_batch_end_locked( s, GRPC_ERROR_NONE, s->send_message_op, "op_state_machine scheduling send-message-on-complete"); @@ -738,6 +742,8 @@ static void op_state_machine(void* arg, grpc_error* error) { if ((s->trailing_md_sent || s->t->is_client) && s->send_message_op) { // Nothing further will try to receive from this stream, so finish off // any outstanding send_message op + grpc_byte_stream_destroy( + s->send_message_op->payload->send_message.send_message); complete_if_batch_end_locked( s, new_err, s->send_message_op, "op_state_machine scheduling send-message-on-complete"); @@ -795,6 +801,8 @@ static void op_state_machine(void* arg, grpc_error* error) { s->send_message_op) { // Nothing further will try to receive from this stream, so finish off // any outstanding send_message op + grpc_byte_stream_destroy( + s->send_message_op->payload->send_message.send_message); complete_if_batch_end_locked( s, new_err, s->send_message_op, "op_state_machine scheduling send-message-on-complete"); -- cgit v1.2.3 From 5f1e8533b45e3095e543fa52e401445dbc918e75 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 14 Feb 2018 10:22:27 -0800 Subject: Cleanup from a quickly merged PR --- src/core/ext/filters/client_channel/http_connect_handshaker.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 88bcc03a3c..c1959bdac6 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -255,7 +255,6 @@ static void http_connect_handshaker_do_handshake( const grpc_arg* arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_SERVER); if (arg == nullptr || arg->type != GRPC_ARG_STRING) { - gpr_log(GPR_INFO, "HTTP CONNECT channel arg not found or invalid"); // Set shutdown to true so that subsequent calls to // http_connect_handshaker_shutdown() do nothing. gpr_mu_lock(&handshaker->mu); @@ -264,7 +263,6 @@ static void http_connect_handshaker_do_handshake( GRPC_CLOSURE_SCHED(on_handshake_done, GRPC_ERROR_NONE); return; } - GPR_ASSERT(arg->type == GRPC_ARG_STRING); char* server_name = arg->value.string; // Get headers from channel args. arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_HEADERS); -- cgit v1.2.3 From ffff5421a7050508a36233210abd1e11a55aa9b1 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Wed, 14 Feb 2018 10:56:09 -0800 Subject: Fix fuzz test --- src/core/ext/filters/client_channel/client_channel.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 50d562f946..7b04bdc0dd 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -475,8 +475,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { // Find service config. channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); - if (channel_arg != nullptr) { - GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + if (channel_arg != nullptr && channel_arg->type == GRPC_ARG_STRING) { service_config_json = gpr_strdup(channel_arg->value.string); grpc_service_config* service_config = grpc_service_config_create(service_config_json); -- cgit v1.2.3 From 6f374ea2fef54f0cf12af936bc9a30896830152f Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 14 Feb 2018 13:03:51 -0800 Subject: Use new helper funciton in one file --- src/core/ext/filters/client_channel/http_connect_handshaker.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index c1959bdac6..248a6347d5 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -254,7 +254,8 @@ static void http_connect_handshaker_do_handshake( // If not found, invoke on_handshake_done without doing anything. const grpc_arg* arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_SERVER); - if (arg == nullptr || arg->type != GRPC_ARG_STRING) { + char* server_name = grpc_channel_arg_get_string(arg); + if (server_name == nullptr) { // Set shutdown to true so that subsequent calls to // http_connect_handshaker_shutdown() do nothing. gpr_mu_lock(&handshaker->mu); @@ -263,16 +264,15 @@ static void http_connect_handshaker_do_handshake( GRPC_CLOSURE_SCHED(on_handshake_done, GRPC_ERROR_NONE); return; } - char* server_name = arg->value.string; // Get headers from channel args. arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_HEADERS); + char* arg_header_string = grpc_channel_arg_get_string(arg); grpc_http_header* headers = nullptr; size_t num_headers = 0; char** header_strings = nullptr; size_t num_header_strings = 0; - if (arg != nullptr) { - GPR_ASSERT(arg->type == GRPC_ARG_STRING); - gpr_string_split(arg->value.string, "\n", &header_strings, + if (arg_header_string != nullptr) { + gpr_string_split(arg_header_string, "\n", &header_strings, &num_header_strings); headers = static_cast( gpr_malloc(sizeof(grpc_http_header) * num_header_strings)); -- cgit v1.2.3 From 67f10123601a291ce9105140dcd8b92a286fb94e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 14 Feb 2018 13:08:01 -0800 Subject: Fix chttp2 to destroy the send_message byte stream upon error. --- src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index ad8da94cb3..2fc3c4fa41 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -1473,6 +1473,7 @@ static void perform_stream_op_locked(void* stream_op, // streaming call might send another message before getting a // recv_message failure, breaking out of its loop, and then // starting recv_trailing_metadata. + grpc_byte_stream_destroy(op->payload->send_message.send_message); grpc_chttp2_complete_closure_step( t, s, &s->fetching_send_message_finished, t->is_client && s->received_trailing_metadata @@ -2092,7 +2093,10 @@ void grpc_chttp2_fail_pending_writes(grpc_chttp2_transport* t, GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); - s->fetching_send_message = nullptr; + if (s->fetching_send_message != nullptr) { + grpc_byte_stream_destroy(s->fetching_send_message); + s->fetching_send_message = nullptr; + } grpc_chttp2_complete_closure_step(t, s, &s->fetching_send_message_finished, GRPC_ERROR_REF(error), "fetching_send_message_finished"); -- cgit v1.2.3 From bf323a985f0a6f2ab81fe07a790959aee743791d Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 14 Feb 2018 17:34:05 -0800 Subject: Use grpc_channel_arg_get_string when appropriate --- src/core/ext/filters/client_channel/client_channel.cc | 16 +++++++--------- .../filters/client_channel/lb_policy/grpclb/grpclb.cc | 6 +++--- src/core/ext/filters/client_channel/subchannel.cc | 6 +++--- src/core/ext/filters/message_size/message_size_filter.cc | 6 +++--- .../chttp2/client/secure/secure_channel_create.cc | 4 +--- .../lib/security/credentials/fake/fake_credentials.cc | 6 +----- test/core/end2end/fixtures/h2_http_proxy.cc | 5 +++-- test/core/end2end/fixtures/http_proxy_fixture.cc | 5 +++-- 8 files changed, 24 insertions(+), 30 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 7b04bdc0dd..aec13f080a 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -405,10 +405,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { const char* lb_policy_name = nullptr; const grpc_arg* channel_arg = grpc_channel_args_find( chand->resolver_result, GRPC_ARG_LB_POLICY_NAME); - if (channel_arg != nullptr) { - GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - lb_policy_name = channel_arg->value.string; - } + const char* lb_policy_name = grpc_channel_arg_get_string(channel_arg); // Special case: If at least one balancer address is present, we use // the grpclb policy, regardless of what the resolver actually specified. channel_arg = @@ -475,16 +472,17 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { // Find service config. channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); - if (channel_arg != nullptr && channel_arg->type == GRPC_ARG_STRING) { - service_config_json = gpr_strdup(channel_arg->value.string); + service_config_json = + gpr_strdup(grpc_channel_arg_get_string(channel_arg)); + if (service_config_json != nullptr) { grpc_service_config* service_config = grpc_service_config_create(service_config_json); if (service_config != nullptr) { channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVER_URI); - GPR_ASSERT(channel_arg != nullptr); - GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - grpc_uri* uri = grpc_uri_parse(channel_arg->value.string, true); + const char* server_uri = grpc_channel_arg_get_string(channel_arg); + GPR_ASSERT(server_uri != nullptr); + grpc_uri* uri = grpc_uri_parse(server_uri, true); GPR_ASSERT(uri->path[0] != '\0'); service_config_parsing_state parsing_state; memset(&parsing_state, 0, sizeof(parsing_state)); diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 04bf798267..21c95460c8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -1829,9 +1829,9 @@ static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, /* Get server name. */ arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); - GPR_ASSERT(arg != nullptr); - GPR_ASSERT(arg->type == GRPC_ARG_STRING); - grpc_uri* uri = grpc_uri_parse(arg->value.string, true); + const char* server_uri = grpc_channel_arg_get_string(arg); + GPR_ASSERT(server_uri != nullptr); + grpc_uri* uri = grpc_uri_parse(server_uri, true); GPR_ASSERT(uri->path[0] != '\0'); glb_policy->server_name = gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path); diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index 179e3f27ac..fbe07c58f7 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -728,9 +728,9 @@ void grpc_get_subchannel_address_arg(const grpc_channel_args* args, const char* grpc_get_subchannel_address_uri_arg(const grpc_channel_args* args) { const grpc_arg* addr_arg = grpc_channel_args_find(args, GRPC_ARG_SUBCHANNEL_ADDRESS); - GPR_ASSERT(addr_arg != nullptr); // Should have been set by LB policy. - GPR_ASSERT(addr_arg->type == GRPC_ARG_STRING); - return addr_arg->value.string; + const char* addr_str = grpc_channel_arg_get_string(addr_arg); + GPR_ASSERT(addr_str != nullptr); // Should have been set by LB policy. + return addr_str; } grpc_arg grpc_create_subchannel_address_arg(const grpc_resolved_address* addr) { diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 49d9ae60ae..0fb3935609 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -249,10 +249,10 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem, // Get method config table from channel args. const grpc_arg* channel_arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); - if (channel_arg != nullptr) { - GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + const char* service_config_str = grpc_channel_arg_get_string(channel_arg); + if (service_config_str != nullptr) { grpc_service_config* service_config = - grpc_service_config_create(channel_arg->value.string); + grpc_service_config_create(service_config_str); if (service_config != nullptr) { chand->method_limit_table = grpc_service_config_create_method_config_table( diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index 8c4025ed13..8f896f70b4 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -63,9 +63,7 @@ static grpc_subchannel_args* get_secure_naming_subchannel_args( // To which address are we connecting? By default, use the server URI. const grpc_arg* server_uri_arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); - GPR_ASSERT(server_uri_arg != nullptr); - GPR_ASSERT(server_uri_arg->type == GRPC_ARG_STRING); - const char* server_uri_str = server_uri_arg->value.string; + const char* server_uri_str = grpc_channel_arg_get_string(server_uri_arg); GPR_ASSERT(server_uri_str != nullptr); grpc_uri* server_uri = grpc_uri_parse(server_uri_str, true /* supress errors */); diff --git a/src/core/lib/security/credentials/fake/fake_credentials.cc b/src/core/lib/security/credentials/fake/fake_credentials.cc index 3b29db2efa..fa0f89c583 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.cc +++ b/src/core/lib/security/credentials/fake/fake_credentials.cc @@ -87,11 +87,7 @@ const char* grpc_fake_transport_get_expected_targets( const grpc_channel_args* args) { const grpc_arg* expected_target_arg = grpc_channel_args_find(args, GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS); - if (expected_target_arg != nullptr && - expected_target_arg->type == GRPC_ARG_STRING) { - return expected_target_arg->value.string; - } - return nullptr; + return grpc_channel_arg_get_string(expected_target_arg); } /* -- Metadata-only test credentials. -- */ diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc index 017682f4c7..b990d7a763 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.cc +++ b/test/core/end2end/fixtures/h2_http_proxy.cc @@ -72,11 +72,12 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, /* If testing for proxy auth, add credentials to proxy uri */ const grpc_arg* proxy_auth_arg = grpc_channel_args_find(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); - if (proxy_auth_arg == nullptr || proxy_auth_arg->type != GRPC_ARG_STRING) { + const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); + if (proxy_auth_str == nullptr) { gpr_asprintf(&proxy_uri, "http://%s", grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } else { - gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth_arg->value.string, + gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth_str, grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } gpr_setenv("http_proxy", proxy_uri); diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 289843e737..cf7855494f 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -413,12 +413,13 @@ static void on_read_request_done(void* arg, grpc_error* error) { // If proxy auth is being used, check if the header is present and as expected const grpc_arg* proxy_auth_arg = grpc_channel_args_find( conn->proxy->channel_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); - if (proxy_auth_arg != nullptr && proxy_auth_arg->type == GRPC_ARG_STRING) { + const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); + if (proxy_auth_str != nullptr) { bool client_authenticated = false; for (size_t i = 0; i < conn->http_request.hdr_count; i++) { if (strcmp(conn->http_request.hdrs[i].key, "Proxy-Authorization") == 0) { client_authenticated = proxy_auth_header_matches( - conn->http_request.hdrs[i].value, proxy_auth_arg->value.string); + conn->http_request.hdrs[i].value, proxy_auth_str); break; } } -- cgit v1.2.3 From efc5ae8008d8778d98a98616df5e5367e44babb6 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 14 Feb 2018 17:17:58 -0800 Subject: Add binary metadata support for cronet transport --- .../transport/cronet/transport/cronet_transport.cc | 65 ++++++++++++++++++---- .../CoreCronetEnd2EndTests.mm | 3 +- 2 files changed, 55 insertions(+), 13 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 8904c122a7..283417bcbe 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -24,6 +24,8 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/bin_decoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include "src/core/ext/transport/cronet/transport/cronet_transport.h" #include "src/core/lib/gpr/host_port.h" @@ -214,6 +216,26 @@ void grpc_cronet_stream_unref(stream_obj* s) { grpc_stream_unref(s->refcount); } static enum e_op_result execute_stream_op(struct op_and_state* oas); +static const size_t tail_xtra[4] = {0, 0, 1, 2}; + +static size_t infer_length_after_decode(const grpc_slice& slice) { + size_t len = GRPC_SLICE_LENGTH(slice); + const uint8_t* bytes = GRPC_SLICE_START_PTR(slice); + while (len > 0 && bytes[len - 1] == '=') { + len--; + } + size_t tuples = len / 4; + size_t tail_case = len % 4; + if (tail_case == 1) { + gpr_log(GPR_ERROR, + "Base64 decoding failed. Input has a length of %zu (withou " + "padding), which is invalid.\n", + len); + tail_case = 0; + } + return tuples * 3 + tail_xtra[tail_case]; +} + /* Utility function to translate enum into string for printing */ @@ -518,14 +540,21 @@ static void on_response_headers_received( grpc_chttp2_incoming_metadata_buffer_init(&s->state.rs.initial_metadata, s->arena); for (size_t i = 0; i < headers->count; i++) { + grpc_slice key = grpc_slice_intern( + grpc_slice_from_static_string(headers->headers[i].key)); + grpc_slice value; + if (grpc_is_binary_header(key)) { + value = grpc_slice_from_static_string(headers->headers[i].value); + value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( + value, infer_length_after_decode(value))); + } else { + value = grpc_slice_intern( + grpc_slice_from_static_string(headers->headers[i].value)); + } GRPC_LOG_IF_ERROR("on_response_headers_received", grpc_chttp2_incoming_metadata_buffer_add( &s->state.rs.initial_metadata, - grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_string( - headers->headers[i].key)), - grpc_slice_intern(grpc_slice_from_static_string( - headers->headers[i].value))))); + grpc_mdelem_from_slices(key, value))); } s->state.state_callback_received[OP_RECV_INITIAL_METADATA] = true; if (!(s->state.state_op_done[OP_CANCEL_ERROR] || @@ -624,14 +653,21 @@ static void on_response_trailers_received( for (size_t i = 0; i < trailers->count; i++) { CRONET_LOG(GPR_DEBUG, "trailer key=%s, value=%s", trailers->headers[i].key, trailers->headers[i].value); + grpc_slice key = grpc_slice_intern( + grpc_slice_from_static_string(trailers->headers[i].key)); + grpc_slice value; + if (grpc_is_binary_header(key)) { + value = grpc_slice_from_static_string(trailers->headers[i].value); + value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( + value, infer_length_after_decode(value))); + } else { + value = grpc_slice_intern( + grpc_slice_from_static_string(trailers->headers[i].value)); + } GRPC_LOG_IF_ERROR("on_response_trailers_received", grpc_chttp2_incoming_metadata_buffer_add( &s->state.rs.trailing_metadata, - grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_string( - trailers->headers[i].key)), - grpc_slice_intern(grpc_slice_from_static_string( - trailers->headers[i].value))))); + grpc_mdelem_from_slices(key, value))); s->state.rs.trailing_metadata_valid = true; if (0 == strcmp(trailers->headers[i].key, "grpc-status") && 0 != strcmp(trailers->headers[i].value, "0")) { @@ -721,7 +757,14 @@ static void convert_metadata_to_cronet_headers( grpc_mdelem mdelem = curr->md; curr = curr->next; char* key = grpc_slice_to_c_string(GRPC_MDKEY(mdelem)); - char* value = grpc_slice_to_c_string(GRPC_MDVALUE(mdelem)); + char* value; + if (grpc_is_binary_header(GRPC_MDKEY(mdelem))) { + grpc_slice wire_value = grpc_chttp2_base64_encode(GRPC_MDVALUE(mdelem)); + value = grpc_slice_to_c_string(wire_value); + grpc_slice_unref(wire_value); + } else { + value = grpc_slice_to_c_string(GRPC_MDVALUE(mdelem)); + } if (grpc_slice_eq(GRPC_MDKEY(mdelem), GRPC_MDSTR_SCHEME) || grpc_slice_eq(GRPC_MDKEY(mdelem), GRPC_MDSTR_AUTHORITY)) { /* Cronet populates these fields on its own */ diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm index d91b5cf99e..33ccdb5844 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm @@ -224,8 +224,7 @@ static char *roots_filename; } - (void)testBinaryMetadata { - // NOT SUPPORTED - //[self testIndividualCase:(char *)"binary_metadata"]; + [self testIndividualCase:(char *)"binary_metadata"]; } - (void)testCallCreds { -- cgit v1.2.3 From 24f388bf95155bae2068c76fcac6ce8e2af3841e Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 14 Feb 2018 20:02:02 -0800 Subject: Fix compile --- src/core/ext/filters/client_channel/client_channel.cc | 1 - test/core/end2end/fixtures/http_proxy_fixture.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index aec13f080a..e1356d90b3 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -402,7 +402,6 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { if (chand->resolver_result != nullptr) { if (chand->resolver != nullptr) { // Find LB policy name. - const char* lb_policy_name = nullptr; const grpc_arg* channel_arg = grpc_channel_args_find( chand->resolver_result, GRPC_ARG_LB_POLICY_NAME); const char* lb_policy_name = grpc_channel_arg_get_string(channel_arg); diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index cf7855494f..18e8310251 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -413,7 +413,7 @@ static void on_read_request_done(void* arg, grpc_error* error) { // If proxy auth is being used, check if the header is present and as expected const grpc_arg* proxy_auth_arg = grpc_channel_args_find( conn->proxy->channel_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); - const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); + char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); if (proxy_auth_str != nullptr) { bool client_authenticated = false; for (size_t i = 0; i < conn->http_request.hdr_count; i++) { -- cgit v1.2.3 From d50b19188f654d2e4aae1f7cf6a7f6a09961eccb Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 15 Feb 2018 08:47:04 -0800 Subject: Update todo --- src/core/ext/transport/inproc/inproc_transport.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 64add3ca0b..e1d4843785 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -508,7 +508,7 @@ static void fail_helper_locked(inproc_stream* s, grpc_error* error) { GRPC_ERROR_UNREF(error); } -// TODO(vpai): It should not be necessary to drain the incoming byte +// TODO(vjpai): It should not be necessary to drain the incoming byte // stream and create a new one; instead, we should simply pass the byte // stream from the sender directly to the receiver as-is. // -- cgit v1.2.3 From 87c6504ca975abcee0f86fe670b843c8a08c50fb Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Thu, 15 Feb 2018 09:42:45 -0800 Subject: Revert "Revert "Revert "Revert "grpclb re-resolution"""" --- include/grpc/impl/codegen/grpc_types.h | 2 +- src/core/ext/filters/client_channel/lb_policy.cc | 7 +- src/core/ext/filters/client_channel/lb_policy.h | 4 - .../client_channel/lb_policy/grpclb/grpclb.cc | 133 ++++++++++--------- .../lb_policy/pick_first/pick_first.cc | 11 +- .../lb_policy/round_robin/round_robin.cc | 11 +- test/cpp/end2end/grpclb_end2end_test.cc | 143 +++++++++++++++++++-- 7 files changed, 208 insertions(+), 103 deletions(-) (limited to 'src/core/ext') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index a372dbba73..3e897b0b27 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -301,7 +301,7 @@ typedef struct { #define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms" /* Timeout in milliseconds to wait for the serverlist from the grpclb load balancer before using fallback backend addresses from the resolver. - If 0, fallback will never be used. */ + If 0, fallback will never be used. Default value is 10000. */ #define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms" /** If non-zero, grpc server's cronet compression workaround will be enabled */ #define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \ diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc index cc4fe7ec62..27fb2ad1f4 100644 --- a/src/core/ext/filters/client_channel/lb_policy.cc +++ b/src/core/ext/filters/client_channel/lb_policy.cc @@ -118,7 +118,8 @@ void grpc_lb_policy_update_locked(grpc_lb_policy* policy, void grpc_lb_policy_set_reresolve_closure_locked( grpc_lb_policy* policy, grpc_closure* request_reresolution) { - policy->vtable->set_reresolve_closure_locked(policy, request_reresolution); + GPR_ASSERT(policy->request_reresolution == nullptr); + policy->request_reresolution = request_reresolution; } void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, @@ -133,8 +134,8 @@ void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, grpc_lb_trace->name(), policy, grpc_error_string(error)); } } else { - if (grpc_lb_trace->enabled() && error == GRPC_ERROR_NONE) { - gpr_log(GPR_DEBUG, "%s %p: re-resolution already in progress.", + if (grpc_lb_trace->enabled()) { + gpr_log(GPR_DEBUG, "%s %p: no available re-resolution closure.", grpc_lb_trace->name(), policy); } } diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 30660cb83d..6edd314d5e 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -107,10 +107,6 @@ struct grpc_lb_policy_vtable { void (*update_locked)(grpc_lb_policy* policy, const grpc_lb_policy_args* args); - - /** \see grpc_lb_policy_set_reresolve_closure */ - void (*set_reresolve_closure_locked)(grpc_lb_policy* policy, - grpc_closure* request_reresolution); }; #ifndef NDEBUG diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 21c95460c8..da82b3f4da 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -249,7 +249,7 @@ typedef struct glb_lb_policy { /** the RR policy to use of the backend servers returned by the LB server */ grpc_lb_policy* rr_policy; - grpc_closure on_rr_connectivity_changed; + /** the connectivity state of the embedded RR policy */ grpc_connectivity_state rr_connectivity_state; bool started_picking; @@ -292,6 +292,12 @@ typedef struct glb_lb_policy { /** called upon changes to the LB channel's connectivity. */ grpc_closure lb_channel_on_connectivity_changed; + /** called upon changes to the RR's connectivity. */ + grpc_closure rr_on_connectivity_changed; + + /** called upon reresolution request from the RR policy. */ + grpc_closure rr_on_reresolution_requested; + /************************************************************/ /* client data associated with the LB server communication */ /************************************************************/ @@ -590,9 +596,8 @@ static grpc_lb_addresses* extract_backend_addresses_locked( return backend_addresses; } -static void update_lb_connectivity_status_locked( - glb_lb_policy* glb_policy, grpc_connectivity_state rr_state, - grpc_error* rr_state_error) { +static void update_lb_connectivity_status_locked(glb_lb_policy* glb_policy, + grpc_error* rr_state_error) { const grpc_connectivity_state curr_glb_state = grpc_connectivity_state_check(&glb_policy->state_tracker); /* The new connectivity status is a function of the previous one and the new @@ -624,7 +629,7 @@ static void update_lb_connectivity_status_locked( * * (*) This function mustn't be called during shutting down. */ GPR_ASSERT(curr_glb_state != GRPC_CHANNEL_SHUTDOWN); - switch (rr_state) { + switch (glb_policy->rr_connectivity_state) { case GRPC_CHANNEL_TRANSIENT_FAILURE: case GRPC_CHANNEL_SHUTDOWN: GPR_ASSERT(rr_state_error != GRPC_ERROR_NONE); @@ -638,11 +643,12 @@ static void update_lb_connectivity_status_locked( gpr_log( GPR_INFO, "[grpclb %p] Setting grpclb's state to %s from new RR policy %p state.", - glb_policy, grpc_connectivity_state_name(rr_state), + glb_policy, + grpc_connectivity_state_name(glb_policy->rr_connectivity_state), glb_policy->rr_policy); } - grpc_connectivity_state_set(&glb_policy->state_tracker, rr_state, - rr_state_error, + grpc_connectivity_state_set(&glb_policy->state_tracker, + glb_policy->rr_connectivity_state, rr_state_error, "update_lb_connectivity_status_locked"); } @@ -740,11 +746,36 @@ static void lb_policy_args_destroy(grpc_lb_policy_args* args) { gpr_free(args); } -static void on_rr_connectivity_changed_locked(void* arg, grpc_error* error); +static void rr_on_reresolution_requested_locked(void* arg, grpc_error* error) { + glb_lb_policy* glb_policy = (glb_lb_policy*)arg; + if (glb_policy->shutting_down || error != GRPC_ERROR_NONE) { + GRPC_LB_POLICY_UNREF(&glb_policy->base, + "rr_on_reresolution_requested_locked"); + return; + } + if (grpc_lb_glb_trace.enabled()) { + gpr_log( + GPR_DEBUG, + "[grpclb %p] Re-resolution requested from the internal RR policy (%p).", + glb_policy, glb_policy->rr_policy); + } + // If we are talking to a balancer, we expect to get updated addresses form + // the balancer, so we can ignore the re-resolution request from the RR + // policy. Otherwise, handle the re-resolution request using glb's original + // re-resolution closure. + if (glb_policy->lb_calld == nullptr || + !glb_policy->lb_calld->seen_initial_response) { + grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, + GRPC_ERROR_NONE); + } + // Give back the wrapper closure to the RR policy. + grpc_lb_policy_set_reresolve_closure_locked( + glb_policy->rr_policy, &glb_policy->rr_on_reresolution_requested); +} + static void create_rr_locked(glb_lb_policy* glb_policy, grpc_lb_policy_args* args) { GPR_ASSERT(glb_policy->rr_policy == nullptr); - grpc_lb_policy* new_rr_policy = grpc_lb_policy_create("round_robin", args); if (new_rr_policy == nullptr) { gpr_log(GPR_ERROR, @@ -757,29 +788,25 @@ static void create_rr_locked(glb_lb_policy* glb_policy, glb_policy->rr_policy); return; } + GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_reresolution_requested_locked"); grpc_lb_policy_set_reresolve_closure_locked( - new_rr_policy, glb_policy->base.request_reresolution); - glb_policy->base.request_reresolution = nullptr; + new_rr_policy, &glb_policy->rr_on_reresolution_requested); glb_policy->rr_policy = new_rr_policy; grpc_error* rr_state_error = nullptr; glb_policy->rr_connectivity_state = grpc_lb_policy_check_connectivity_locked( glb_policy->rr_policy, &rr_state_error); /* Connectivity state is a function of the RR policy updated/created */ - update_lb_connectivity_status_locked( - glb_policy, glb_policy->rr_connectivity_state, rr_state_error); + update_lb_connectivity_status_locked(glb_policy, rr_state_error); /* Add the gRPC LB's interested_parties pollset_set to that of the newly * created RR policy. This will make the RR policy progress upon activity on * gRPC LB, which in turn is tied to the application's call */ grpc_pollset_set_add_pollset_set(glb_policy->rr_policy->interested_parties, glb_policy->base.interested_parties); - GRPC_CLOSURE_INIT(&glb_policy->on_rr_connectivity_changed, - on_rr_connectivity_changed_locked, glb_policy, - grpc_combiner_scheduler(glb_policy->base.combiner)); /* Subscribe to changes to the connectivity of the new RR */ - GRPC_LB_POLICY_REF(&glb_policy->base, "glb_rr_connectivity_cb"); + GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_connectivity_changed_locked"); grpc_lb_policy_notify_on_state_change_locked( glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->on_rr_connectivity_changed); + &glb_policy->rr_on_connectivity_changed); grpc_lb_policy_exit_idle_locked(glb_policy->rr_policy); // Send pending picks to RR policy. pending_pick* pp; @@ -827,28 +854,18 @@ static void rr_handover_locked(glb_lb_policy* glb_policy) { lb_policy_args_destroy(args); } -static void on_rr_connectivity_changed_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = static_cast(arg); +static void rr_on_connectivity_changed_locked(void* arg, grpc_error* error) { + glb_lb_policy* glb_policy = (glb_lb_policy*)arg; if (glb_policy->shutting_down) { - GRPC_LB_POLICY_UNREF(&glb_policy->base, "glb_rr_connectivity_cb"); - return; - } - if (glb_policy->rr_connectivity_state == GRPC_CHANNEL_SHUTDOWN) { - /* An RR policy that has transitioned into the SHUTDOWN connectivity state - * should not be considered for picks or updates: the SHUTDOWN state is a - * sink, policies can't transition back from it. .*/ - GRPC_LB_POLICY_UNREF(glb_policy->rr_policy, "rr_connectivity_shutdown"); - glb_policy->rr_policy = nullptr; - GRPC_LB_POLICY_UNREF(&glb_policy->base, "glb_rr_connectivity_cb"); + GRPC_LB_POLICY_UNREF(&glb_policy->base, + "rr_on_connectivity_changed_locked"); return; } - /* rr state != SHUTDOWN && !glb_policy->shutting down: biz as usual */ - update_lb_connectivity_status_locked( - glb_policy, glb_policy->rr_connectivity_state, GRPC_ERROR_REF(error)); - /* Resubscribe. Reuse the "glb_rr_connectivity_cb" ref. */ + update_lb_connectivity_status_locked(glb_policy, GRPC_ERROR_REF(error)); + // Resubscribe. Reuse the "rr_on_connectivity_changed_locked" ref. grpc_lb_policy_notify_on_state_change_locked( glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->on_rr_connectivity_changed); + &glb_policy->rr_on_connectivity_changed); } static void destroy_balancer_name(void* balancer_name) { @@ -971,8 +988,6 @@ static void glb_shutdown_locked(grpc_lb_policy* pol, if (glb_policy->rr_policy != nullptr) { grpc_lb_policy_shutdown_locked(glb_policy->rr_policy, nullptr); GRPC_LB_POLICY_UNREF(glb_policy->rr_policy, "glb_shutdown"); - } else { - grpc_lb_policy_try_reresolve(pol, &grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); } // We destroy the LB channel here because // glb_lb_channel_on_connectivity_changed_cb needs a valid glb_policy @@ -984,6 +999,7 @@ static void glb_shutdown_locked(grpc_lb_policy* pol, } grpc_connectivity_state_set(&glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "glb_shutdown"); + grpc_lb_policy_try_reresolve(pol, &grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); // Clear pending picks. pending_pick* pp = glb_policy->pending_picks; glb_policy->pending_picks = nullptr; @@ -1623,6 +1639,8 @@ static void lb_on_server_status_received_locked(void* arg, grpc_error* error) { lb_calld, lb_calld->lb_call, grpc_error_string(error)); gpr_free(status_details); } + grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, + GRPC_ERROR_NONE); // If this lb_calld is still in use, this call ended because of a failure so // we want to retry connecting. Otherwise, we have deliberately ended this // call and no further action is required. @@ -1651,16 +1669,15 @@ static void lb_on_fallback_timer_locked(void* arg, grpc_error* error) { glb_policy->fallback_timer_callback_pending = false; /* If we receive a serverlist after the timer fires but before this callback * actually runs, don't fall back. */ - if (glb_policy->serverlist == nullptr) { - if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE) { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Falling back to use backends from resolver", - glb_policy); - } - GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); - rr_handover_locked(glb_policy); + if (glb_policy->serverlist == nullptr && !glb_policy->shutting_down && + error == GRPC_ERROR_NONE) { + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Falling back to use backends from resolver", + glb_policy); } + GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); + rr_handover_locked(glb_policy); } GRPC_LB_POLICY_UNREF(&glb_policy->base, "grpclb_fallback_timer"); } @@ -1781,19 +1798,6 @@ static void glb_lb_channel_on_connectivity_changed_cb(void* arg, } } -static void glb_set_reresolve_closure_locked( - grpc_lb_policy* policy, grpc_closure* request_reresolution) { - glb_lb_policy* glb_policy = reinterpret_cast(policy); - GPR_ASSERT(!glb_policy->shutting_down); - GPR_ASSERT(glb_policy->base.request_reresolution == nullptr); - if (glb_policy->rr_policy != nullptr) { - grpc_lb_policy_set_reresolve_closure_locked(glb_policy->rr_policy, - request_reresolution); - } else { - glb_policy->base.request_reresolution = request_reresolution; - } -} - /* Code wiring the policy with the rest of the core */ static const grpc_lb_policy_vtable glb_lb_policy_vtable = { glb_destroy, @@ -1805,8 +1809,7 @@ static const grpc_lb_policy_vtable glb_lb_policy_vtable = { glb_exit_idle_locked, glb_check_connectivity_locked, glb_notify_on_state_change_locked, - glb_update_locked, - glb_set_reresolve_closure_locked}; + glb_update_locked}; static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, grpc_lb_policy_args* args) { @@ -1887,6 +1890,12 @@ static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, return nullptr; } grpc_subchannel_index_ref(); + GRPC_CLOSURE_INIT(&glb_policy->rr_on_connectivity_changed, + rr_on_connectivity_changed_locked, glb_policy, + grpc_combiner_scheduler(args->combiner)); + GRPC_CLOSURE_INIT(&glb_policy->rr_on_reresolution_requested, + rr_on_reresolution_requested_locked, glb_policy, + grpc_combiner_scheduler(args->combiner)); GRPC_CLOSURE_INIT(&glb_policy->lb_channel_on_connectivity_changed, glb_lb_channel_on_connectivity_changed_cb, glb_policy, grpc_combiner_scheduler(args->combiner)); diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 1485f7caf5..296bdcb247 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -520,14 +520,6 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { } } -static void pf_set_reresolve_closure_locked( - grpc_lb_policy* policy, grpc_closure* request_reresolution) { - pick_first_lb_policy* p = reinterpret_cast(policy); - GPR_ASSERT(!p->shutdown); - GPR_ASSERT(policy->request_reresolution == nullptr); - policy->request_reresolution = request_reresolution; -} - static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { pf_destroy, pf_shutdown_locked, @@ -538,8 +530,7 @@ static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { pf_exit_idle_locked, pf_check_connectivity_locked, pf_notify_on_state_change_locked, - pf_update_locked, - pf_set_reresolve_closure_locked}; + pf_update_locked}; static void pick_first_factory_ref(grpc_lb_policy_factory* factory) {} diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index cefd0d8d7d..b5b4c44ef1 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -620,14 +620,6 @@ static void rr_update_locked(grpc_lb_policy* policy, } } -static void rr_set_reresolve_closure_locked( - grpc_lb_policy* policy, grpc_closure* request_reresolution) { - round_robin_lb_policy* p = reinterpret_cast(policy); - GPR_ASSERT(!p->shutdown); - GPR_ASSERT(policy->request_reresolution == nullptr); - policy->request_reresolution = request_reresolution; -} - static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { rr_destroy, rr_shutdown_locked, @@ -638,8 +630,7 @@ static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { rr_exit_idle_locked, rr_check_connectivity_locked, rr_notify_on_state_change_locked, - rr_update_locked, - rr_set_reresolve_closure_locked}; + rr_update_locked}; static void round_robin_factory_ref(grpc_lb_policy_factory* factory) {} diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index da5d498963..cc65fe4fdb 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -192,6 +192,7 @@ class BalancerServiceImpl : public BalancerService { gpr_log(GPR_INFO, "LB[%p]: recv msg '%s'", this, request.DebugString().c_str()); + // TODO(juanlishen): Initial response should always be the first response. if (client_load_reporting_interval_seconds_ > 0) { LoadBalanceResponse initial_response; initial_response.mutable_initial_response() @@ -444,7 +445,7 @@ class GrpclbEnd2endTest : public ::testing::Test { void WaitForBackend(size_t backend_idx) { do { - CheckRpcSendOk(); + SendRpc(); } while (backends_[backend_idx]->request_count() == 0); ResetBackendCounters(); } @@ -663,9 +664,6 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) { EXPECT_EQ(1U, balancer_servers_[0].service_->request_count()); // and sent two responses. EXPECT_EQ(2U, balancer_servers_[0].service_->response_count()); - - // Check LB policy name for the channel. - EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); } TEST_F(SingleBalancerTest, Fallback) { @@ -874,8 +872,6 @@ TEST_F(SingleBalancerTest, BackendsRestart) { // machinery to either update the LB responses "on the fly" or instruct // backends which ports to restart on. CheckRpcSendFailure(); - // Check LB policy name for the channel. - EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); } class UpdatesTest : public GrpclbEnd2endTest { @@ -939,8 +935,6 @@ TEST_F(UpdatesTest, UpdateBalancers) { EXPECT_EQ(1U, balancer_servers_[1].service_->response_count()); EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); - // Check LB policy name for the channel. - EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); } // Send an update with the same set of LBs as the one in SetUp() in order to @@ -1012,9 +1006,6 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) { // doesn't assign the second backend. EXPECT_EQ(0U, backend_servers_[1].service_->request_count()); balancers_[0]->NotifyDoneWithServerlists(); - - // Check LB policy name for the channel. - EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); } TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { @@ -1097,8 +1088,134 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { EXPECT_LE(balancer_servers_[1].service_->response_count(), 2U); EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); - // Check LB policy name for the channel. - EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); +} + +TEST_F(UpdatesTest, ReresolveDeadBalancer) { + std::vector addresses; + addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""}); + SetNextResolution(addresses); + addresses.clear(); + addresses.emplace_back(AddressData{balancer_servers_[1].port_, true, ""}); + SetNextReresolutionResponse(addresses); + const std::vector first_backend{GetBackendPorts()[0]}; + const std::vector second_backend{GetBackendPorts()[1]}; + + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0); + ScheduleResponseForBalancer( + 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0); + + // Start servers and send 10 RPCs per server. + gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); + CheckRpcSendOk(10); + gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); + // All 10 requests should have gone to the first backend. + EXPECT_EQ(10U, backend_servers_[0].service_->request_count()); + + // Kill backend 0. + gpr_log(GPR_INFO, "********** ABOUT TO KILL BACKEND 0 *************"); + if (backends_[0]->Shutdown()) backend_servers_[0].Shutdown(); + gpr_log(GPR_INFO, "********** KILLED BACKEND 0 *************"); + + CheckRpcSendFailure(); + + balancers_[1]->NotifyDoneWithServerlists(); + balancers_[2]->NotifyDoneWithServerlists(); + EXPECT_EQ(0U, balancer_servers_[1].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[1].service_->response_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); + + // Kill balancer 0. + gpr_log(GPR_INFO, "********** ABOUT TO KILL BALANCER 0 *************"); + balancers_[0]->NotifyDoneWithServerlists(); + if (balancers_[0]->Shutdown()) balancer_servers_[0].Shutdown(); + gpr_log(GPR_INFO, "********** KILLED BALANCER 0 *************"); + + balancers_[0]->NotifyDoneWithServerlists(); + balancers_[1]->NotifyDoneWithServerlists(); + balancers_[2]->NotifyDoneWithServerlists(); + // Balancer 0 got a single request. + EXPECT_EQ(1U, balancer_servers_[0].service_->request_count()); + // and sent a single response. + EXPECT_EQ(1U, balancer_servers_[0].service_->response_count()); + // Balancer 1 may have received a request if re-resolution is done quickly + // enough. + EXPECT_GE(balancer_servers_[1].service_->request_count(), 0U); + EXPECT_GE(balancer_servers_[1].service_->response_count(), 0U); + EXPECT_LE(balancer_servers_[1].service_->request_count(), 1U); + EXPECT_LE(balancer_servers_[1].service_->response_count(), 1U); + EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); + + // Wait until re-resolution has finished, as signaled by the second backend + // receiving a request. + WaitForBackend(1); + + // This is serviced by the new serverlist. + gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH =========="); + CheckRpcSendOk(10); + gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH =========="); + // All 10 requests should have gone to the second backend. + EXPECT_EQ(10U, backend_servers_[1].service_->request_count()); + + balancers_[0]->NotifyDoneWithServerlists(); + balancers_[1]->NotifyDoneWithServerlists(); + balancers_[2]->NotifyDoneWithServerlists(); + EXPECT_EQ(1U, balancer_servers_[0].service_->request_count()); + EXPECT_EQ(1U, balancer_servers_[0].service_->response_count()); + EXPECT_EQ(1U, balancer_servers_[1].service_->request_count()); + EXPECT_EQ(1U, balancer_servers_[1].service_->response_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); +} + +TEST_F(UpdatesTest, ReresolveDeadBackend) { + ResetStub(500); + // The first resolution contains the addresses of a balancer that never + // responds, and a fallback backend. + std::vector addresses; + addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""}); + addresses.emplace_back(AddressData{backend_servers_[0].port_, false, ""}); + SetNextResolution(addresses); + // The re-resolution result will contain the addresses of the same balancer + // and a new fallback backend. + addresses.clear(); + addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""}); + addresses.emplace_back(AddressData{backend_servers_[1].port_, false, ""}); + SetNextReresolutionResponse(addresses); + + // Start servers and send 10 RPCs per server. + gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); + CheckRpcSendOk(10); + gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); + // All 10 requests should have gone to the fallback backend. + EXPECT_EQ(10U, backend_servers_[0].service_->request_count()); + + // Kill backend 0. + gpr_log(GPR_INFO, "********** ABOUT TO KILL BACKEND 0 *************"); + if (backends_[0]->Shutdown()) backend_servers_[0].Shutdown(); + gpr_log(GPR_INFO, "********** KILLED BACKEND 0 *************"); + + // Wait until re-resolution has finished, as signaled by the second backend + // receiving a request. + WaitForBackend(1); + + gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH =========="); + CheckRpcSendOk(10); + gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH =========="); + // All 10 requests should have gone to the second backend. + EXPECT_EQ(10U, backend_servers_[1].service_->request_count()); + + balancers_[0]->NotifyDoneWithServerlists(); + balancers_[1]->NotifyDoneWithServerlists(); + balancers_[2]->NotifyDoneWithServerlists(); + EXPECT_EQ(1U, balancer_servers_[0].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[0].service_->response_count()); + EXPECT_EQ(0U, balancer_servers_[1].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[1].service_->response_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->request_count()); + EXPECT_EQ(0U, balancer_servers_[2].service_->response_count()); } TEST_F(SingleBalancerTest, Drop) { -- cgit v1.2.3 From 1b95f476cc8dc11002f9d4ab64407cf3b16f95f2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 15 Feb 2018 12:54:02 -0800 Subject: Fix refcounting bug in resolver callback. --- src/core/ext/filters/client_channel/client_channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index e1356d90b3..8aa9905d5c 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -574,11 +574,11 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Got resolver result after disconnection", &error, 1), "resolver_gone"); - GRPC_CHANNEL_STACK_UNREF(chand->owning_stack, "resolver"); grpc_closure_list_fail_all(&chand->waiting_for_resolver_result_closures, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Channel disconnected", &error, 1)); GRPC_CLOSURE_LIST_SCHED(&chand->waiting_for_resolver_result_closures); + GRPC_CHANNEL_STACK_UNREF(chand->owning_stack, "resolver"); } else { // Not shutting down. grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; grpc_error* state_error = -- cgit v1.2.3 From ec42f328349efdbd88a267f74bde8e31dd6c7d68 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 15 Feb 2018 14:27:14 -0800 Subject: Fix typo --- src/core/ext/transport/cronet/transport/cronet_transport.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 283417bcbe..9dce5c99ca 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -228,8 +228,8 @@ static size_t infer_length_after_decode(const grpc_slice& slice) { size_t tail_case = len % 4; if (tail_case == 1) { gpr_log(GPR_ERROR, - "Base64 decoding failed. Input has a length of %zu (withou " - "padding), which is invalid.\n", + "Base64 decoding failed. Input has a length of %zu (without" + " padding), which is invalid.\n", len); tail_case = 0; } -- cgit v1.2.3 From c887549f9296d893957c6df17deaf5e2c6f4f633 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 20 Feb 2018 08:33:48 -0800 Subject: Convert LB policy API to C++. --- BUILD | 2 - build.yaml | 2 - gRPC-C++.podspec | 1 - gRPC-Core.podspec | 2 - grpc.gemspec | 1 - package.xml | 1 - .../ext/filters/client_channel/client_channel.cc | 110 +- .../client_channel/client_channel_plugin.cc | 4 +- src/core/ext/filters/client_channel/lb_policy.cc | 123 +- src/core/ext/filters/client_channel/lb_policy.h | 331 ++- .../client_channel/lb_policy/grpclb/grpclb.cc | 2953 ++++++++++---------- .../client_channel/lb_policy/grpclb/grpclb.h | 29 - .../lb_policy/pick_first/pick_first.cc | 523 ++-- .../lb_policy/round_robin/round_robin.cc | 584 ++-- .../client_channel/lb_policy/subchannel_list.cc | 28 +- .../client_channel/lb_policy/subchannel_list.h | 16 +- .../filters/client_channel/lb_policy_factory.cc | 14 - .../ext/filters/client_channel/lb_policy_factory.h | 50 +- .../filters/client_channel/lb_policy_registry.cc | 91 +- .../filters/client_channel/lb_policy_registry.h | 37 +- tools/doxygen/Doxyfile.core.internal | 1 - tools/run_tests/generated/sources_and_headers.json | 4 - 22 files changed, 2369 insertions(+), 2538 deletions(-) delete mode 100644 src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h (limited to 'src/core/ext') diff --git a/BUILD b/BUILD index 31dd9fded7..5489e4cf62 100644 --- a/BUILD +++ b/BUILD @@ -1148,7 +1148,6 @@ grpc_cc_library( ], hdrs = [ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", @@ -1177,7 +1176,6 @@ grpc_cc_library( ], hdrs = [ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", diff --git a/build.yaml b/build.yaml index 74c76a4072..b0ae5793af 100644 --- a/build.yaml +++ b/build.yaml @@ -518,7 +518,6 @@ filegroups: - name: grpc_lb_policy_grpclb headers: - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h @@ -539,7 +538,6 @@ filegroups: - name: grpc_lb_policy_grpclb_secure headers: - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 2f5465c6b8..21d37c87f3 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -504,7 +504,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport_impl.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 95db0d8e7d..f130d20cb3 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -448,7 +448,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport_impl.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', @@ -937,7 +936,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport_impl.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', diff --git a/grpc.gemspec b/grpc.gemspec index ac901da0fe..398ce50705 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -374,7 +374,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/transport_impl.h ) s.files += %w( src/core/lib/debug/trace.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h ) diff --git a/package.xml b/package.xml index 5575855648..d469d878b4 100644 --- a/package.xml +++ b/package.xml @@ -381,7 +381,6 @@ - diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 8aa9905d5c..174a15b447 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -175,7 +175,7 @@ typedef struct client_channel_channel_data { /** combiner protecting all variables below in this data structure */ grpc_combiner* combiner; /** currently active load balancer */ - grpc_lb_policy* lb_policy; + grpc_core::OrphanablePtr lb_policy; /** retry throttle data */ grpc_server_retry_throttle_data* retry_throttle_data; /** maps method names to method_parameters structs */ @@ -212,7 +212,7 @@ typedef struct { channel_data* chand; /** used as an identifier, don't dereference it because the LB policy may be * non-existing when the callback is run */ - grpc_lb_policy* lb_policy; + grpc_core::LoadBalancingPolicy* lb_policy; grpc_closure closure; } reresolution_request_args; @@ -223,11 +223,11 @@ typedef struct { channel_data* chand; grpc_closure on_changed; grpc_connectivity_state state; - grpc_lb_policy* lb_policy; + grpc_core::LoadBalancingPolicy* lb_policy; } lb_policy_connectivity_watcher; static void watch_lb_policy_locked(channel_data* chand, - grpc_lb_policy* lb_policy, + grpc_core::LoadBalancingPolicy* lb_policy, grpc_connectivity_state current_state); static void set_channel_connectivity_state_locked(channel_data* chand, @@ -241,15 +241,13 @@ static void set_channel_connectivity_state_locked(channel_data* chand, if (chand->lb_policy != nullptr) { if (state == GRPC_CHANNEL_TRANSIENT_FAILURE) { /* cancel picks with wait_for_ready=false */ - grpc_lb_policy_cancel_picks_locked( - chand->lb_policy, + chand->lb_policy->CancelMatchingPicksLocked( /* mask= */ GRPC_INITIAL_METADATA_WAIT_FOR_READY, /* check= */ 0, GRPC_ERROR_REF(error)); } else if (state == GRPC_CHANNEL_SHUTDOWN) { /* cancel all picks */ - grpc_lb_policy_cancel_picks_locked(chand->lb_policy, - /* mask= */ 0, /* check= */ 0, - GRPC_ERROR_REF(error)); + chand->lb_policy->CancelMatchingPicksLocked(/* mask= */ 0, /* check= */ 0, + GRPC_ERROR_REF(error)); } } if (grpc_client_channel_trace.enabled()) { @@ -263,7 +261,7 @@ static void on_lb_policy_state_changed_locked(void* arg, grpc_error* error) { lb_policy_connectivity_watcher* w = static_cast(arg); /* check if the notification is for the latest policy */ - if (w->lb_policy == w->chand->lb_policy) { + if (w->lb_policy == w->chand->lb_policy.get()) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p: lb_policy=%p state changed to %s", w->chand, w->lb_policy, grpc_connectivity_state_name(w->state)); @@ -279,7 +277,7 @@ static void on_lb_policy_state_changed_locked(void* arg, grpc_error* error) { } static void watch_lb_policy_locked(channel_data* chand, - grpc_lb_policy* lb_policy, + grpc_core::LoadBalancingPolicy* lb_policy, grpc_connectivity_state current_state) { lb_policy_connectivity_watcher* w = static_cast(gpr_malloc(sizeof(*w))); @@ -289,8 +287,7 @@ static void watch_lb_policy_locked(channel_data* chand, grpc_combiner_scheduler(chand->combiner)); w->state = current_state; w->lb_policy = lb_policy; - grpc_lb_policy_notify_on_state_change_locked(lb_policy, &w->state, - &w->on_changed); + lb_policy->NotifyOnStateChangeLocked(&w->state, &w->on_changed); } static void start_resolving_locked(channel_data* chand) { @@ -371,7 +368,7 @@ static void request_reresolution_locked(void* arg, grpc_error* error) { channel_data* chand = args->chand; // If this invocation is for a stale LB policy, treat it as an LB shutdown // signal. - if (args->lb_policy != chand->lb_policy || error != GRPC_ERROR_NONE || + if (args->lb_policy != chand->lb_policy.get() || error != GRPC_ERROR_NONE || chand->resolver == nullptr) { GRPC_CHANNEL_STACK_UNREF(chand->owning_stack, "re-resolution"); gpr_free(args); @@ -382,7 +379,7 @@ static void request_reresolution_locked(void* arg, grpc_error* error) { } chand->resolver->RequestReresolutionLocked(); // Give back the closure to the LB policy. - grpc_lb_policy_set_reresolve_closure_locked(chand->lb_policy, &args->closure); + chand->lb_policy->SetReresolutionClosureLocked(&args->closure); } static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { @@ -393,9 +390,10 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { } // Extract the following fields from the resolver result, if non-NULL. bool lb_policy_updated = false; + bool lb_policy_created = false; char* lb_policy_name_dup = nullptr; bool lb_policy_name_changed = false; - grpc_lb_policy* new_lb_policy = nullptr; + grpc_core::OrphanablePtr new_lb_policy; char* service_config_json = nullptr; grpc_server_retry_throttle_data* retry_throttle_data = nullptr; grpc_slice_hash_table* method_params_table = nullptr; @@ -433,10 +431,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { // Use pick_first if nothing was specified and we didn't select grpclb // above. if (lb_policy_name == nullptr) lb_policy_name = "pick_first"; - grpc_lb_policy_args lb_policy_args; - lb_policy_args.args = chand->resolver_result; - lb_policy_args.client_channel_factory = chand->client_channel_factory; - lb_policy_args.combiner = chand->combiner; + // Check to see if we're already using the right LB policy. // Note: It's safe to use chand->info_lb_policy_name here without // taking a lock on chand->info_mu, because this function is the @@ -448,10 +443,17 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { if (chand->lb_policy != nullptr && !lb_policy_name_changed) { // Continue using the same LB policy. Update with new addresses. lb_policy_updated = true; - grpc_lb_policy_update_locked(chand->lb_policy, &lb_policy_args); + chand->lb_policy->UpdateLocked(*chand->resolver_result); } else { // Instantiate new LB policy. - new_lb_policy = grpc_lb_policy_create(lb_policy_name, &lb_policy_args); + lb_policy_created = true; + grpc_core::LoadBalancingPolicy::Args lb_policy_args; + lb_policy_args.combiner = chand->combiner; + lb_policy_args.client_channel_factory = chand->client_channel_factory; + lb_policy_args.args = chand->resolver_result; + new_lb_policy = + grpc_core::LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy( + lb_policy_name, lb_policy_args); if (new_lb_policy == nullptr) { gpr_log(GPR_ERROR, "could not create LB policy \"%s\"", lb_policy_name); @@ -460,12 +462,11 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { static_cast( gpr_zalloc(sizeof(*args))); args->chand = chand; - args->lb_policy = new_lb_policy; + args->lb_policy = new_lb_policy.get(); GRPC_CLOSURE_INIT(&args->closure, request_reresolution_locked, args, grpc_combiner_scheduler(chand->combiner)); GRPC_CHANNEL_STACK_REF(chand->owning_stack, "re-resolution"); - grpc_lb_policy_set_reresolve_closure_locked(new_lb_policy, - &args->closure); + new_lb_policy->SetReresolutionClosureLocked(&args->closure); } } // Find service config. @@ -548,14 +549,14 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { if (chand->lb_policy != nullptr) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p: unreffing lb_policy=%p", chand, - chand->lb_policy); + chand->lb_policy.get()); } - grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties, + grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties(), chand->interested_parties); - grpc_lb_policy_shutdown_locked(chand->lb_policy, new_lb_policy); - GRPC_LB_POLICY_UNREF(chand->lb_policy, "channel"); + chand->lb_policy->HandOffPendingPicksLocked(new_lb_policy.get()); + chand->lb_policy.reset(); } - chand->lb_policy = new_lb_policy; + chand->lb_policy = std::move(new_lb_policy); } // Now that we've swapped out the relevant fields of chand, check for // error or shutdown. @@ -583,21 +584,20 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; grpc_error* state_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("No load balancing policy"); - if (new_lb_policy != nullptr) { + if (lb_policy_created) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p: initializing new LB policy", chand); } GRPC_ERROR_UNREF(state_error); - state = - grpc_lb_policy_check_connectivity_locked(new_lb_policy, &state_error); - grpc_pollset_set_add_pollset_set(new_lb_policy->interested_parties, + state = chand->lb_policy->CheckConnectivityLocked(&state_error); + grpc_pollset_set_add_pollset_set(chand->lb_policy->interested_parties(), chand->interested_parties); GRPC_CLOSURE_LIST_SCHED(&chand->waiting_for_resolver_result_closures); if (chand->exit_idle_when_lb_policy_arrives) { - grpc_lb_policy_exit_idle_locked(new_lb_policy); + chand->lb_policy->ExitIdleLocked(); chand->exit_idle_when_lb_policy_arrives = false; } - watch_lb_policy_locked(chand, new_lb_policy, state); + watch_lb_policy_locked(chand, chand->lb_policy.get(), state); } if (!lb_policy_updated) { set_channel_connectivity_state_locked( @@ -632,8 +632,8 @@ static void start_transport_op_locked(void* arg, grpc_error* error_ignored) { op->send_ping.on_ack, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Ping with no load balancing")); } else { - grpc_lb_policy_ping_one_locked( - chand->lb_policy, op->send_ping.on_initiate, op->send_ping.on_ack); + chand->lb_policy->PingOneLocked(op->send_ping.on_initiate, + op->send_ping.on_ack); op->bind_pollset = nullptr; } op->send_ping.on_initiate = nullptr; @@ -652,11 +652,9 @@ static void start_transport_op_locked(void* arg, grpc_error* error_ignored) { GRPC_CLOSURE_LIST_SCHED(&chand->waiting_for_resolver_result_closures); } if (chand->lb_policy != nullptr) { - grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties, + grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties(), chand->interested_parties); - grpc_lb_policy_shutdown_locked(chand->lb_policy, nullptr); - GRPC_LB_POLICY_UNREF(chand->lb_policy, "channel"); - chand->lb_policy = nullptr; + chand->lb_policy.reset(); } } GRPC_ERROR_UNREF(op->disconnect_with_error); @@ -786,10 +784,9 @@ static void cc_destroy_channel_elem(grpc_channel_element* elem) { grpc_client_channel_factory_unref(chand->client_channel_factory); } if (chand->lb_policy != nullptr) { - grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties, + grpc_pollset_set_del_pollset_set(chand->lb_policy->interested_parties(), chand->interested_parties); - grpc_lb_policy_shutdown_locked(chand->lb_policy, nullptr); - GRPC_LB_POLICY_UNREF(chand->lb_policy, "channel"); + chand->lb_policy.reset(); } gpr_free(chand->info_lb_policy_name); gpr_free(chand->info_service_config_json); @@ -849,7 +846,7 @@ typedef struct client_channel_call_data { grpc_subchannel_call* subchannel_call; grpc_error* error; - grpc_lb_policy_pick_state pick; + grpc_core::LoadBalancingPolicy::PickState pick; grpc_closure lb_pick_closure; grpc_closure lb_pick_cancel_closure; @@ -1070,15 +1067,14 @@ static void pick_callback_cancel_locked(void* arg, grpc_error* error) { if (error != GRPC_ERROR_NONE && chand->lb_policy != nullptr) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: cancelling pick from LB policy %p", - chand, calld, chand->lb_policy); + chand, calld, chand->lb_policy.get()); } - grpc_lb_policy_cancel_pick_locked(chand->lb_policy, &calld->pick, - GRPC_ERROR_REF(error)); + chand->lb_policy->CancelPickLocked(&calld->pick, GRPC_ERROR_REF(error)); } GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback_cancel"); } -// Callback invoked by grpc_lb_policy_pick_locked() for async picks. +// Callback invoked by LoadBalancingPolicy::PickLocked() for async picks. // Unrefs the LB policy and invokes async_pick_done_locked(). static void pick_callback_done_locked(void* arg, grpc_error* error) { grpc_call_element* elem = static_cast(arg); @@ -1092,15 +1088,14 @@ static void pick_callback_done_locked(void* arg, grpc_error* error) { GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback"); } -// Takes a ref to chand->lb_policy and calls grpc_lb_policy_pick_locked(). -// If the pick was completed synchronously, unrefs the LB policy and -// returns true. +// Starts a pick on chand->lb_policy. +// Returns true if pick is completed synchronously. static bool pick_callback_start_locked(grpc_call_element* elem) { channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: starting pick on lb_policy=%p", - chand, calld, chand->lb_policy); + chand, calld, chand->lb_policy.get()); } apply_service_config_to_call_locked(elem); // If the application explicitly set wait_for_ready, use that. @@ -1130,10 +1125,9 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { grpc_combiner_scheduler(chand->combiner)); calld->pick.on_complete = &calld->lb_pick_closure; GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback"); - const bool pick_done = - grpc_lb_policy_pick_locked(chand->lb_policy, &calld->pick); + const bool pick_done = chand->lb_policy->PickLocked(&calld->pick); if (pick_done) { - /* synchronous grpc_lb_policy_pick call. Unref the LB policy. */ + // Pick completed synchronously. if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: pick completed synchronously", chand, calld); @@ -1498,7 +1492,7 @@ const grpc_channel_filter grpc_client_channel_filter = { static void try_to_connect_locked(void* arg, grpc_error* error_ignored) { channel_data* chand = static_cast(arg); if (chand->lb_policy != nullptr) { - grpc_lb_policy_exit_idle_locked(chand->lb_policy); + chand->lb_policy->ExitIdleLocked(); } else { chand->exit_idle_when_lb_policy_arrives = true; if (!chand->started_resolving && chand->resolver != nullptr) { diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.cc b/src/core/ext/filters/client_channel/client_channel_plugin.cc index 9172fa781c..3c3a97532f 100644 --- a/src/core/ext/filters/client_channel/client_channel_plugin.cc +++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc @@ -63,7 +63,7 @@ static bool set_default_host_if_unset(grpc_channel_stack_builder* builder, } void grpc_client_channel_init(void) { - grpc_lb_policy_registry_init(); + grpc_core::LoadBalancingPolicyRegistry::Builder::InitRegistry(); grpc_core::ResolverRegistry::Builder::InitRegistry(); grpc_retry_throttle_map_init(); grpc_proxy_mapper_registry_init(); @@ -83,5 +83,5 @@ void grpc_client_channel_shutdown(void) { grpc_proxy_mapper_registry_shutdown(); grpc_retry_throttle_map_shutdown(); grpc_core::ResolverRegistry::Builder::ShutdownRegistry(); - grpc_lb_policy_registry_shutdown(); + grpc_core::LoadBalancingPolicyRegistry::Builder::ShutdownRegistry(); } diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc index 27fb2ad1f4..59f4cdafb3 100644 --- a/src/core/ext/filters/client_channel/lb_policy.cc +++ b/src/core/ext/filters/client_channel/lb_policy.cc @@ -22,121 +22,36 @@ grpc_core::DebugOnlyTraceFlag grpc_trace_lb_policy_refcount( false, "lb_policy_refcount"); -void grpc_lb_policy_init(grpc_lb_policy* policy, - const grpc_lb_policy_vtable* vtable, - grpc_combiner* combiner) { - policy->vtable = vtable; - gpr_ref_init(&policy->refs, 1); - policy->interested_parties = grpc_pollset_set_create(); - policy->combiner = GRPC_COMBINER_REF(combiner, "lb_policy"); -} - -#ifndef NDEBUG -void grpc_lb_policy_ref(grpc_lb_policy* lb_policy, const char* file, int line, - const char* reason) { - if (grpc_trace_lb_policy_refcount.enabled()) { - gpr_atm old_refs = gpr_atm_no_barrier_load(&lb_policy->refs.count); - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "LB_POLICY:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", lb_policy, - old_refs, old_refs + 1, reason); - } -#else -void grpc_lb_policy_ref(grpc_lb_policy* lb_policy) { -#endif - gpr_ref(&lb_policy->refs); -} - -#ifndef NDEBUG -void grpc_lb_policy_unref(grpc_lb_policy* lb_policy, const char* file, int line, - const char* reason) { - if (grpc_trace_lb_policy_refcount.enabled()) { - gpr_atm old_refs = gpr_atm_no_barrier_load(&lb_policy->refs.count); - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "LB_POLICY:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", lb_policy, - old_refs, old_refs - 1, reason); - } -#else -void grpc_lb_policy_unref(grpc_lb_policy* lb_policy) { -#endif - if (gpr_unref(&lb_policy->refs)) { - grpc_pollset_set_destroy(lb_policy->interested_parties); - grpc_combiner* combiner = lb_policy->combiner; - lb_policy->vtable->destroy(lb_policy); - GRPC_COMBINER_UNREF(combiner, "lb_policy"); - } -} - -void grpc_lb_policy_shutdown_locked(grpc_lb_policy* policy, - grpc_lb_policy* new_policy) { - policy->vtable->shutdown_locked(policy, new_policy); -} - -int grpc_lb_policy_pick_locked(grpc_lb_policy* policy, - grpc_lb_policy_pick_state* pick) { - return policy->vtable->pick_locked(policy, pick); -} - -void grpc_lb_policy_cancel_pick_locked(grpc_lb_policy* policy, - grpc_lb_policy_pick_state* pick, - grpc_error* error) { - policy->vtable->cancel_pick_locked(policy, pick, error); -} - -void grpc_lb_policy_cancel_picks_locked(grpc_lb_policy* policy, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error) { - policy->vtable->cancel_picks_locked(policy, initial_metadata_flags_mask, - initial_metadata_flags_eq, error); -} +namespace grpc_core { -void grpc_lb_policy_exit_idle_locked(grpc_lb_policy* policy) { - policy->vtable->exit_idle_locked(policy); -} +LoadBalancingPolicy::LoadBalancingPolicy(const Args& args) + : InternallyRefCountedWithTracing(&grpc_trace_lb_policy_refcount), + combiner_(GRPC_COMBINER_REF(args.combiner, "lb_policy")), + client_channel_factory_(args.client_channel_factory), + interested_parties_(grpc_pollset_set_create()), + request_reresolution_(nullptr) {} -void grpc_lb_policy_ping_one_locked(grpc_lb_policy* policy, - grpc_closure* on_initiate, - grpc_closure* on_ack) { - policy->vtable->ping_one_locked(policy, on_initiate, on_ack); +LoadBalancingPolicy::~LoadBalancingPolicy() { + grpc_pollset_set_destroy(interested_parties_); + GRPC_COMBINER_UNREF(combiner_, "lb_policy"); } -void grpc_lb_policy_notify_on_state_change_locked( - grpc_lb_policy* policy, grpc_connectivity_state* state, - grpc_closure* closure) { - policy->vtable->notify_on_state_change_locked(policy, state, closure); -} - -grpc_connectivity_state grpc_lb_policy_check_connectivity_locked( - grpc_lb_policy* policy, grpc_error** connectivity_error) { - return policy->vtable->check_connectivity_locked(policy, connectivity_error); -} - -void grpc_lb_policy_update_locked(grpc_lb_policy* policy, - const grpc_lb_policy_args* lb_policy_args) { - policy->vtable->update_locked(policy, lb_policy_args); -} - -void grpc_lb_policy_set_reresolve_closure_locked( - grpc_lb_policy* policy, grpc_closure* request_reresolution) { - GPR_ASSERT(policy->request_reresolution == nullptr); - policy->request_reresolution = request_reresolution; -} - -void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, - grpc_core::TraceFlag* grpc_lb_trace, - grpc_error* error) { - if (policy->request_reresolution != nullptr) { - GRPC_CLOSURE_SCHED(policy->request_reresolution, error); - policy->request_reresolution = nullptr; +void LoadBalancingPolicy::TryReresolutionLocked( + grpc_core::TraceFlag* grpc_lb_trace, grpc_error* error) { + if (request_reresolution_ != nullptr) { + GRPC_CLOSURE_SCHED(request_reresolution_, error); + request_reresolution_ = nullptr; if (grpc_lb_trace->enabled()) { gpr_log(GPR_DEBUG, "%s %p: scheduling re-resolution closure with error=%s.", - grpc_lb_trace->name(), policy, grpc_error_string(error)); + grpc_lb_trace->name(), this, grpc_error_string(error)); } } else { if (grpc_lb_trace->enabled()) { gpr_log(GPR_DEBUG, "%s %p: no available re-resolution closure.", - grpc_lb_trace->name(), policy); + grpc_lb_trace->name(), this); } } } + +} // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 6edd314d5e..6de652747e 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -19,182 +19,181 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H +#include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/subchannel.h" +#include "src/core/lib/gprpp/abstract.h" +#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/transport/connectivity_state.h" -/** A load balancing policy: specified by a vtable and a struct (which - is expected to be extended to contain some parameters) */ -typedef struct grpc_lb_policy grpc_lb_policy; -typedef struct grpc_lb_policy_vtable grpc_lb_policy_vtable; -typedef struct grpc_lb_policy_args grpc_lb_policy_args; - extern grpc_core::DebugOnlyTraceFlag grpc_trace_lb_policy_refcount; -struct grpc_lb_policy { - const grpc_lb_policy_vtable* vtable; - gpr_refcount refs; - /* owned pointer to interested parties in load balancing decisions */ - grpc_pollset_set* interested_parties; - /* combiner under which lb_policy actions take place */ - grpc_combiner* combiner; - /* callback to force a re-resolution */ - grpc_closure* request_reresolution; -}; - -/// State used for an LB pick. -typedef struct grpc_lb_policy_pick_state { - /// Initial metadata associated with the picking call. - grpc_metadata_batch* initial_metadata; - /// Bitmask used for selective cancelling. See \a - /// grpc_lb_policy_cancel_picks() and \a GRPC_INITIAL_METADATA_* in - /// grpc_types.h. - uint32_t initial_metadata_flags; - /// Storage for LB token in \a initial_metadata, or NULL if not used. - grpc_linked_mdelem lb_token_mdelem_storage; - /// Closure to run when pick is complete, if not completed synchronously. - grpc_closure* on_complete; - /// Will be set to the selected subchannel, or nullptr on failure or when - /// the LB policy decides to drop the call. - grpc_core::RefCountedPtr connected_subchannel; - /// Will be populated with context to pass to the subchannel call, if needed. - grpc_call_context_element subchannel_call_context[GRPC_CONTEXT_COUNT]; - /// Upon success, \a *user_data will be set to whatever opaque information - /// may need to be propagated from the LB policy, or NULL if not needed. - void** user_data; - /// Next pointer. For internal use by LB policy. - struct grpc_lb_policy_pick_state* next; -} grpc_lb_policy_pick_state; - -struct grpc_lb_policy_vtable { - void (*destroy)(grpc_lb_policy* policy); - - /// \see grpc_lb_policy_shutdown_locked(). - void (*shutdown_locked)(grpc_lb_policy* policy, grpc_lb_policy* new_policy); - - /** \see grpc_lb_policy_pick */ - int (*pick_locked)(grpc_lb_policy* policy, grpc_lb_policy_pick_state* pick); - - /** \see grpc_lb_policy_cancel_pick */ - void (*cancel_pick_locked)(grpc_lb_policy* policy, - grpc_lb_policy_pick_state* pick, +namespace grpc_core { + +/// Interface for load balancing policies. +/// +/// Note: All methods with a "Locked" suffix must be called from the +/// combiner passed to the constructor. +/// +/// Any I/O done by the LB policy should be done under the pollset_set +/// returned by \a interested_parties(). +class LoadBalancingPolicy + : public InternallyRefCountedWithTracing { + public: + struct Args { + /// The combiner under which all LB policy calls will be run. + /// Policy does NOT take ownership of the reference to the combiner. + // TODO(roth): Once we have a C++-like interface for combiners, this + // API should change to take a smart pointer that does pass ownership + // of a reference. + grpc_combiner* combiner = nullptr; + /// Used to create channels and subchannels. + grpc_client_channel_factory* client_channel_factory = nullptr; + /// Channel args from the resolver. + /// Note that the LB policy gets the set of addresses from the + /// GRPC_ARG_LB_ADDRESSES channel arg. + grpc_channel_args* args = nullptr; + }; + + /// State used for an LB pick. + struct PickState { + /// Initial metadata associated with the picking call. + grpc_metadata_batch* initial_metadata; + /// Bitmask used for selective cancelling. See + /// \a CancelMatchingPicksLocked() and \a GRPC_INITIAL_METADATA_* in + /// grpc_types.h. + uint32_t initial_metadata_flags; + /// Storage for LB token in \a initial_metadata, or nullptr if not used. + grpc_linked_mdelem lb_token_mdelem_storage; + /// Closure to run when pick is complete, if not completed synchronously. + grpc_closure* on_complete; + /// Will be set to the selected subchannel, or nullptr on failure or when + /// the LB policy decides to drop the call. + RefCountedPtr connected_subchannel; + /// Will be populated with context to pass to the subchannel call, if + /// needed. + grpc_call_context_element subchannel_call_context[GRPC_CONTEXT_COUNT]; + /// Upon success, \a *user_data will be set to whatever opaque information + /// may need to be propagated from the LB policy, or nullptr if not needed. + // TODO(roth): As part of revamping our metadata APIs, try to find a + // way to clean this up and C++-ify it. + void** user_data; + /// Next pointer. For internal use by LB policy. + PickState* next; + }; + + // Not copyable nor movable. + LoadBalancingPolicy(const LoadBalancingPolicy&) = delete; + LoadBalancingPolicy& operator=(const LoadBalancingPolicy&) = delete; + + /// Updates the policy with a new set of \a args from the resolver. + /// Note that the LB policy gets the set of addresses from the + /// GRPC_ARG_LB_ADDRESSES channel arg. + virtual void UpdateLocked(const grpc_channel_args& args) GRPC_ABSTRACT; + + /// Finds an appropriate subchannel for a call, based on data in \a pick. + /// \a pick must remain alive until the pick is complete. + /// + /// If the pick succeeds and a result is known immediately, returns true. + /// Otherwise, \a pick->on_complete will be invoked once the pick is + /// complete with its error argument set to indicate success or failure. + virtual bool PickLocked(PickState* pick) GRPC_ABSTRACT; + + /// Cancels \a pick. + /// The \a on_complete callback of the pending pick will be invoked with + /// \a pick->connected_subchannel set to null. + virtual void CancelPickLocked(PickState* pick, + grpc_error* error) GRPC_ABSTRACT; + + /// Cancels all pending picks for which their \a initial_metadata_flags (as + /// given in the call to \a PickLocked()) matches + /// \a initial_metadata_flags_eq when ANDed with + /// \a initial_metadata_flags_mask. + virtual void CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) GRPC_ABSTRACT; + + /// Requests a notification when the connectivity state of the policy + /// changes from \a *state. When that happens, sets \a *state to the + /// new state and schedules \a closure. + virtual void NotifyOnStateChangeLocked(grpc_connectivity_state* state, + grpc_closure* closure) GRPC_ABSTRACT; + + /// Returns the policy's current connectivity state. Sets \a error to + /// the associated error, if any. + virtual grpc_connectivity_state CheckConnectivityLocked( + grpc_error** connectivity_error) GRPC_ABSTRACT; + + /// Hands off pending picks to \a new_policy. + virtual void HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) + GRPC_ABSTRACT; + + /// Performs a connected subchannel ping via \a ConnectedSubchannel::Ping() + /// against one of the connected subchannels managed by the policy. + /// Note: This is intended only for use in tests. + virtual void PingOneLocked(grpc_closure* on_initiate, + grpc_closure* on_ack) GRPC_ABSTRACT; + + /// Tries to enter a READY connectivity state. + /// TODO(roth): As part of restructuring how we handle IDLE state, + /// consider whether this method is still needed. + virtual void ExitIdleLocked() GRPC_ABSTRACT; + + void Orphan() override { + // Invoke ShutdownAndUnrefLocked() inside of the combiner. + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE(&LoadBalancingPolicy::ShutdownAndUnrefLocked, this, + grpc_combiner_scheduler(combiner_)), + GRPC_ERROR_NONE); + } + + /// Sets the re-resolution closure to \a request_reresolution. + void SetReresolutionClosureLocked(grpc_closure* request_reresolution) { + GPR_ASSERT(request_reresolution_ == nullptr); + request_reresolution_ = request_reresolution; + } + + grpc_pollset_set* interested_parties() const { return interested_parties_; } + + GRPC_ABSTRACT_BASE_CLASS + + protected: + explicit LoadBalancingPolicy(const Args& args); + virtual ~LoadBalancingPolicy(); + + grpc_combiner* combiner() const { return combiner_; } + grpc_client_channel_factory* client_channel_factory() const { + return client_channel_factory_; + } + + /// Shuts down the policy. Any pending picks that have not been + /// handed off to a new policy via HandOffPendingPicksLocked() will be + /// failed. + virtual void ShutdownLocked() GRPC_ABSTRACT; + + /// Tries to request a re-resolution. + void TryReresolutionLocked(grpc_core::TraceFlag* grpc_lb_trace, grpc_error* error); - /** \see grpc_lb_policy_cancel_picks */ - void (*cancel_picks_locked)(grpc_lb_policy* policy, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error); - - /** \see grpc_lb_policy_ping_one */ - void (*ping_one_locked)(grpc_lb_policy* policy, grpc_closure* on_initiate, - grpc_closure* on_ack); - - /** Try to enter a READY connectivity state */ - void (*exit_idle_locked)(grpc_lb_policy* policy); - - /** check the current connectivity of the lb_policy */ - grpc_connectivity_state (*check_connectivity_locked)( - grpc_lb_policy* policy, grpc_error** connectivity_error); - - /** call notify when the connectivity state of a channel changes from *state. - Updates *state with the new state of the policy. Calling with a NULL \a - state cancels the subscription. */ - void (*notify_on_state_change_locked)(grpc_lb_policy* policy, - grpc_connectivity_state* state, - grpc_closure* closure); - - void (*update_locked)(grpc_lb_policy* policy, - const grpc_lb_policy_args* args); + private: + static void ShutdownAndUnrefLocked(void* arg, grpc_error* ignored) { + LoadBalancingPolicy* policy = static_cast(arg); + policy->ShutdownLocked(); + policy->Unref(); + } + + /// Combiner under which LB policy actions take place. + grpc_combiner* combiner_; + /// Client channel factory, used to create channels and subchannels. + grpc_client_channel_factory* client_channel_factory_; + /// Owned pointer to interested parties in load balancing decisions. + grpc_pollset_set* interested_parties_; + /// Callback to force a re-resolution. + grpc_closure* request_reresolution_; }; -#ifndef NDEBUG -#define GRPC_LB_POLICY_REF(p, r) \ - grpc_lb_policy_ref((p), __FILE__, __LINE__, (r)) -#define GRPC_LB_POLICY_UNREF(p, r) \ - grpc_lb_policy_unref((p), __FILE__, __LINE__, (r)) -void grpc_lb_policy_ref(grpc_lb_policy* policy, const char* file, int line, - const char* reason); -void grpc_lb_policy_unref(grpc_lb_policy* policy, const char* file, int line, - const char* reason); -#else // !NDEBUG -#define GRPC_LB_POLICY_REF(p, r) grpc_lb_policy_ref((p)) -#define GRPC_LB_POLICY_UNREF(p, r) grpc_lb_policy_unref((p)) -void grpc_lb_policy_ref(grpc_lb_policy* policy); -void grpc_lb_policy_unref(grpc_lb_policy* policy); -#endif - -/** called by concrete implementations to initialize the base struct */ -void grpc_lb_policy_init(grpc_lb_policy* policy, - const grpc_lb_policy_vtable* vtable, - grpc_combiner* combiner); - -/// Shuts down \a policy. -/// If \a new_policy is non-null, any pending picks will be restarted -/// on that policy; otherwise, they will be failed. -void grpc_lb_policy_shutdown_locked(grpc_lb_policy* policy, - grpc_lb_policy* new_policy); - -/** Finds an appropriate subchannel for a call, based on data in \a pick. - \a pick must remain alive until the pick is complete. - - If the pick succeeds and a result is known immediately, a non-zero - value will be returned. Otherwise, \a pick->on_complete will be invoked - once the pick is complete with its error argument set to indicate - success or failure. - - Any IO should be done under the \a interested_parties \a grpc_pollset_set - in the \a grpc_lb_policy struct. */ -int grpc_lb_policy_pick_locked(grpc_lb_policy* policy, - grpc_lb_policy_pick_state* pick); - -/** Perform a connected subchannel ping (see \a - grpc_core::ConnectedSubchannel::Ping) - against one of the connected subchannels managed by \a policy. */ -void grpc_lb_policy_ping_one_locked(grpc_lb_policy* policy, - grpc_closure* on_initiate, - grpc_closure* on_ack); - -/** Cancel picks for \a pick. - The \a on_complete callback of the pending picks will be invoked with \a - *target set to NULL. */ -void grpc_lb_policy_cancel_pick_locked(grpc_lb_policy* policy, - grpc_lb_policy_pick_state* pick, - grpc_error* error); - -/** Cancel all pending picks for which their \a initial_metadata_flags (as given - in the call to \a grpc_lb_policy_pick) matches \a initial_metadata_flags_eq - when AND'd with \a initial_metadata_flags_mask */ -void grpc_lb_policy_cancel_picks_locked(grpc_lb_policy* policy, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error); - -/** Try to enter a READY connectivity state */ -void grpc_lb_policy_exit_idle_locked(grpc_lb_policy* policy); - -/* Call notify when the connectivity state of a channel changes from \a *state. - * Updates \a *state with the new state of the policy */ -void grpc_lb_policy_notify_on_state_change_locked( - grpc_lb_policy* policy, grpc_connectivity_state* state, - grpc_closure* closure); - -grpc_connectivity_state grpc_lb_policy_check_connectivity_locked( - grpc_lb_policy* policy, grpc_error** connectivity_error); - -/** Update \a policy with \a lb_policy_args. */ -void grpc_lb_policy_update_locked(grpc_lb_policy* policy, - const grpc_lb_policy_args* lb_policy_args); - -/** Set the re-resolution closure to \a request_reresolution. */ -void grpc_lb_policy_set_reresolve_closure_locked( - grpc_lb_policy* policy, grpc_closure* request_reresolution); - -/** Try to request a re-resolution. It's NOT a public API; it's only for use by - the LB policy implementations. */ -void grpc_lb_policy_try_reresolve(grpc_lb_policy* policy, - grpc_core::TraceFlag* grpc_lb_trace, - grpc_error* error); +} // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index da82b3f4da..11163a56dc 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -16,68 +16,48 @@ * */ -/** Implementation of the gRPC LB policy. - * - * This policy takes as input a set of resolved addresses {a1..an} for which the - * LB set was set (it's the resolver's responsibility to ensure this). That is - * to say, {a1..an} represent a collection of LB servers. - * - * An internal channel (\a glb_lb_policy.lb_channel) is created over {a1..an}. - * This channel behaves just like a regular channel. In particular, the - * constructed URI over the addresses a1..an will use the default pick first - * policy to select from this list of LB server backends. - * - * The first time the policy gets a request for a pick, a ping, or to exit the - * idle state, \a query_for_backends_locked() is called. This function sets up - * and initiates the internal communication with the LB server. In particular, - * it's responsible for instantiating the internal *streaming* call to the LB - * server (whichever address from {a1..an} pick-first chose). This call is - * serviced by two callbacks, \a lb_on_server_status_received and \a - * lb_on_response_received. The former will be called when the call to the LB - * server completes. This can happen if the LB server closes the connection or - * if this policy itself cancels the call (for example because it's shutting - * down). If the internal call times out, the usual behavior of pick-first - * applies, continuing to pick from the list {a1..an}. - * - * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a - * res_recv. An invalid one results in the termination of the streaming call. A - * new streaming call should be created if possible, failing the original call - * otherwise. For a valid \a LoadBalancingResponse, the server list of actual - * backends is extracted. A Round Robin policy will be created from this list. - * There are two possible scenarios: - * - * 1. This is the first server list received. There was no previous instance of - * the Round Robin policy. \a rr_handover_locked() will instantiate the RR - * policy and perform all the pending operations over it. - * 2. There's already a RR policy instance active. We need to introduce the new - * one build from the new serverlist, but taking care not to disrupt the - * operations in progress over the old RR instance. This is done by - * decreasing the reference count on the old policy. The moment no more - * references are held on the old RR policy, it'll be destroyed and \a - * on_rr_connectivity_changed notified with a \a GRPC_CHANNEL_SHUTDOWN - * state. At this point we can transition to a new RR instance safely, which - * is done once again via \a rr_handover_locked(). - * - * - * Once a RR policy instance is in place (and getting updated as described), - * calls to for a pick, a ping or a cancellation will be serviced right away by - * forwarding them to the RR instance. Any time there's no RR policy available - * (ie, right after the creation of the gRPCLB policy, if an empty serverlist is - * received, etc), pick/ping requests are added to a list of pending picks/pings - * to be flushed and serviced as part of \a rr_handover_locked() the moment the - * RR policy instance becomes available. - * - * \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the - * high level design and details. */ - -/* TODO(dgq): - * - Implement LB service forwarding (point 2c. in the doc's diagram). - */ +/// Implementation of the gRPC LB policy. +/// +/// This policy takes as input a list of resolved addresses, which must +/// include at least one balancer address. +/// +/// An internal channel (\a lb_channel_) is created for the addresses +/// from that are balancers. This channel behaves just like a regular +/// channel that uses pick_first to select from the list of balancer +/// addresses. +/// +/// The first time the policy gets a request for a pick, a ping, or to exit +/// the idle state, \a StartPickingLocked() is called. This method is +/// responsible for instantiating the internal *streaming* call to the LB +/// server (whichever address pick_first chose). The call will be complete +/// when either the balancer sends status or when we cancel the call (e.g., +/// because we are shutting down). In needed, we retry the call. If we +/// received at least one valid message from the server, a new call attempt +/// will be made immediately; otherwise, we apply back-off delays between +/// attempts. +/// +/// We maintain an internal round_robin policy instance for distributing +/// requests across backends. Whenever we receive a new serverlist from +/// the balancer, we update the round_robin policy with the new list of +/// addresses. If we cannot communicate with the balancer on startup, +/// however, we may enter fallback mode, in which case we will populate +/// the RR policy's addresses from the backend addresses returned by the +/// resolver. +/// +/// Once an RR policy instance is in place (and getting updated as described), +/// calls for a pick, a ping, or a cancellation will be serviced right +/// away by forwarding them to the RR instance. Any time there's no RR +/// policy available (i.e., right after the creation of the gRPCLB policy), +/// pick and ping requests are added to a list of pending picks and pings +/// to be flushed and serviced when the RR policy instance becomes available. +/// +/// \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the +/// high level design and details. -/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when - using that endpoint. Because of various transitive includes in uv.h, - including windows.h on Windows, uv.h must be included before other system - headers. Therefore, sockaddr.h must always be included first */ +// With the addition of a libuv endpoint, sockaddr.h now includes uv.h when +// using that endpoint. Because of various transitive includes in uv.h, +// including windows.h on Windows, uv.h must be included before other system +// headers. Therefore, sockaddr.h must always be included first. #include "src/core/lib/iomgr/sockaddr.h" #include @@ -93,7 +73,6 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" @@ -108,6 +87,8 @@ #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/manual_constructor.h" +#include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/sockaddr.h" @@ -127,336 +108,294 @@ #define GRPC_GRPCLB_RECONNECT_JITTER 0.2 #define GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS 10000 -grpc_core::TraceFlag grpc_lb_glb_trace(false, "glb"); +namespace grpc_core { -struct glb_lb_policy; +TraceFlag grpc_lb_glb_trace(false, "glb"); namespace { -/// Linked list of pending pick requests. It stores all information needed to -/// eventually call (Round Robin's) pick() on them. They mainly stay pending -/// waiting for the RR policy to be created. -/// -/// Note that when a pick is sent to the RR policy, we inject our own -/// on_complete callback, so that we can intercept the result before -/// invoking the original on_complete callback. This allows us to set the -/// LB token metadata and add client_stats to the call context. -/// See \a pending_pick_complete() for details. -struct pending_pick { - // Our on_complete closure and the original one. - grpc_closure on_complete; - grpc_closure* original_on_complete; - // The original pick. - grpc_lb_policy_pick_state* pick; - // Stats for client-side load reporting. Note that this holds a - // reference, which must be either passed on via context or unreffed. - grpc_grpclb_client_stats* client_stats; - // The LB token associated with the pick. This is set via user_data in - // the pick. - grpc_mdelem lb_token; - // The grpclb instance that created the wrapping. This instance is not owned, - // reference counts are untouched. It's used only for logging purposes. - glb_lb_policy* glb_policy; - // Next pending pick. - struct pending_pick* next; -}; +class GrpcLb : public LoadBalancingPolicy { + public: + GrpcLb(const grpc_lb_addresses* addresses, const Args& args); + + void UpdateLocked(const grpc_channel_args& args) override; + bool PickLocked(PickState* pick) override; + void CancelPickLocked(PickState* pick, grpc_error* error) override; + void CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) override; + void NotifyOnStateChangeLocked(grpc_connectivity_state* state, + grpc_closure* closure) override; + grpc_connectivity_state CheckConnectivityLocked( + grpc_error** connectivity_error) override; + void HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) override; + void PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) override; + void ExitIdleLocked() override; + + private: + /// Linked list of pending pick requests. It stores all information needed to + /// eventually call (Round Robin's) pick() on them. They mainly stay pending + /// waiting for the RR policy to be created. + /// + /// Note that when a pick is sent to the RR policy, we inject our own + /// on_complete callback, so that we can intercept the result before + /// invoking the original on_complete callback. This allows us to set the + /// LB token metadata and add client_stats to the call context. + /// See \a pending_pick_complete() for details. + struct PendingPick { + // The grpclb instance that created the wrapping. This instance is not + // owned; reference counts are untouched. It's used only for logging + // purposes. + GrpcLb* grpclb_policy; + // The original pick. + PickState* pick; + // Our on_complete closure and the original one. + grpc_closure on_complete; + grpc_closure* original_on_complete; + // The LB token associated with the pick. This is set via user_data in + // the pick. + grpc_mdelem lb_token; + // Stats for client-side load reporting. Note that this holds a + // reference, which must be either passed on via context or unreffed. + grpc_grpclb_client_stats* client_stats = nullptr; + // Next pending pick. + PendingPick* next = nullptr; + }; + + /// A linked list of pending pings waiting for the RR policy to be created. + struct PendingPing { + grpc_closure* on_initiate; + grpc_closure* on_ack; + PendingPing* next = nullptr; + }; + + /// Contains a call to the LB server and all the data related to the call. + class BalancerCallState + : public InternallyRefCountedWithTracing { + public: + explicit BalancerCallState( + RefCountedPtr parent_grpclb_policy); + + // It's the caller's responsibility to ensure that Orphan() is called from + // inside the combiner. + void Orphan() override; + + void StartQuery(); + + grpc_grpclb_client_stats* client_stats() const { return client_stats_; } + bool seen_initial_response() const { return seen_initial_response_; } + + private: + ~BalancerCallState(); + + GrpcLb* grpclb_policy() const { + return reinterpret_cast(grpclb_policy_.get()); + } -/// A linked list of pending pings waiting for the RR policy to be created. -struct pending_ping { - grpc_closure* on_initiate; - grpc_closure* on_ack; - struct pending_ping* next; + void ScheduleNextClientLoadReportLocked(); + void SendClientLoadReportLocked(); + + static bool LoadReportCountersAreZero(grpc_grpclb_request* request); + + static void MaybeSendClientLoadReportLocked(void* arg, grpc_error* error); + static void ClientLoadReportDoneLocked(void* arg, grpc_error* error); + static void OnInitialRequestSentLocked(void* arg, grpc_error* error); + static void OnBalancerMessageReceivedLocked(void* arg, grpc_error* error); + static void OnBalancerStatusReceivedLocked(void* arg, grpc_error* error); + + // The owning LB policy. + RefCountedPtr grpclb_policy_; + + // The streaming call to the LB server. Always non-NULL. + grpc_call* lb_call_ = nullptr; + + // recv_initial_metadata + grpc_metadata_array lb_initial_metadata_recv_; + + // send_message + grpc_byte_buffer* send_message_payload_ = nullptr; + grpc_closure lb_on_initial_request_sent_; + + // recv_message + grpc_byte_buffer* recv_message_payload_ = nullptr; + grpc_closure lb_on_balancer_message_received_; + bool seen_initial_response_ = false; + + // recv_trailing_metadata + grpc_closure lb_on_balancer_status_received_; + grpc_metadata_array lb_trailing_metadata_recv_; + grpc_status_code lb_call_status_; + grpc_slice lb_call_status_details_; + + // The stats for client-side load reporting associated with this LB call. + // Created after the first serverlist is received. + grpc_grpclb_client_stats* client_stats_ = nullptr; + grpc_millis client_stats_report_interval_ = 0; + grpc_timer client_load_report_timer_; + bool client_load_report_timer_callback_pending_ = false; + bool last_client_load_report_counters_were_zero_ = false; + bool client_load_report_is_due_ = false; + // The closure used for either the load report timer or the callback for + // completion of sending the load report. + grpc_closure client_load_report_closure_; + }; + + ~GrpcLb(); + + void ShutdownLocked() override; + + // Helper function used in ctor and UpdateLocked(). + void ProcessChannelArgsLocked(const grpc_channel_args& args); + + // Methods for dealing with the balancer channel and call. + void StartPickingLocked(); + void StartBalancerCallLocked(); + static void OnFallbackTimerLocked(void* arg, grpc_error* error); + void StartBalancerCallRetryTimerLocked(); + static void OnBalancerCallRetryTimerLocked(void* arg, grpc_error* error); + static void OnBalancerChannelConnectivityChangedLocked(void* arg, + grpc_error* error); + + // Pending pick methods. + static void PendingPickSetMetadataAndContext(PendingPick* pp); + PendingPick* PendingPickCreate(PickState* pick); + void AddPendingPick(PendingPick* pp); + static void OnPendingPickComplete(void* arg, grpc_error* error); + + // Pending ping methods. + void AddPendingPing(grpc_closure* on_initiate, grpc_closure* on_ack); + + // Methods for dealing with the RR policy. + void CreateOrUpdateRoundRobinPolicyLocked(); + grpc_channel_args* CreateRoundRobinPolicyArgsLocked(); + void CreateRoundRobinPolicyLocked(const Args& args); + bool PickFromRoundRobinPolicyLocked(bool force_async, PendingPick* pp); + void UpdateConnectivityStateFromRoundRobinPolicyLocked( + grpc_error* rr_state_error); + static void OnRoundRobinConnectivityChangedLocked(void* arg, + grpc_error* error); + static void OnRoundRobinRequestReresolutionLocked(void* arg, + grpc_error* error); + + // Who the client is trying to communicate with. + const char* server_name_ = nullptr; + + // Current channel args from the resolver. + grpc_channel_args* args_ = nullptr; + + // Internal state. + bool started_picking_ = false; + bool shutting_down_ = false; + grpc_connectivity_state_tracker state_tracker_; + + // The channel for communicating with the LB server. + grpc_channel* lb_channel_ = nullptr; + grpc_connectivity_state lb_channel_connectivity_; + grpc_closure lb_channel_on_connectivity_changed_; + // Are we already watching the LB channel's connectivity? + bool watching_lb_channel_ = false; + // Response generator to inject address updates into lb_channel_. + RefCountedPtr response_generator_; + + // The data associated with the current LB call. It holds a ref to this LB + // policy. It's initialized every time we query for backends. It's reset to + // NULL whenever the current LB call is no longer needed (e.g., the LB policy + // is shutting down, or the LB call has ended). A non-NULL lb_calld_ always + // contains a non-NULL lb_call_. + OrphanablePtr lb_calld_; + // Timeout in milliseconds for the LB call. 0 means no deadline. + int lb_call_timeout_ms_ = 0; + // Balancer call retry state. + BackOff lb_call_backoff_; + bool retry_timer_callback_pending_ = false; + grpc_timer lb_call_retry_timer_; + grpc_closure lb_on_call_retry_; + + // The deserialized response from the balancer. May be nullptr until one + // such response has arrived. + grpc_grpclb_serverlist* serverlist_ = nullptr; + // Index into serverlist for next pick. + // If the server at this index is a drop, we return a drop. + // Otherwise, we delegate to the RR policy. + size_t serverlist_index_ = 0; + + // Timeout in milliseconds for before using fallback backend addresses. + // 0 means not using fallback. + int lb_fallback_timeout_ms_ = 0; + // The backend addresses from the resolver. + grpc_lb_addresses* fallback_backend_addresses_ = nullptr; + // Fallback timer. + bool fallback_timer_callback_pending_ = false; + grpc_timer lb_fallback_timer_; + grpc_closure lb_on_fallback_; + + // Pending picks and pings that are waiting on the RR policy's connectivity. + PendingPick* pending_picks_ = nullptr; + PendingPing* pending_pings_ = nullptr; + + // The RR policy to use for the backends. + OrphanablePtr rr_policy_; + grpc_connectivity_state rr_connectivity_state_; + grpc_closure on_rr_connectivity_changed_; + grpc_closure on_rr_request_reresolution_; }; -} // namespace - -typedef struct glb_lb_call_data { - struct glb_lb_policy* glb_policy; - // TODO(juanlishen): c++ize this struct. - gpr_refcount refs; - - /** The streaming call to the LB server. Always non-NULL. */ - grpc_call* lb_call; - - /** The initial metadata received from the LB server. */ - grpc_metadata_array lb_initial_metadata_recv; - - /** The message sent to the LB server. It's used to query for backends (the - * value may vary if the LB server indicates a redirect) or send client load - * report. */ - grpc_byte_buffer* send_message_payload; - /** The callback after the initial request is sent. */ - grpc_closure lb_on_sent_initial_request; - - /** The response received from the LB server, if any. */ - grpc_byte_buffer* recv_message_payload; - /** The callback to process the response received from the LB server. */ - grpc_closure lb_on_response_received; - bool seen_initial_response; - - /** The callback to process the status received from the LB server, which - * signals the end of the LB call. */ - grpc_closure lb_on_server_status_received; - /** The trailing metadata from the LB server. */ - grpc_metadata_array lb_trailing_metadata_recv; - /** The call status code and details. */ - grpc_status_code lb_call_status; - grpc_slice lb_call_status_details; - - /** The stats for client-side load reporting associated with this LB call. - * Created after the first serverlist is received. */ - grpc_grpclb_client_stats* client_stats; - /** The interval and timer for next client load report. */ - grpc_millis client_stats_report_interval; - grpc_timer client_load_report_timer; - bool client_load_report_timer_callback_pending; - bool last_client_load_report_counters_were_zero; - bool client_load_report_is_due; - /** The closure used for either the load report timer or the callback for - * completion of sending the load report. */ - grpc_closure client_load_report_closure; -} glb_lb_call_data; - -typedef struct glb_lb_policy { - /** Base policy: must be first. */ - grpc_lb_policy base; - - /** Who the client is trying to communicate with. */ - const char* server_name; - - /** Channel related data that will be propagated to the internal RR policy. */ - grpc_client_channel_factory* cc_factory; - grpc_channel_args* args; - - /** Timeout in milliseconds for before using fallback backend addresses. - * 0 means not using fallback. */ - int lb_fallback_timeout_ms; - - /** The channel for communicating with the LB server. */ - grpc_channel* lb_channel; - - /** The data associated with the current LB call. It holds a ref to this LB - * policy. It's initialized every time we query for backends. It's reset to - * NULL whenever the current LB call is no longer needed (e.g., the LB policy - * is shutting down, or the LB call has ended). A non-NULL lb_calld always - * contains a non-NULL lb_call. */ - glb_lb_call_data* lb_calld; - - /** response generator to inject address updates into \a lb_channel */ - grpc_core::RefCountedPtr - response_generator; - - /** the RR policy to use of the backend servers returned by the LB server */ - grpc_lb_policy* rr_policy; - - /** the connectivity state of the embedded RR policy */ - grpc_connectivity_state rr_connectivity_state; - - bool started_picking; - - /** our connectivity state tracker */ - grpc_connectivity_state_tracker state_tracker; - - /** connectivity state of the LB channel */ - grpc_connectivity_state lb_channel_connectivity; - - /** stores the deserialized response from the LB. May be nullptr until one - * such response has arrived. */ - grpc_grpclb_serverlist* serverlist; - - /** Index into serverlist for next pick. - * If the server at this index is a drop, we return a drop. - * Otherwise, we delegate to the RR policy. */ - size_t serverlist_index; - - /** stores the backend addresses from the resolver */ - grpc_lb_addresses* fallback_backend_addresses; - - /** list of picks that are waiting on RR's policy connectivity */ - pending_pick* pending_picks; - - /** list of pings that are waiting on RR's policy connectivity */ - pending_ping* pending_pings; - - bool shutting_down; - - /** are we already watching the LB channel's connectivity? */ - bool watching_lb_channel; - - /** is the callback associated with \a lb_call_retry_timer pending? */ - bool retry_timer_callback_pending; - - /** is the callback associated with \a lb_fallback_timer pending? */ - bool fallback_timer_callback_pending; - - /** called upon changes to the LB channel's connectivity. */ - grpc_closure lb_channel_on_connectivity_changed; - - /** called upon changes to the RR's connectivity. */ - grpc_closure rr_on_connectivity_changed; - - /** called upon reresolution request from the RR policy. */ - grpc_closure rr_on_reresolution_requested; - - /************************************************************/ - /* client data associated with the LB server communication */ - /************************************************************/ - - /** LB call retry backoff state */ - grpc_core::ManualConstructor lb_call_backoff; - - /** timeout in milliseconds for the LB call. 0 means no deadline. */ - int lb_call_timeout_ms; - - /** LB call retry timer */ - grpc_timer lb_call_retry_timer; - /** LB call retry timer callback */ - grpc_closure lb_on_call_retry; - - /** LB fallback timer */ - grpc_timer lb_fallback_timer; - /** LB fallback timer callback */ - grpc_closure lb_on_fallback; -} glb_lb_policy; - -static void glb_lb_call_data_ref(glb_lb_call_data* lb_calld, - const char* reason) { - gpr_ref_non_zero(&lb_calld->refs); - if (grpc_lb_glb_trace.enabled()) { - const gpr_atm count = gpr_atm_acq_load(&lb_calld->refs.count); - gpr_log(GPR_DEBUG, "[%s %p] lb_calld %p REF %lu->%lu (%s)", - grpc_lb_glb_trace.name(), lb_calld->glb_policy, lb_calld, - static_cast(count - 1), - static_cast(count), reason); - } -} +// +// serverlist parsing code +// -static void glb_lb_call_data_unref(glb_lb_call_data* lb_calld, - const char* reason) { - const bool done = gpr_unref(&lb_calld->refs); - if (grpc_lb_glb_trace.enabled()) { - const gpr_atm count = gpr_atm_acq_load(&lb_calld->refs.count); - gpr_log(GPR_DEBUG, "[%s %p] lb_calld %p UNREF %lu->%lu (%s)", - grpc_lb_glb_trace.name(), lb_calld->glb_policy, lb_calld, - static_cast(count + 1), - static_cast(count), reason); - } - if (done) { - GPR_ASSERT(lb_calld->lb_call != nullptr); - grpc_call_unref(lb_calld->lb_call); - grpc_metadata_array_destroy(&lb_calld->lb_initial_metadata_recv); - grpc_metadata_array_destroy(&lb_calld->lb_trailing_metadata_recv); - grpc_byte_buffer_destroy(lb_calld->send_message_payload); - grpc_byte_buffer_destroy(lb_calld->recv_message_payload); - grpc_slice_unref_internal(lb_calld->lb_call_status_details); - if (lb_calld->client_stats != nullptr) { - grpc_grpclb_client_stats_unref(lb_calld->client_stats); - } - GRPC_LB_POLICY_UNREF(&lb_calld->glb_policy->base, "lb_calld"); - gpr_free(lb_calld); - } +// vtable for LB tokens in grpc_lb_addresses +void* lb_token_copy(void* token) { + return token == nullptr + ? nullptr + : (void*)GRPC_MDELEM_REF(grpc_mdelem{(uintptr_t)token}).payload; } - -static void lb_call_data_shutdown(glb_lb_policy* glb_policy) { - GPR_ASSERT(glb_policy->lb_calld != nullptr); - GPR_ASSERT(glb_policy->lb_calld->lb_call != nullptr); - // lb_on_server_status_received will complete the cancellation and clean up. - grpc_call_cancel(glb_policy->lb_calld->lb_call, nullptr); - if (glb_policy->lb_calld->client_load_report_timer_callback_pending) { - grpc_timer_cancel(&glb_policy->lb_calld->client_load_report_timer); +void lb_token_destroy(void* token) { + if (token != nullptr) { + GRPC_MDELEM_UNREF(grpc_mdelem{(uintptr_t)token}); } - glb_policy->lb_calld = nullptr; -} - -/* add lb_token of selected subchannel (address) to the call's initial - * metadata */ -static grpc_error* initial_metadata_add_lb_token( - grpc_metadata_batch* initial_metadata, - grpc_linked_mdelem* lb_token_mdelem_storage, grpc_mdelem lb_token) { - GPR_ASSERT(lb_token_mdelem_storage != nullptr); - GPR_ASSERT(!GRPC_MDISNULL(lb_token)); - return grpc_metadata_batch_add_tail(initial_metadata, lb_token_mdelem_storage, - lb_token); } - -static void destroy_client_stats(void* arg) { - grpc_grpclb_client_stats_unref(static_cast(arg)); +int lb_token_cmp(void* token1, void* token2) { + if (token1 > token2) return 1; + if (token1 < token2) return -1; + return 0; } +const grpc_lb_user_data_vtable lb_token_vtable = { + lb_token_copy, lb_token_destroy, lb_token_cmp}; -static void pending_pick_set_metadata_and_context(pending_pick* pp) { - /* if connected_subchannel is nullptr, no pick has been made by the RR - * policy (e.g., all addresses failed to connect). There won't be any - * user_data/token available */ - if (pp->pick->connected_subchannel != nullptr) { - if (!GRPC_MDISNULL(pp->lb_token)) { - initial_metadata_add_lb_token(pp->pick->initial_metadata, - &pp->pick->lb_token_mdelem_storage, - GRPC_MDELEM_REF(pp->lb_token)); - } else { - gpr_log(GPR_ERROR, - "[grpclb %p] No LB token for connected subchannel pick %p", - pp->glb_policy, pp->pick); - abort(); - } - // Pass on client stats via context. Passes ownership of the reference. - if (pp->client_stats != nullptr) { - pp->pick->subchannel_call_context[GRPC_GRPCLB_CLIENT_STATS].value = - pp->client_stats; - pp->pick->subchannel_call_context[GRPC_GRPCLB_CLIENT_STATS].destroy = - destroy_client_stats; - } - } else { - if (pp->client_stats != nullptr) { - grpc_grpclb_client_stats_unref(pp->client_stats); +// Returns the backend addresses extracted from the given addresses. +grpc_lb_addresses* ExtractBackendAddresses(const grpc_lb_addresses* addresses) { + // First pass: count the number of backend addresses. + size_t num_backends = 0; + for (size_t i = 0; i < addresses->num_addresses; ++i) { + if (!addresses->addresses[i].is_balancer) { + ++num_backends; } } + // Second pass: actually populate the addresses and (empty) LB tokens. + grpc_lb_addresses* backend_addresses = + grpc_lb_addresses_create(num_backends, &lb_token_vtable); + size_t num_copied = 0; + for (size_t i = 0; i < addresses->num_addresses; ++i) { + if (addresses->addresses[i].is_balancer) continue; + const grpc_resolved_address* addr = &addresses->addresses[i].address; + grpc_lb_addresses_set_address(backend_addresses, num_copied, &addr->addr, + addr->len, false /* is_balancer */, + nullptr /* balancer_name */, + (void*)GRPC_MDELEM_LB_TOKEN_EMPTY.payload); + ++num_copied; + } + return backend_addresses; } -/* The \a on_complete closure passed as part of the pick requires keeping a - * reference to its associated round robin instance. We wrap this closure in - * order to unref the round robin instance upon its invocation */ -static void pending_pick_complete(void* arg, grpc_error* error) { - pending_pick* pp = static_cast(arg); - pending_pick_set_metadata_and_context(pp); - GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_REF(error)); - gpr_free(pp); -} - -static pending_pick* pending_pick_create(glb_lb_policy* glb_policy, - grpc_lb_policy_pick_state* pick) { - pending_pick* pp = static_cast(gpr_zalloc(sizeof(*pp))); - pp->pick = pick; - pp->glb_policy = glb_policy; - GRPC_CLOSURE_INIT(&pp->on_complete, pending_pick_complete, pp, - grpc_schedule_on_exec_ctx); - pp->original_on_complete = pick->on_complete; - pp->pick->on_complete = &pp->on_complete; - return pp; -} - -static void pending_pick_add(pending_pick** root, pending_pick* new_pp) { - new_pp->next = *root; - *root = new_pp; -} - -static void pending_ping_add(pending_ping** root, grpc_closure* on_initiate, - grpc_closure* on_ack) { - pending_ping* pping = static_cast(gpr_zalloc(sizeof(*pping))); - pping->on_initiate = on_initiate; - pping->on_ack = on_ack; - pping->next = *root; - *root = pping; -} - -static bool is_server_valid(const grpc_grpclb_server* server, size_t idx, - bool log) { +bool IsServerValid(const grpc_grpclb_server* server, size_t idx, bool log) { if (server->drop) return false; const grpc_grpclb_ip_address* ip = &server->ip_address; if (server->port >> 16 != 0) { if (log) { gpr_log(GPR_ERROR, "Invalid port '%d' at index %lu of serverlist. Ignoring.", - server->port, static_cast(idx)); + server->port, (unsigned long)idx); } return false; } @@ -465,65 +404,43 @@ static bool is_server_valid(const grpc_grpclb_server* server, size_t idx, gpr_log(GPR_ERROR, "Expected IP to be 4 or 16 bytes, got %d at index %lu of " "serverlist. Ignoring", - ip->size, static_cast(idx)); + ip->size, (unsigned long)idx); } return false; } return true; } -/* vtable for LB tokens in grpc_lb_addresses. */ -static void* lb_token_copy(void* token) { - return token == nullptr - ? nullptr - : (void*)GRPC_MDELEM_REF(grpc_mdelem{(uintptr_t)token}).payload; -} -static void lb_token_destroy(void* token) { - if (token != nullptr) { - GRPC_MDELEM_UNREF(grpc_mdelem{(uintptr_t)token}); - } -} -static int lb_token_cmp(void* token1, void* token2) { - if (token1 > token2) return 1; - if (token1 < token2) return -1; - return 0; -} -static const grpc_lb_user_data_vtable lb_token_vtable = { - lb_token_copy, lb_token_destroy, lb_token_cmp}; - -static void parse_server(const grpc_grpclb_server* server, - grpc_resolved_address* addr) { +void ParseServer(const grpc_grpclb_server* server, + grpc_resolved_address* addr) { memset(addr, 0, sizeof(*addr)); if (server->drop) return; - const uint16_t netorder_port = htons(static_cast(server->port)); + const uint16_t netorder_port = htons((uint16_t)server->port); /* the addresses are given in binary format (a in(6)_addr struct) in * server->ip_address.bytes. */ const grpc_grpclb_ip_address* ip = &server->ip_address; if (ip->size == 4) { addr->len = sizeof(struct sockaddr_in); - struct sockaddr_in* addr4 = - reinterpret_cast(&addr->addr); + struct sockaddr_in* addr4 = (struct sockaddr_in*)&addr->addr; addr4->sin_family = AF_INET; memcpy(&addr4->sin_addr, ip->bytes, ip->size); addr4->sin_port = netorder_port; } else if (ip->size == 16) { addr->len = sizeof(struct sockaddr_in6); - struct sockaddr_in6* addr6 = - reinterpret_cast(&addr->addr); + struct sockaddr_in6* addr6 = (struct sockaddr_in6*)&addr->addr; addr6->sin6_family = AF_INET6; memcpy(&addr6->sin6_addr, ip->bytes, ip->size); addr6->sin6_port = netorder_port; } } -/* Returns addresses extracted from \a serverlist. */ -static grpc_lb_addresses* process_serverlist_locked( - const grpc_grpclb_serverlist* serverlist) { +// Returns addresses extracted from \a serverlist. +grpc_lb_addresses* ProcessServerlist(const grpc_grpclb_serverlist* serverlist) { size_t num_valid = 0; /* first pass: count how many are valid in order to allocate the necessary * memory in a single block */ for (size_t i = 0; i < serverlist->num_servers; ++i) { - if (is_server_valid(serverlist->servers[i], i, true)) ++num_valid; + if (IsServerValid(serverlist->servers[i], i, true)) ++num_valid; } grpc_lb_addresses* lb_addresses = grpc_lb_addresses_create(num_valid, &lb_token_vtable); @@ -535,11 +452,11 @@ static grpc_lb_addresses* process_serverlist_locked( size_t addr_idx = 0; for (size_t sl_idx = 0; sl_idx < serverlist->num_servers; ++sl_idx) { const grpc_grpclb_server* server = serverlist->servers[sl_idx]; - if (!is_server_valid(serverlist->servers[sl_idx], sl_idx, false)) continue; + if (!IsServerValid(serverlist->servers[sl_idx], sl_idx, false)) continue; GPR_ASSERT(addr_idx < num_valid); /* address processing */ grpc_resolved_address addr; - parse_server(server, &addr); + ParseServer(server, &addr); /* lb token processing */ void* user_data; if (server->has_load_balance_token) { @@ -570,317 +487,448 @@ static grpc_lb_addresses* process_serverlist_locked( return lb_addresses; } -/* Returns the backend addresses extracted from the given addresses */ -static grpc_lb_addresses* extract_backend_addresses_locked( - const grpc_lb_addresses* addresses) { - /* first pass: count the number of backend addresses */ - size_t num_backends = 0; - for (size_t i = 0; i < addresses->num_addresses; ++i) { - if (!addresses->addresses[i].is_balancer) { - ++num_backends; - } - } - /* second pass: actually populate the addresses and (empty) LB tokens */ - grpc_lb_addresses* backend_addresses = - grpc_lb_addresses_create(num_backends, &lb_token_vtable); - size_t num_copied = 0; - for (size_t i = 0; i < addresses->num_addresses; ++i) { - if (addresses->addresses[i].is_balancer) continue; - const grpc_resolved_address* addr = &addresses->addresses[i].address; - grpc_lb_addresses_set_address(backend_addresses, num_copied, &addr->addr, - addr->len, false /* is_balancer */, - nullptr /* balancer_name */, - (void*)GRPC_MDELEM_LB_TOKEN_EMPTY.payload); - ++num_copied; - } - return backend_addresses; -} - -static void update_lb_connectivity_status_locked(glb_lb_policy* glb_policy, - grpc_error* rr_state_error) { - const grpc_connectivity_state curr_glb_state = - grpc_connectivity_state_check(&glb_policy->state_tracker); - /* The new connectivity status is a function of the previous one and the new - * input coming from the status of the RR policy. - * - * current state (grpclb's) - * | - * v || I | C | R | TF | SD | <- new state (RR's) - * ===++====+=====+=====+======+======+ - * I || I | C | R | [I] | [I] | - * ---++----+-----+-----+------+------+ - * C || I | C | R | [C] | [C] | - * ---++----+-----+-----+------+------+ - * R || I | C | R | [R] | [R] | - * ---++----+-----+-----+------+------+ - * TF || I | C | R | [TF] | [TF] | - * ---++----+-----+-----+------+------+ - * SD || NA | NA | NA | NA | NA | (*) - * ---++----+-----+-----+------+------+ - * - * A [STATE] indicates that the old RR policy is kept. In those cases, STATE - * is the current state of grpclb, which is left untouched. - * - * In summary, if the new state is TRANSIENT_FAILURE or SHUTDOWN, stick to - * the previous RR instance. - * - * Note that the status is never updated to SHUTDOWN as a result of calling - * this function. Only glb_shutdown() has the power to set that state. - * - * (*) This function mustn't be called during shutting down. */ - GPR_ASSERT(curr_glb_state != GRPC_CHANNEL_SHUTDOWN); - switch (glb_policy->rr_connectivity_state) { - case GRPC_CHANNEL_TRANSIENT_FAILURE: - case GRPC_CHANNEL_SHUTDOWN: - GPR_ASSERT(rr_state_error != GRPC_ERROR_NONE); - break; - case GRPC_CHANNEL_IDLE: - case GRPC_CHANNEL_CONNECTING: - case GRPC_CHANNEL_READY: - GPR_ASSERT(rr_state_error == GRPC_ERROR_NONE); - } - if (grpc_lb_glb_trace.enabled()) { - gpr_log( - GPR_INFO, - "[grpclb %p] Setting grpclb's state to %s from new RR policy %p state.", - glb_policy, - grpc_connectivity_state_name(glb_policy->rr_connectivity_state), - glb_policy->rr_policy); - } - grpc_connectivity_state_set(&glb_policy->state_tracker, - glb_policy->rr_connectivity_state, rr_state_error, - "update_lb_connectivity_status_locked"); -} +// +// GrpcLb::BalancerCallState +// -/* Perform a pick over \a glb_policy->rr_policy. Given that a pick can return - * immediately (ignoring its completion callback), we need to perform the - * cleanups this callback would otherwise be responsible for. - * If \a force_async is true, then we will manually schedule the - * completion callback even if the pick is available immediately. */ -static bool pick_from_internal_rr_locked(glb_lb_policy* glb_policy, - bool force_async, pending_pick* pp) { - // Check for drops if we are not using fallback backend addresses. - if (glb_policy->serverlist != nullptr) { - // Look at the index into the serverlist to see if we should drop this call. - grpc_grpclb_server* server = - glb_policy->serverlist->servers[glb_policy->serverlist_index++]; - if (glb_policy->serverlist_index == glb_policy->serverlist->num_servers) { - glb_policy->serverlist_index = 0; // Wrap-around. - } - if (server->drop) { - // Update client load reporting stats to indicate the number of - // dropped calls. Note that we have to do this here instead of in - // the client_load_reporting filter, because we do not create a - // subchannel call (and therefore no client_load_reporting filter) - // for dropped calls. - if (glb_policy->lb_calld != nullptr && - glb_policy->lb_calld->client_stats != nullptr) { - grpc_grpclb_client_stats_add_call_dropped_locked( - server->load_balance_token, glb_policy->lb_calld->client_stats); - } - if (force_async) { - GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_NONE); - gpr_free(pp); - return false; - } - gpr_free(pp); - return true; - } - } - // Set client_stats and user_data. - if (glb_policy->lb_calld != nullptr && - glb_policy->lb_calld->client_stats != nullptr) { - pp->client_stats = - grpc_grpclb_client_stats_ref(glb_policy->lb_calld->client_stats); - } - GPR_ASSERT(pp->pick->user_data == nullptr); - pp->pick->user_data = reinterpret_cast(&pp->lb_token); - // Pick via the RR policy. - bool pick_done = grpc_lb_policy_pick_locked(glb_policy->rr_policy, pp->pick); - if (pick_done) { - pending_pick_set_metadata_and_context(pp); - if (force_async) { - GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_NONE); - pick_done = false; - } - gpr_free(pp); - } - /* else, the pending pick will be registered and taken care of by the - * pending pick list inside the RR policy (glb_policy->rr_policy). - * Eventually, wrapped_on_complete will be called, which will -among other - * things- add the LB token to the call's initial metadata */ - return pick_done; +GrpcLb::BalancerCallState::BalancerCallState( + RefCountedPtr parent_grpclb_policy) + : InternallyRefCountedWithTracing(&grpc_lb_glb_trace), + grpclb_policy_(std::move(parent_grpclb_policy)) { + GPR_ASSERT(grpclb_policy_ != nullptr); + GPR_ASSERT(!grpclb_policy()->shutting_down_); + // Init the LB call. Note that the LB call will progress every time there's + // activity in grpclb_policy_->interested_parties(), which is comprised of + // the polling entities from client_channel. + GPR_ASSERT(grpclb_policy()->server_name_ != nullptr); + GPR_ASSERT(grpclb_policy()->server_name_[0] != '\0'); + grpc_slice host = + grpc_slice_from_copied_string(grpclb_policy()->server_name_); + grpc_millis deadline = + grpclb_policy()->lb_call_timeout_ms_ == 0 + ? GRPC_MILLIS_INF_FUTURE + : ExecCtx::Get()->Now() + grpclb_policy()->lb_call_timeout_ms_; + lb_call_ = grpc_channel_create_pollset_set_call( + grpclb_policy()->lb_channel_, nullptr, GRPC_PROPAGATE_DEFAULTS, + grpclb_policy_->interested_parties(), + GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD, + &host, deadline, nullptr); + grpc_slice_unref_internal(host); + // Init the LB call request payload. + grpc_grpclb_request* request = + grpc_grpclb_request_create(grpclb_policy()->server_name_); + grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); + send_message_payload_ = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_slice_unref_internal(request_payload_slice); + grpc_grpclb_request_destroy(request); + // Init other data associated with the LB call. + grpc_metadata_array_init(&lb_initial_metadata_recv_); + grpc_metadata_array_init(&lb_trailing_metadata_recv_); + GRPC_CLOSURE_INIT(&lb_on_initial_request_sent_, OnInitialRequestSentLocked, + this, grpc_combiner_scheduler(grpclb_policy()->combiner())); + GRPC_CLOSURE_INIT(&lb_on_balancer_message_received_, + OnBalancerMessageReceivedLocked, this, + grpc_combiner_scheduler(grpclb_policy()->combiner())); + GRPC_CLOSURE_INIT(&lb_on_balancer_status_received_, + OnBalancerStatusReceivedLocked, this, + grpc_combiner_scheduler(grpclb_policy()->combiner())); } -static grpc_lb_policy_args* lb_policy_args_create(glb_lb_policy* glb_policy) { - grpc_lb_addresses* addresses; - if (glb_policy->serverlist != nullptr) { - GPR_ASSERT(glb_policy->serverlist->num_servers > 0); - addresses = process_serverlist_locked(glb_policy->serverlist); - } else { - // If rr_handover_locked() is invoked when we haven't received any - // serverlist from the balancer, we use the fallback backends returned by - // the resolver. Note that the fallback backend list may be empty, in which - // case the new round_robin policy will keep the requested picks pending. - GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); - addresses = grpc_lb_addresses_copy(glb_policy->fallback_backend_addresses); +GrpcLb::BalancerCallState::~BalancerCallState() { + GPR_ASSERT(lb_call_ != nullptr); + grpc_call_unref(lb_call_); + grpc_metadata_array_destroy(&lb_initial_metadata_recv_); + grpc_metadata_array_destroy(&lb_trailing_metadata_recv_); + grpc_byte_buffer_destroy(send_message_payload_); + grpc_byte_buffer_destroy(recv_message_payload_); + grpc_slice_unref_internal(lb_call_status_details_); + if (client_stats_ != nullptr) { + grpc_grpclb_client_stats_unref(client_stats_); } - GPR_ASSERT(addresses != nullptr); - grpc_lb_policy_args* args = - static_cast(gpr_zalloc(sizeof(*args))); - args->client_channel_factory = glb_policy->cc_factory; - args->combiner = glb_policy->base.combiner; - // Replace the LB addresses in the channel args that we pass down to - // the subchannel. - static const char* keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; - const grpc_arg arg = grpc_lb_addresses_create_channel_arg(addresses); - args->args = grpc_channel_args_copy_and_add_and_remove( - glb_policy->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg, - 1); - grpc_lb_addresses_destroy(addresses); - return args; } -static void lb_policy_args_destroy(grpc_lb_policy_args* args) { - grpc_channel_args_destroy(args->args); - gpr_free(args); +void GrpcLb::BalancerCallState::Orphan() { + GPR_ASSERT(lb_call_ != nullptr); + // If we are here because grpclb_policy wants to cancel the call, + // lb_on_balancer_status_received_ will complete the cancellation and clean + // up. Otherwise, we are here because grpclb_policy has to orphan a failed + // call, then the following cancellation will be a no-op. + grpc_call_cancel(lb_call_, nullptr); + if (client_load_report_timer_callback_pending_) { + grpc_timer_cancel(&client_load_report_timer_); + } + // Note that the initial ref is hold by lb_on_balancer_status_received_ + // instead of the caller of this function. So the corresponding unref happens + // in lb_on_balancer_status_received_ instead of here. } -static void rr_on_reresolution_requested_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = (glb_lb_policy*)arg; - if (glb_policy->shutting_down || error != GRPC_ERROR_NONE) { - GRPC_LB_POLICY_UNREF(&glb_policy->base, - "rr_on_reresolution_requested_locked"); - return; - } +void GrpcLb::BalancerCallState::StartQuery() { + GPR_ASSERT(lb_call_ != nullptr); if (grpc_lb_glb_trace.enabled()) { - gpr_log( - GPR_DEBUG, - "[grpclb %p] Re-resolution requested from the internal RR policy (%p).", - glb_policy, glb_policy->rr_policy); - } - // If we are talking to a balancer, we expect to get updated addresses form - // the balancer, so we can ignore the re-resolution request from the RR - // policy. Otherwise, handle the re-resolution request using glb's original - // re-resolution closure. - if (glb_policy->lb_calld == nullptr || - !glb_policy->lb_calld->seen_initial_response) { - grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, - GRPC_ERROR_NONE); + gpr_log(GPR_INFO, + "[grpclb %p] Starting LB call (lb_calld: %p, lb_call: %p)", + grpclb_policy_.get(), this, lb_call_); } - // Give back the wrapper closure to the RR policy. - grpc_lb_policy_set_reresolve_closure_locked( - glb_policy->rr_policy, &glb_policy->rr_on_reresolution_requested); + // Create the ops. + grpc_call_error call_error; + grpc_op ops[3]; + memset(ops, 0, sizeof(ops)); + // Op: send initial metadata. + grpc_op* op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + // Op: send request message. + GPR_ASSERT(send_message_payload_ != nullptr); + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = send_message_payload_; + op->flags = 0; + op->reserved = nullptr; + op++; + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + auto self = Ref(DEBUG_LOCATION, "on_initial_request_sent"); + self.release(); + call_error = grpc_call_start_batch_and_execute( + lb_call_, ops, (size_t)(op - ops), &lb_on_initial_request_sent_); + GPR_ASSERT(GRPC_CALL_OK == call_error); + // Op: recv initial metadata. + op = ops; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = + &lb_initial_metadata_recv_; + op->flags = 0; + op->reserved = nullptr; + op++; + // Op: recv response. + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &recv_message_payload_; + op->flags = 0; + op->reserved = nullptr; + op++; + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + self = Ref(DEBUG_LOCATION, "on_message_received"); + self.release(); + call_error = grpc_call_start_batch_and_execute( + lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_message_received_); + GPR_ASSERT(GRPC_CALL_OK == call_error); + // Op: recv server status. + op = ops; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &lb_trailing_metadata_recv_; + op->data.recv_status_on_client.status = &lb_call_status_; + op->data.recv_status_on_client.status_details = &lb_call_status_details_; + op->flags = 0; + op->reserved = nullptr; + op++; + // This callback signals the end of the LB call, so it relies on the initial + // ref instead of a new ref. When it's invoked, it's the initial ref that is + // unreffed. + call_error = grpc_call_start_batch_and_execute( + lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_status_received_); + GPR_ASSERT(GRPC_CALL_OK == call_error); +}; + +void GrpcLb::BalancerCallState::ScheduleNextClientLoadReportLocked() { + const grpc_millis next_client_load_report_time = + ExecCtx::Get()->Now() + client_stats_report_interval_; + GRPC_CLOSURE_INIT(&client_load_report_closure_, + MaybeSendClientLoadReportLocked, this, + grpc_combiner_scheduler(grpclb_policy()->combiner())); + grpc_timer_init(&client_load_report_timer_, next_client_load_report_time, + &client_load_report_closure_); + client_load_report_timer_callback_pending_ = true; } -static void create_rr_locked(glb_lb_policy* glb_policy, - grpc_lb_policy_args* args) { - GPR_ASSERT(glb_policy->rr_policy == nullptr); - grpc_lb_policy* new_rr_policy = grpc_lb_policy_create("round_robin", args); - if (new_rr_policy == nullptr) { - gpr_log(GPR_ERROR, - "[grpclb %p] Failure creating a RoundRobin policy for serverlist " - "update with %" PRIuPTR - " entries. The previous RR instance (%p), if any, will continue to " - "be used. Future updates from the LB will attempt to create new " - "instances.", - glb_policy, glb_policy->serverlist->num_servers, - glb_policy->rr_policy); +void GrpcLb::BalancerCallState::MaybeSendClientLoadReportLocked( + void* arg, grpc_error* error) { + BalancerCallState* lb_calld = reinterpret_cast(arg); + GrpcLb* grpclb_policy = lb_calld->grpclb_policy(); + lb_calld->client_load_report_timer_callback_pending_ = false; + if (error != GRPC_ERROR_NONE || lb_calld != grpclb_policy->lb_calld_.get()) { + lb_calld->Unref(DEBUG_LOCATION, "client_load_report"); return; } - GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_reresolution_requested_locked"); - grpc_lb_policy_set_reresolve_closure_locked( - new_rr_policy, &glb_policy->rr_on_reresolution_requested); - glb_policy->rr_policy = new_rr_policy; - grpc_error* rr_state_error = nullptr; - glb_policy->rr_connectivity_state = grpc_lb_policy_check_connectivity_locked( - glb_policy->rr_policy, &rr_state_error); - /* Connectivity state is a function of the RR policy updated/created */ - update_lb_connectivity_status_locked(glb_policy, rr_state_error); - /* Add the gRPC LB's interested_parties pollset_set to that of the newly - * created RR policy. This will make the RR policy progress upon activity on - * gRPC LB, which in turn is tied to the application's call */ - grpc_pollset_set_add_pollset_set(glb_policy->rr_policy->interested_parties, - glb_policy->base.interested_parties); - /* Subscribe to changes to the connectivity of the new RR */ - GRPC_LB_POLICY_REF(&glb_policy->base, "rr_on_connectivity_changed_locked"); - grpc_lb_policy_notify_on_state_change_locked( - glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->rr_on_connectivity_changed); - grpc_lb_policy_exit_idle_locked(glb_policy->rr_policy); - // Send pending picks to RR policy. - pending_pick* pp; - while ((pp = glb_policy->pending_picks)) { - glb_policy->pending_picks = pp->next; - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Pending pick about to (async) PICK from RR %p", - glb_policy, glb_policy->rr_policy); - } - pick_from_internal_rr_locked(glb_policy, true /* force_async */, pp); + // If we've already sent the initial request, then we can go ahead and send + // the load report. Otherwise, we need to wait until the initial request has + // been sent to send this (see OnInitialRequestSentLocked()). + if (lb_calld->send_message_payload_ == nullptr) { + lb_calld->SendClientLoadReportLocked(); + } else { + lb_calld->client_load_report_is_due_ = true; } - // Send pending pings to RR policy. - pending_ping* pping; - while ((pping = glb_policy->pending_pings)) { - glb_policy->pending_pings = pping->next; - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, "[grpclb %p] Pending ping about to PING from RR %p", - glb_policy, glb_policy->rr_policy); +} + +bool GrpcLb::BalancerCallState::LoadReportCountersAreZero( + grpc_grpclb_request* request) { + grpc_grpclb_dropped_call_counts* drop_entries = + static_cast( + request->client_stats.calls_finished_with_drop.arg); + return request->client_stats.num_calls_started == 0 && + request->client_stats.num_calls_finished == 0 && + request->client_stats.num_calls_finished_with_client_failed_to_send == + 0 && + request->client_stats.num_calls_finished_known_received == 0 && + (drop_entries == nullptr || drop_entries->num_entries == 0); +} + +void GrpcLb::BalancerCallState::SendClientLoadReportLocked() { + // Construct message payload. + GPR_ASSERT(send_message_payload_ == nullptr); + grpc_grpclb_request* request = + grpc_grpclb_load_report_request_create_locked(client_stats_); + // Skip client load report if the counters were all zero in the last + // report and they are still zero in this one. + if (LoadReportCountersAreZero(request)) { + if (last_client_load_report_counters_were_zero_) { + grpc_grpclb_request_destroy(request); + ScheduleNextClientLoadReportLocked(); + return; } - grpc_lb_policy_ping_one_locked(glb_policy->rr_policy, pping->on_initiate, - pping->on_ack); - gpr_free(pping); + last_client_load_report_counters_were_zero_ = true; + } else { + last_client_load_report_counters_were_zero_ = false; + } + grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); + send_message_payload_ = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_slice_unref_internal(request_payload_slice); + grpc_grpclb_request_destroy(request); + // Send the report. + grpc_op op; + memset(&op, 0, sizeof(op)); + op.op = GRPC_OP_SEND_MESSAGE; + op.data.send_message.send_message = send_message_payload_; + GRPC_CLOSURE_INIT(&client_load_report_closure_, ClientLoadReportDoneLocked, + this, grpc_combiner_scheduler(grpclb_policy()->combiner())); + grpc_call_error call_error = grpc_call_start_batch_and_execute( + lb_call_, &op, 1, &client_load_report_closure_); + if (call_error != GRPC_CALL_OK) { + gpr_log(GPR_ERROR, "[grpclb %p] call_error=%d", grpclb_policy_.get(), + call_error); + GPR_ASSERT(GRPC_CALL_OK == call_error); } } -/* glb_policy->rr_policy may be nullptr (initial handover) */ -static void rr_handover_locked(glb_lb_policy* glb_policy) { - if (glb_policy->shutting_down) return; - grpc_lb_policy_args* args = lb_policy_args_create(glb_policy); - GPR_ASSERT(args != nullptr); - if (glb_policy->rr_policy != nullptr) { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_DEBUG, "[grpclb %p] Updating RR policy %p", glb_policy, - glb_policy->rr_policy); +void GrpcLb::BalancerCallState::ClientLoadReportDoneLocked(void* arg, + grpc_error* error) { + BalancerCallState* lb_calld = reinterpret_cast(arg); + GrpcLb* grpclb_policy = lb_calld->grpclb_policy(); + grpc_byte_buffer_destroy(lb_calld->send_message_payload_); + lb_calld->send_message_payload_ = nullptr; + if (error != GRPC_ERROR_NONE || lb_calld != grpclb_policy->lb_calld_.get()) { + lb_calld->Unref(DEBUG_LOCATION, "client_load_report"); + return; + } + lb_calld->ScheduleNextClientLoadReportLocked(); +} + +void GrpcLb::BalancerCallState::OnInitialRequestSentLocked(void* arg, + grpc_error* error) { + BalancerCallState* lb_calld = reinterpret_cast(arg); + grpc_byte_buffer_destroy(lb_calld->send_message_payload_); + lb_calld->send_message_payload_ = nullptr; + // If we attempted to send a client load report before the initial request was + // sent (and this lb_calld is still in use), send the load report now. + if (lb_calld->client_load_report_is_due_ && + lb_calld == lb_calld->grpclb_policy()->lb_calld_.get()) { + lb_calld->SendClientLoadReportLocked(); + lb_calld->client_load_report_is_due_ = false; + } + lb_calld->Unref(DEBUG_LOCATION, "on_initial_request_sent"); +} + +void GrpcLb::BalancerCallState::OnBalancerMessageReceivedLocked( + void* arg, grpc_error* error) { + BalancerCallState* lb_calld = reinterpret_cast(arg); + GrpcLb* grpclb_policy = lb_calld->grpclb_policy(); + // Empty payload means the LB call was cancelled. + if (lb_calld != grpclb_policy->lb_calld_.get() || + lb_calld->recv_message_payload_ == nullptr) { + lb_calld->Unref(DEBUG_LOCATION, "on_message_received"); + return; + } + grpc_byte_buffer_reader bbr; + grpc_byte_buffer_reader_init(&bbr, lb_calld->recv_message_payload_); + grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_byte_buffer_reader_destroy(&bbr); + grpc_byte_buffer_destroy(lb_calld->recv_message_payload_); + lb_calld->recv_message_payload_ = nullptr; + grpc_grpclb_initial_response* initial_response; + grpc_grpclb_serverlist* serverlist; + if (!lb_calld->seen_initial_response_ && + (initial_response = grpc_grpclb_initial_response_parse(response_slice)) != + nullptr) { + // Have NOT seen initial response, look for initial response. + if (initial_response->has_client_stats_report_interval) { + lb_calld->client_stats_report_interval_ = GPR_MAX( + GPR_MS_PER_SEC, grpc_grpclb_duration_to_millis( + &initial_response->client_stats_report_interval)); + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Received initial LB response message; " + "client load reporting interval = %" PRIdPTR " milliseconds", + grpclb_policy, lb_calld->client_stats_report_interval_); + } + } else if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Received initial LB response message; client load " + "reporting NOT enabled", + grpclb_policy); } - grpc_lb_policy_update_locked(glb_policy->rr_policy, args); - } else { - create_rr_locked(glb_policy, args); + grpc_grpclb_initial_response_destroy(initial_response); + lb_calld->seen_initial_response_ = true; + } else if ((serverlist = grpc_grpclb_response_parse_serverlist( + response_slice)) != nullptr) { + // Have seen initial response, look for serverlist. + GPR_ASSERT(lb_calld->lb_call_ != nullptr); if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_DEBUG, "[grpclb %p] Created new RR policy %p", glb_policy, - glb_policy->rr_policy); + gpr_log(GPR_INFO, + "[grpclb %p] Serverlist with %" PRIuPTR " servers received", + grpclb_policy, serverlist->num_servers); + for (size_t i = 0; i < serverlist->num_servers; ++i) { + grpc_resolved_address addr; + ParseServer(serverlist->servers[i], &addr); + char* ipport; + grpc_sockaddr_to_string(&ipport, &addr, false); + gpr_log(GPR_INFO, "[grpclb %p] Serverlist[%" PRIuPTR "]: %s", + grpclb_policy, i, ipport); + gpr_free(ipport); + } + } + /* update serverlist */ + if (serverlist->num_servers > 0) { + // Start sending client load report only after we start using the + // serverlist returned from the current LB call. + if (lb_calld->client_stats_report_interval_ > 0 && + lb_calld->client_stats_ == nullptr) { + lb_calld->client_stats_ = grpc_grpclb_client_stats_create(); + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + auto self = lb_calld->Ref(DEBUG_LOCATION, "client_load_report"); + self.release(); + lb_calld->ScheduleNextClientLoadReportLocked(); + } + if (grpc_grpclb_serverlist_equals(grpclb_policy->serverlist_, + serverlist)) { + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Incoming server list identical to current, " + "ignoring.", + grpclb_policy); + } + grpc_grpclb_destroy_serverlist(serverlist); + } else { /* new serverlist */ + if (grpclb_policy->serverlist_ != nullptr) { + /* dispose of the old serverlist */ + grpc_grpclb_destroy_serverlist(grpclb_policy->serverlist_); + } else { + /* or dispose of the fallback */ + grpc_lb_addresses_destroy(grpclb_policy->fallback_backend_addresses_); + grpclb_policy->fallback_backend_addresses_ = nullptr; + if (grpclb_policy->fallback_timer_callback_pending_) { + grpc_timer_cancel(&grpclb_policy->lb_fallback_timer_); + } + } + // and update the copy in the GrpcLb instance. This + // serverlist instance will be destroyed either upon the next + // update or when the GrpcLb instance is destroyed. + grpclb_policy->serverlist_ = serverlist; + grpclb_policy->serverlist_index_ = 0; + grpclb_policy->CreateOrUpdateRoundRobinPolicyLocked(); + } + } else { + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, "[grpclb %p] Received empty server list, ignoring.", + grpclb_policy); + } + grpc_grpclb_destroy_serverlist(serverlist); } + } else { + // No valid initial response or serverlist found. + gpr_log(GPR_ERROR, + "[grpclb %p] Invalid LB response received: '%s'. Ignoring.", + grpclb_policy, + grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX)); + } + grpc_slice_unref_internal(response_slice); + if (!grpclb_policy->shutting_down_) { + // Keep listening for serverlist updates. + grpc_op op; + memset(&op, 0, sizeof(op)); + op.op = GRPC_OP_RECV_MESSAGE; + op.data.recv_message.recv_message = &lb_calld->recv_message_payload_; + op.flags = 0; + op.reserved = nullptr; + // Reuse the "OnBalancerMessageReceivedLocked" ref taken in StartQuery(). + const grpc_call_error call_error = grpc_call_start_batch_and_execute( + lb_calld->lb_call_, &op, 1, + &lb_calld->lb_on_balancer_message_received_); + GPR_ASSERT(GRPC_CALL_OK == call_error); + } else { + lb_calld->Unref(DEBUG_LOCATION, "on_message_received+grpclb_shutdown"); } - lb_policy_args_destroy(args); } -static void rr_on_connectivity_changed_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = (glb_lb_policy*)arg; - if (glb_policy->shutting_down) { - GRPC_LB_POLICY_UNREF(&glb_policy->base, - "rr_on_connectivity_changed_locked"); - return; +void GrpcLb::BalancerCallState::OnBalancerStatusReceivedLocked( + void* arg, grpc_error* error) { + BalancerCallState* lb_calld = reinterpret_cast(arg); + GrpcLb* grpclb_policy = lb_calld->grpclb_policy(); + GPR_ASSERT(lb_calld->lb_call_ != nullptr); + if (grpc_lb_glb_trace.enabled()) { + char* status_details = + grpc_slice_to_c_string(lb_calld->lb_call_status_details_); + gpr_log(GPR_INFO, + "[grpclb %p] Status from LB server received. Status = %d, details " + "= '%s', (lb_calld: %p, lb_call: %p), error '%s'", + grpclb_policy, lb_calld->lb_call_status_, status_details, lb_calld, + lb_calld->lb_call_, grpc_error_string(error)); + gpr_free(status_details); + } + grpclb_policy->TryReresolutionLocked(&grpc_lb_glb_trace, GRPC_ERROR_NONE); + // If this lb_calld is still in use, this call ended because of a failure so + // we want to retry connecting. Otherwise, we have deliberately ended this + // call and no further action is required. + if (lb_calld == grpclb_policy->lb_calld_.get()) { + grpclb_policy->lb_calld_.reset(); + GPR_ASSERT(!grpclb_policy->shutting_down_); + if (lb_calld->seen_initial_response_) { + // If we lose connection to the LB server, reset the backoff and restart + // the LB call immediately. + grpclb_policy->lb_call_backoff_.Reset(); + grpclb_policy->StartBalancerCallLocked(); + } else { + // If this LB call fails establishing any connection to the LB server, + // retry later. + grpclb_policy->StartBalancerCallRetryTimerLocked(); + } } - update_lb_connectivity_status_locked(glb_policy, GRPC_ERROR_REF(error)); - // Resubscribe. Reuse the "rr_on_connectivity_changed_locked" ref. - grpc_lb_policy_notify_on_state_change_locked( - glb_policy->rr_policy, &glb_policy->rr_connectivity_state, - &glb_policy->rr_on_connectivity_changed); + lb_calld->Unref(DEBUG_LOCATION, "lb_call_ended"); } -static void destroy_balancer_name(void* balancer_name) { - gpr_free(balancer_name); -} +// +// helper code for creating balancer channel +// -static grpc_slice_hash_table_entry targets_info_entry_create( - const char* address, const char* balancer_name) { +// Helper function to construct a target info entry. +grpc_slice_hash_table_entry BalancerEntryCreate(const char* address, + const char* balancer_name) { grpc_slice_hash_table_entry entry; entry.key = grpc_slice_from_copied_string(address); entry.value = gpr_strdup(balancer_name); return entry; } -static int balancer_name_cmp_fn(void* a, void* b) { +// Comparison function used for slice_hash_table vtable. +int BalancerNameCmp(void* a, void* b) { const char* a_str = static_cast(a); const char* b_str = static_cast(b); return strcmp(a_str, b_str); @@ -894,24 +942,22 @@ static int balancer_name_cmp_fn(void* a, void* b) { * - \a response_generator: in order to propagate updates from the resolver * above the grpclb policy. * - \a args: other args inherited from the grpclb policy. */ -static grpc_channel_args* build_lb_channel_args( +grpc_channel_args* BuildBalancerChannelArgs( const grpc_lb_addresses* addresses, - grpc_core::FakeResolverResponseGenerator* response_generator, + FakeResolverResponseGenerator* response_generator, const grpc_channel_args* args) { size_t num_grpclb_addrs = 0; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; } - /* All input addresses come from a resolver that claims they are LB services. - * It's the resolver's responsibility to make sure this policy is only - * instantiated and used in that case. Otherwise, something has gone wrong. */ + // There must be at least one balancer address, or else the + // client_channel would not have chosen this LB policy. GPR_ASSERT(num_grpclb_addrs > 0); grpc_lb_addresses* lb_addresses = grpc_lb_addresses_create(num_grpclb_addrs, nullptr); grpc_slice_hash_table_entry* targets_info_entries = - static_cast( - gpr_zalloc(sizeof(*targets_info_entries) * num_grpclb_addrs)); - + (grpc_slice_hash_table_entry*)gpr_zalloc(sizeof(*targets_info_entries) * + num_grpclb_addrs); size_t lb_addresses_idx = 0; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (!addresses->addresses[i].is_balancer) continue; @@ -922,28 +968,23 @@ static grpc_channel_args* build_lb_channel_args( char* addr_str; GPR_ASSERT(grpc_sockaddr_to_string( &addr_str, &addresses->addresses[i].address, true) > 0); - targets_info_entries[lb_addresses_idx] = targets_info_entry_create( - addr_str, addresses->addresses[i].balancer_name); + targets_info_entries[lb_addresses_idx] = + BalancerEntryCreate(addr_str, addresses->addresses[i].balancer_name); gpr_free(addr_str); - grpc_lb_addresses_set_address( lb_addresses, lb_addresses_idx++, addresses->addresses[i].address.addr, addresses->addresses[i].address.len, false /* is balancer */, addresses->addresses[i].balancer_name, nullptr /* user data */); } GPR_ASSERT(num_grpclb_addrs == lb_addresses_idx); - grpc_slice_hash_table* targets_info = - grpc_slice_hash_table_create(num_grpclb_addrs, targets_info_entries, - destroy_balancer_name, balancer_name_cmp_fn); + grpc_slice_hash_table* targets_info = grpc_slice_hash_table_create( + num_grpclb_addrs, targets_info_entries, gpr_free, BalancerNameCmp); gpr_free(targets_info_entries); - grpc_channel_args* lb_channel_args = grpc_lb_policy_grpclb_build_lb_channel_args(targets_info, response_generator, args); - grpc_arg lb_channel_addresses_arg = grpc_lb_addresses_create_channel_arg(lb_addresses); - grpc_channel_args* result = grpc_channel_args_copy_and_add( lb_channel_args, &lb_channel_addresses_arg, 1); grpc_slice_hash_table_unref(targets_info); @@ -952,121 +993,162 @@ static grpc_channel_args* build_lb_channel_args( return result; } -static void glb_destroy(grpc_lb_policy* pol) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - GPR_ASSERT(glb_policy->pending_picks == nullptr); - GPR_ASSERT(glb_policy->pending_pings == nullptr); - gpr_free((void*)glb_policy->server_name); - grpc_channel_args_destroy(glb_policy->args); - grpc_connectivity_state_destroy(&glb_policy->state_tracker); - if (glb_policy->serverlist != nullptr) { - grpc_grpclb_destroy_serverlist(glb_policy->serverlist); - } - if (glb_policy->fallback_backend_addresses != nullptr) { - grpc_lb_addresses_destroy(glb_policy->fallback_backend_addresses); - } - // TODO(roth): Remove this once the LB policy becomes a C++ object. - glb_policy->response_generator.reset(); +// +// ctor and dtor +// + +GrpcLb::GrpcLb(const grpc_lb_addresses* addresses, + const LoadBalancingPolicy::Args& args) + : LoadBalancingPolicy(args), + response_generator_(MakeRefCounted()), + lb_call_backoff_( + BackOff::Options() + .set_initial_backoff(GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * + 1000) + .set_multiplier(GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER) + .set_jitter(GRPC_GRPCLB_RECONNECT_JITTER) + .set_max_backoff(GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * + 1000)) { + // Initialization. + grpc_subchannel_index_ref(); + GRPC_CLOSURE_INIT(&lb_channel_on_connectivity_changed_, + &GrpcLb::OnBalancerChannelConnectivityChangedLocked, this, + grpc_combiner_scheduler(args.combiner)); + GRPC_CLOSURE_INIT(&on_rr_connectivity_changed_, + &GrpcLb::OnRoundRobinConnectivityChangedLocked, this, + grpc_combiner_scheduler(args.combiner)); + GRPC_CLOSURE_INIT(&on_rr_request_reresolution_, + &GrpcLb::OnRoundRobinRequestReresolutionLocked, this, + grpc_combiner_scheduler(args.combiner)); + grpc_connectivity_state_init(&state_tracker_, GRPC_CHANNEL_IDLE, "grpclb"); + // Record server name. + const grpc_arg* arg = grpc_channel_args_find(args.args, GRPC_ARG_SERVER_URI); + const char* server_uri = grpc_channel_arg_get_string(arg); + GPR_ASSERT(server_uri != nullptr); + grpc_uri* uri = grpc_uri_parse(server_uri, true); + GPR_ASSERT(uri->path[0] != '\0'); + server_name_ = gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path); + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Will use '%s' as the server name for LB request.", + this, server_name_); + } + grpc_uri_destroy(uri); + // Record LB call timeout. + arg = grpc_channel_args_find(args.args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS); + lb_call_timeout_ms_ = grpc_channel_arg_get_integer(arg, {0, 0, INT_MAX}); + // Record fallback timeout. + arg = grpc_channel_args_find(args.args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); + lb_fallback_timeout_ms_ = grpc_channel_arg_get_integer( + arg, {GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS, 0, INT_MAX}); + // Process channel args. + ProcessChannelArgsLocked(*args.args); +} + +GrpcLb::~GrpcLb() { + GPR_ASSERT(pending_picks_ == nullptr); + GPR_ASSERT(pending_pings_ == nullptr); + gpr_free((void*)server_name_); + grpc_channel_args_destroy(args_); + grpc_connectivity_state_destroy(&state_tracker_); + if (serverlist_ != nullptr) { + grpc_grpclb_destroy_serverlist(serverlist_); + } + if (fallback_backend_addresses_ != nullptr) { + grpc_lb_addresses_destroy(fallback_backend_addresses_); + } grpc_subchannel_index_unref(); - gpr_free(glb_policy); } -static void glb_shutdown_locked(grpc_lb_policy* pol, - grpc_lb_policy* new_policy) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); +void GrpcLb::ShutdownLocked() { grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel shutdown"); - glb_policy->shutting_down = true; - if (glb_policy->lb_calld != nullptr) { - lb_call_data_shutdown(glb_policy); - } - if (glb_policy->retry_timer_callback_pending) { - grpc_timer_cancel(&glb_policy->lb_call_retry_timer); - } - if (glb_policy->fallback_timer_callback_pending) { - grpc_timer_cancel(&glb_policy->lb_fallback_timer); - } - if (glb_policy->rr_policy != nullptr) { - grpc_lb_policy_shutdown_locked(glb_policy->rr_policy, nullptr); - GRPC_LB_POLICY_UNREF(glb_policy->rr_policy, "glb_shutdown"); - } - // We destroy the LB channel here because - // glb_lb_channel_on_connectivity_changed_cb needs a valid glb_policy - // instance. Destroying the lb channel in glb_destroy would likely result in - // a callback invocation without a valid glb_policy arg. - if (glb_policy->lb_channel != nullptr) { - grpc_channel_destroy(glb_policy->lb_channel); - glb_policy->lb_channel = nullptr; - } - grpc_connectivity_state_set(&glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, - GRPC_ERROR_REF(error), "glb_shutdown"); - grpc_lb_policy_try_reresolve(pol, &grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); + shutting_down_ = true; + lb_calld_.reset(); + if (retry_timer_callback_pending_) { + grpc_timer_cancel(&lb_call_retry_timer_); + } + if (fallback_timer_callback_pending_) { + grpc_timer_cancel(&lb_fallback_timer_); + } + rr_policy_.reset(); + TryReresolutionLocked(&grpc_lb_glb_trace, GRPC_ERROR_CANCELLED); + // We destroy the LB channel here instead of in our destructor because + // destroying the channel triggers a last callback to + // OnBalancerChannelConnectivityChangedLocked(), and we need to be + // alive when that callback is invoked. + if (lb_channel_ != nullptr) { + grpc_channel_destroy(lb_channel_); + lb_channel_ = nullptr; + } + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_SHUTDOWN, + GRPC_ERROR_REF(error), "grpclb_shutdown"); // Clear pending picks. - pending_pick* pp = glb_policy->pending_picks; - glb_policy->pending_picks = nullptr; - while (pp != nullptr) { - pending_pick* next = pp->next; - if (new_policy != nullptr) { - // Hand pick over to new policy. - if (pp->client_stats != nullptr) { - grpc_grpclb_client_stats_unref(pp->client_stats); - } - pp->pick->on_complete = pp->original_on_complete; - if (grpc_lb_policy_pick_locked(new_policy, pp->pick)) { - // Synchronous return; schedule callback. - GRPC_CLOSURE_SCHED(pp->pick->on_complete, GRPC_ERROR_NONE); - } - gpr_free(pp); - } else { - pp->pick->connected_subchannel.reset(); - GRPC_CLOSURE_SCHED(&pp->on_complete, GRPC_ERROR_REF(error)); - } - pp = next; + PendingPick* pp; + while ((pp = pending_picks_) != nullptr) { + pending_picks_ = pp->next; + pp->pick->connected_subchannel.reset(); + // Note: pp is deleted in this callback. + GRPC_CLOSURE_SCHED(&pp->on_complete, GRPC_ERROR_REF(error)); } // Clear pending pings. - pending_ping* pping = glb_policy->pending_pings; - glb_policy->pending_pings = nullptr; - while (pping != nullptr) { - pending_ping* next = pping->next; + PendingPing* pping; + while ((pping = pending_pings_) != nullptr) { + pending_pings_ = pping->next; GRPC_CLOSURE_SCHED(pping->on_initiate, GRPC_ERROR_REF(error)); GRPC_CLOSURE_SCHED(pping->on_ack, GRPC_ERROR_REF(error)); - gpr_free(pping); - pping = next; + Delete(pping); } GRPC_ERROR_UNREF(error); } +// +// public methods +// + +void GrpcLb::HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) { + PendingPick* pp; + while ((pp = pending_picks_) != nullptr) { + pending_picks_ = pp->next; + pp->pick->on_complete = pp->original_on_complete; + pp->pick->user_data = nullptr; + if (new_policy->PickLocked(pp->pick)) { + // Synchronous return; schedule closure. + GRPC_CLOSURE_SCHED(pp->pick->on_complete, GRPC_ERROR_NONE); + } + Delete(pp); + } +} + // Cancel a specific pending pick. // // A grpclb pick progresses as follows: -// - If there's a Round Robin policy (glb_policy->rr_policy) available, it'll be -// handed over to the RR policy (in create_rr_locked()). From that point -// onwards, it'll be RR's responsibility. For cancellations, that implies the -// pick needs also be cancelled by the RR instance. +// - If there's a Round Robin policy (rr_policy_) available, it'll be +// handed over to the RR policy (in CreateRoundRobinPolicyLocked()). From +// that point onwards, it'll be RR's responsibility. For cancellations, that +// implies the pick needs also be cancelled by the RR instance. // - Otherwise, without an RR instance, picks stay pending at this policy's -// level (grpclb), inside the glb_policy->pending_picks list. To cancel these, -// we invoke the completion closure and set *target to nullptr right here. -static void glb_cancel_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick, - grpc_error* error) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - pending_pick* pp = glb_policy->pending_picks; - glb_policy->pending_picks = nullptr; +// level (grpclb), inside the pending_picks_ list. To cancel these, +// we invoke the completion closure and set the pick's connected +// subchannel to nullptr right here. +void GrpcLb::CancelPickLocked(PickState* pick, grpc_error* error) { + PendingPick* pp = pending_picks_; + pending_picks_ = nullptr; while (pp != nullptr) { - pending_pick* next = pp->next; + PendingPick* next = pp->next; if (pp->pick == pick) { pick->connected_subchannel.reset(); + // Note: pp is deleted in this callback. GRPC_CLOSURE_SCHED(&pp->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Pick Cancelled", &error, 1)); } else { - pp->next = glb_policy->pending_picks; - glb_policy->pending_picks = pp; + pp->next = pending_picks_; + pending_picks_ = pp; } pp = next; } - if (glb_policy->rr_policy != nullptr) { - grpc_lb_policy_cancel_pick_locked(glb_policy->rr_policy, pick, - GRPC_ERROR_REF(error)); + if (rr_policy_ != nullptr) { + rr_policy_->CancelPickLocked(pick, GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); } @@ -1074,863 +1156,710 @@ static void glb_cancel_pick_locked(grpc_lb_policy* pol, // Cancel all pending picks. // // A grpclb pick progresses as follows: -// - If there's a Round Robin policy (glb_policy->rr_policy) available, it'll be -// handed over to the RR policy (in create_rr_locked()). From that point -// onwards, it'll be RR's responsibility. For cancellations, that implies the -// pick needs also be cancelled by the RR instance. +// - If there's a Round Robin policy (rr_policy_) available, it'll be +// handed over to the RR policy (in CreateRoundRobinPolicyLocked()). From +// that point onwards, it'll be RR's responsibility. For cancellations, that +// implies the pick needs also be cancelled by the RR instance. // - Otherwise, without an RR instance, picks stay pending at this policy's -// level (grpclb), inside the glb_policy->pending_picks list. To cancel these, -// we invoke the completion closure and set *target to nullptr right here. -static void glb_cancel_picks_locked(grpc_lb_policy* pol, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - pending_pick* pp = glb_policy->pending_picks; - glb_policy->pending_picks = nullptr; +// level (grpclb), inside the pending_picks_ list. To cancel these, +// we invoke the completion closure and set the pick's connected +// subchannel to nullptr right here. +void GrpcLb::CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) { + PendingPick* pp = pending_picks_; + pending_picks_ = nullptr; while (pp != nullptr) { - pending_pick* next = pp->next; + PendingPick* next = pp->next; if ((pp->pick->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { + // Note: pp is deleted in this callback. GRPC_CLOSURE_SCHED(&pp->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Pick Cancelled", &error, 1)); } else { - pp->next = glb_policy->pending_picks; - glb_policy->pending_picks = pp; + pp->next = pending_picks_; + pending_picks_ = pp; } pp = next; } - if (glb_policy->rr_policy != nullptr) { - grpc_lb_policy_cancel_picks_locked( - glb_policy->rr_policy, initial_metadata_flags_mask, - initial_metadata_flags_eq, GRPC_ERROR_REF(error)); + if (rr_policy_ != nullptr) { + rr_policy_->CancelMatchingPicksLocked(initial_metadata_flags_mask, + initial_metadata_flags_eq, + GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); } -static void lb_on_fallback_timer_locked(void* arg, grpc_error* error); -static void query_for_backends_locked(glb_lb_policy* glb_policy); -static void start_picking_locked(glb_lb_policy* glb_policy) { - /* start a timer to fall back */ - if (glb_policy->lb_fallback_timeout_ms > 0 && - glb_policy->serverlist == nullptr && - !glb_policy->fallback_timer_callback_pending) { - grpc_millis deadline = - grpc_core::ExecCtx::Get()->Now() + glb_policy->lb_fallback_timeout_ms; - GRPC_LB_POLICY_REF(&glb_policy->base, "grpclb_fallback_timer"); - GRPC_CLOSURE_INIT(&glb_policy->lb_on_fallback, lb_on_fallback_timer_locked, - glb_policy, - grpc_combiner_scheduler(glb_policy->base.combiner)); - glb_policy->fallback_timer_callback_pending = true; - grpc_timer_init(&glb_policy->lb_fallback_timer, deadline, - &glb_policy->lb_on_fallback); - } - glb_policy->started_picking = true; - glb_policy->lb_call_backoff->Reset(); - query_for_backends_locked(glb_policy); -} - -static void glb_exit_idle_locked(grpc_lb_policy* pol) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - if (!glb_policy->started_picking) { - start_picking_locked(glb_policy); +void GrpcLb::ExitIdleLocked() { + if (!started_picking_) { + StartPickingLocked(); } } -static int glb_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - pending_pick* pp = pending_pick_create(glb_policy, pick); +bool GrpcLb::PickLocked(PickState* pick) { + PendingPick* pp = PendingPickCreate(pick); bool pick_done = false; - if (glb_policy->rr_policy != nullptr) { + if (rr_policy_ != nullptr) { const grpc_connectivity_state rr_connectivity_state = - grpc_lb_policy_check_connectivity_locked(glb_policy->rr_policy, - nullptr); - // The glb_policy->rr_policy may have transitioned to SHUTDOWN but the - // callback registered to capture this event - // (on_rr_connectivity_changed_locked) may not have been invoked yet. We - // need to make sure we aren't trying to pick from a RR policy instance - // that's in shutdown. + rr_policy_->CheckConnectivityLocked(nullptr); + // The RR policy may have transitioned to SHUTDOWN but the callback + // registered to capture this event (on_rr_connectivity_changed_) may not + // have been invoked yet. We need to make sure we aren't trying to pick + // from an RR policy instance that's in shutdown. if (rr_connectivity_state == GRPC_CHANNEL_SHUTDOWN) { if (grpc_lb_glb_trace.enabled()) { gpr_log(GPR_INFO, "[grpclb %p] NOT picking from from RR %p: RR conn state=%s", - glb_policy, glb_policy->rr_policy, + this, rr_policy_.get(), grpc_connectivity_state_name(rr_connectivity_state)); } - pending_pick_add(&glb_policy->pending_picks, pp); + AddPendingPick(pp); pick_done = false; } else { // RR not in shutdown if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, "[grpclb %p] about to PICK from RR %p", glb_policy, - glb_policy->rr_policy); + gpr_log(GPR_INFO, "[grpclb %p] about to PICK from RR %p", this, + rr_policy_.get()); } - pick_done = - pick_from_internal_rr_locked(glb_policy, false /* force_async */, pp); + pick_done = PickFromRoundRobinPolicyLocked(false /* force_async */, pp); } - } else { // glb_policy->rr_policy == NULL + } else { // rr_policy_ == NULL if (grpc_lb_glb_trace.enabled()) { gpr_log(GPR_DEBUG, "[grpclb %p] No RR policy. Adding to grpclb's pending picks", - glb_policy); + this); } - pending_pick_add(&glb_policy->pending_picks, pp); - if (!glb_policy->started_picking) { - start_picking_locked(glb_policy); + AddPendingPick(pp); + if (!started_picking_) { + StartPickingLocked(); } pick_done = false; } return pick_done; } -static grpc_connectivity_state glb_check_connectivity_locked( - grpc_lb_policy* pol, grpc_error** connectivity_error) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - return grpc_connectivity_state_get(&glb_policy->state_tracker, - connectivity_error); -} - -static void glb_ping_one_locked(grpc_lb_policy* pol, grpc_closure* on_initiate, - grpc_closure* on_ack) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - if (glb_policy->rr_policy) { - grpc_lb_policy_ping_one_locked(glb_policy->rr_policy, on_initiate, on_ack); +void GrpcLb::PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) { + if (rr_policy_ != nullptr) { + rr_policy_->PingOneLocked(on_initiate, on_ack); } else { - pending_ping_add(&glb_policy->pending_pings, on_initiate, on_ack); - if (!glb_policy->started_picking) { - start_picking_locked(glb_policy); + AddPendingPing(on_initiate, on_ack); + if (!started_picking_) { + StartPickingLocked(); } } } -static void glb_notify_on_state_change_locked(grpc_lb_policy* pol, - grpc_connectivity_state* current, - grpc_closure* notify) { - glb_lb_policy* glb_policy = reinterpret_cast(pol); - grpc_connectivity_state_notify_on_state_change(&glb_policy->state_tracker, - current, notify); +grpc_connectivity_state GrpcLb::CheckConnectivityLocked( + grpc_error** connectivity_error) { + return grpc_connectivity_state_get(&state_tracker_, connectivity_error); } -static void lb_call_on_retry_timer_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = static_cast(arg); - glb_policy->retry_timer_callback_pending = false; - if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE && - glb_policy->lb_calld == nullptr) { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, "[grpclb %p] Restarting call to LB server", glb_policy); - } - query_for_backends_locked(glb_policy); - } - GRPC_LB_POLICY_UNREF(&glb_policy->base, "grpclb_retry_timer"); +void GrpcLb::NotifyOnStateChangeLocked(grpc_connectivity_state* current, + grpc_closure* notify) { + grpc_connectivity_state_notify_on_state_change(&state_tracker_, current, + notify); } -static void start_lb_call_retry_timer_locked(glb_lb_policy* glb_policy) { - grpc_millis next_try = glb_policy->lb_call_backoff->NextAttemptTime(); - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_DEBUG, "[grpclb %p] Connection to LB server lost...", - glb_policy); - grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now(); - if (timeout > 0) { - gpr_log(GPR_DEBUG, - "[grpclb %p] ... retry_timer_active in %" PRIuPTR "ms.", - glb_policy, timeout); - } else { - gpr_log(GPR_DEBUG, "[grpclb %p] ... retry_timer_active immediately.", - glb_policy); - } +void GrpcLb::ProcessChannelArgsLocked(const grpc_channel_args& args) { + const grpc_arg* arg = grpc_channel_args_find(&args, GRPC_ARG_LB_ADDRESSES); + if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { + // Ignore this update. + gpr_log( + GPR_ERROR, + "[grpclb %p] No valid LB addresses channel arg in update, ignoring.", + this); + return; } - GRPC_LB_POLICY_REF(&glb_policy->base, "grpclb_retry_timer"); - GRPC_CLOSURE_INIT(&glb_policy->lb_on_call_retry, - lb_call_on_retry_timer_locked, glb_policy, - grpc_combiner_scheduler(glb_policy->base.combiner)); - glb_policy->retry_timer_callback_pending = true; - grpc_timer_init(&glb_policy->lb_call_retry_timer, next_try, - &glb_policy->lb_on_call_retry); -} - -static void maybe_send_client_load_report_locked(void* arg, grpc_error* error); - -static void schedule_next_client_load_report(glb_lb_call_data* lb_calld) { - const grpc_millis next_client_load_report_time = - grpc_core::ExecCtx::Get()->Now() + lb_calld->client_stats_report_interval; - GRPC_CLOSURE_INIT( - &lb_calld->client_load_report_closure, - maybe_send_client_load_report_locked, lb_calld, - grpc_combiner_scheduler(lb_calld->glb_policy->base.combiner)); - grpc_timer_init(&lb_calld->client_load_report_timer, - next_client_load_report_time, - &lb_calld->client_load_report_closure); - lb_calld->client_load_report_timer_callback_pending = true; -} - -static void client_load_report_done_locked(void* arg, grpc_error* error) { - glb_lb_call_data* lb_calld = static_cast(arg); - glb_lb_policy* glb_policy = lb_calld->glb_policy; - grpc_byte_buffer_destroy(lb_calld->send_message_payload); - lb_calld->send_message_payload = nullptr; - if (error != GRPC_ERROR_NONE || lb_calld != glb_policy->lb_calld) { - glb_lb_call_data_unref(lb_calld, "client_load_report"); - return; - } - schedule_next_client_load_report(lb_calld); -} - -static bool load_report_counters_are_zero(grpc_grpclb_request* request) { - grpc_grpclb_dropped_call_counts* drop_entries = - static_cast( - request->client_stats.calls_finished_with_drop.arg); - return request->client_stats.num_calls_started == 0 && - request->client_stats.num_calls_finished == 0 && - request->client_stats.num_calls_finished_with_client_failed_to_send == - 0 && - request->client_stats.num_calls_finished_known_received == 0 && - (drop_entries == nullptr || drop_entries->num_entries == 0); -} - -static void send_client_load_report_locked(glb_lb_call_data* lb_calld) { - glb_lb_policy* glb_policy = lb_calld->glb_policy; - // Construct message payload. - GPR_ASSERT(lb_calld->send_message_payload == nullptr); - grpc_grpclb_request* request = - grpc_grpclb_load_report_request_create_locked(lb_calld->client_stats); - // Skip client load report if the counters were all zero in the last - // report and they are still zero in this one. - if (load_report_counters_are_zero(request)) { - if (lb_calld->last_client_load_report_counters_were_zero) { - grpc_grpclb_request_destroy(request); - schedule_next_client_load_report(lb_calld); - return; - } - lb_calld->last_client_load_report_counters_were_zero = true; - } else { - lb_calld->last_client_load_report_counters_were_zero = false; + const grpc_lb_addresses* addresses = + reinterpret_cast(arg->value.pointer.p); + // Update fallback address list. + if (fallback_backend_addresses_ != nullptr) { + grpc_lb_addresses_destroy(fallback_backend_addresses_); } - grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); - lb_calld->send_message_payload = - grpc_raw_byte_buffer_create(&request_payload_slice, 1); - grpc_slice_unref_internal(request_payload_slice); - grpc_grpclb_request_destroy(request); - // Send the report. - grpc_op op; - memset(&op, 0, sizeof(op)); - op.op = GRPC_OP_SEND_MESSAGE; - op.data.send_message.send_message = lb_calld->send_message_payload; - GRPC_CLOSURE_INIT(&lb_calld->client_load_report_closure, - client_load_report_done_locked, lb_calld, - grpc_combiner_scheduler(glb_policy->base.combiner)); - grpc_call_error call_error = grpc_call_start_batch_and_execute( - lb_calld->lb_call, &op, 1, &lb_calld->client_load_report_closure); - if (call_error != GRPC_CALL_OK) { - gpr_log(GPR_ERROR, "[grpclb %p] call_error=%d", glb_policy, call_error); - GPR_ASSERT(GRPC_CALL_OK == call_error); + fallback_backend_addresses_ = ExtractBackendAddresses(addresses); + // Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args, + // since we use this to trigger the client_load_reporting filter. + static const char* args_to_remove[] = {GRPC_ARG_LB_POLICY_NAME}; + grpc_arg new_arg = grpc_channel_arg_string_create( + (char*)GRPC_ARG_LB_POLICY_NAME, (char*)"grpclb"); + grpc_channel_args_destroy(args_); + args_ = grpc_channel_args_copy_and_add_and_remove( + &args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &new_arg, 1); + // Construct args for balancer channel. + grpc_channel_args* lb_channel_args = + BuildBalancerChannelArgs(addresses, response_generator_.get(), &args); + // Create balancer channel if needed. + if (lb_channel_ == nullptr) { + char* uri_str; + gpr_asprintf(&uri_str, "fake:///%s", server_name_); + lb_channel_ = grpc_lb_policy_grpclb_create_lb_channel( + uri_str, client_channel_factory(), lb_channel_args); + GPR_ASSERT(lb_channel_ != nullptr); + gpr_free(uri_str); } + // Propagate updates to the LB channel (pick_first) through the fake + // resolver. + response_generator_->SetResponse(lb_channel_args); + grpc_channel_args_destroy(lb_channel_args); } -static void maybe_send_client_load_report_locked(void* arg, grpc_error* error) { - glb_lb_call_data* lb_calld = static_cast(arg); - glb_lb_policy* glb_policy = lb_calld->glb_policy; - lb_calld->client_load_report_timer_callback_pending = false; - if (error != GRPC_ERROR_NONE || lb_calld != glb_policy->lb_calld) { - glb_lb_call_data_unref(lb_calld, "client_load_report"); - return; +void GrpcLb::UpdateLocked(const grpc_channel_args& args) { + ProcessChannelArgsLocked(args); + // If fallback is configured and the RR policy already exists, update + // it with the new fallback addresses. + if (lb_fallback_timeout_ms_ > 0 && rr_policy_ != nullptr) { + CreateOrUpdateRoundRobinPolicyLocked(); } - // If we've already sent the initial request, then we can go ahead and send - // the load report. Otherwise, we need to wait until the initial request has - // been sent to send this (see lb_on_sent_initial_request_locked()). - if (lb_calld->send_message_payload == nullptr) { - send_client_load_report_locked(lb_calld); - } else { - lb_calld->client_load_report_is_due = true; + // Start watching the LB channel connectivity for connection, if not + // already doing so. + if (!watching_lb_channel_) { + lb_channel_connectivity_ = grpc_channel_check_connectivity_state( + lb_channel_, true /* try to connect */); + grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element( + grpc_channel_get_channel_stack(lb_channel_)); + GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter); + watching_lb_channel_ = true; + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + auto self = Ref(DEBUG_LOCATION, "watch_lb_channel_connectivity"); + self.release(); + grpc_client_channel_watch_connectivity_state( + client_channel_elem, + grpc_polling_entity_create_from_pollset_set(interested_parties()), + &lb_channel_connectivity_, &lb_channel_on_connectivity_changed_, + nullptr); } } -static void lb_on_sent_initial_request_locked(void* arg, grpc_error* error); -static void lb_on_server_status_received_locked(void* arg, grpc_error* error); -static void lb_on_response_received_locked(void* arg, grpc_error* error); -static glb_lb_call_data* lb_call_data_create_locked(glb_lb_policy* glb_policy) { - GPR_ASSERT(!glb_policy->shutting_down); - // Init the LB call. Note that the LB call will progress every time there's - // activity in glb_policy->base.interested_parties, which is comprised of the - // polling entities from client_channel. - GPR_ASSERT(glb_policy->server_name != nullptr); - GPR_ASSERT(glb_policy->server_name[0] != '\0'); - grpc_slice host = grpc_slice_from_copied_string(glb_policy->server_name); - grpc_millis deadline = - glb_policy->lb_call_timeout_ms == 0 - ? GRPC_MILLIS_INF_FUTURE - : grpc_core::ExecCtx::Get()->Now() + glb_policy->lb_call_timeout_ms; - glb_lb_call_data* lb_calld = - static_cast(gpr_zalloc(sizeof(*lb_calld))); - lb_calld->lb_call = grpc_channel_create_pollset_set_call( - glb_policy->lb_channel, nullptr, GRPC_PROPAGATE_DEFAULTS, - glb_policy->base.interested_parties, - GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD, - &host, deadline, nullptr); - grpc_slice_unref_internal(host); - // Init the LB call request payload. - grpc_grpclb_request* request = - grpc_grpclb_request_create(glb_policy->server_name); - grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); - lb_calld->send_message_payload = - grpc_raw_byte_buffer_create(&request_payload_slice, 1); - grpc_slice_unref_internal(request_payload_slice); - grpc_grpclb_request_destroy(request); - // Init other data associated with the LB call. - lb_calld->glb_policy = glb_policy; - gpr_ref_init(&lb_calld->refs, 1); - grpc_metadata_array_init(&lb_calld->lb_initial_metadata_recv); - grpc_metadata_array_init(&lb_calld->lb_trailing_metadata_recv); - GRPC_CLOSURE_INIT(&lb_calld->lb_on_sent_initial_request, - lb_on_sent_initial_request_locked, lb_calld, - grpc_combiner_scheduler(glb_policy->base.combiner)); - GRPC_CLOSURE_INIT(&lb_calld->lb_on_response_received, - lb_on_response_received_locked, lb_calld, - grpc_combiner_scheduler(glb_policy->base.combiner)); - GRPC_CLOSURE_INIT(&lb_calld->lb_on_server_status_received, - lb_on_server_status_received_locked, lb_calld, - grpc_combiner_scheduler(glb_policy->base.combiner)); - // Hold a ref to the glb_policy. - GRPC_LB_POLICY_REF(&glb_policy->base, "lb_calld"); - return lb_calld; -} +// +// code for balancer channel and call +// -/* - * Auxiliary functions and LB client callbacks. - */ +void GrpcLb::StartPickingLocked() { + // Start a timer to fall back. + if (lb_fallback_timeout_ms_ > 0 && serverlist_ == nullptr && + !fallback_timer_callback_pending_) { + grpc_millis deadline = ExecCtx::Get()->Now() + lb_fallback_timeout_ms_; + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + auto self = Ref(DEBUG_LOCATION, "on_fallback_timer"); + self.release(); + GRPC_CLOSURE_INIT(&lb_on_fallback_, &GrpcLb::OnFallbackTimerLocked, this, + grpc_combiner_scheduler(combiner())); + fallback_timer_callback_pending_ = true; + grpc_timer_init(&lb_fallback_timer_, deadline, &lb_on_fallback_); + } + started_picking_ = true; + StartBalancerCallLocked(); +} -static void query_for_backends_locked(glb_lb_policy* glb_policy) { - GPR_ASSERT(glb_policy->lb_channel != nullptr); - if (glb_policy->shutting_down) return; +void GrpcLb::StartBalancerCallLocked() { + GPR_ASSERT(lb_channel_ != nullptr); + if (shutting_down_) return; // Init the LB call data. - GPR_ASSERT(glb_policy->lb_calld == nullptr); - glb_policy->lb_calld = lb_call_data_create_locked(glb_policy); + GPR_ASSERT(lb_calld_ == nullptr); + lb_calld_ = MakeOrphanable(Ref()); if (grpc_lb_glb_trace.enabled()) { gpr_log(GPR_INFO, - "[grpclb %p] Query for backends (lb_channel: %p, lb_calld: %p, " - "lb_call: %p)", - glb_policy, glb_policy->lb_channel, glb_policy->lb_calld, - glb_policy->lb_calld->lb_call); - } - GPR_ASSERT(glb_policy->lb_calld->lb_call != nullptr); - // Create the ops. - grpc_call_error call_error; - grpc_op ops[3]; - memset(ops, 0, sizeof(ops)); - // Op: send initial metadata. - grpc_op* op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = 0; - op->reserved = nullptr; - op++; - // Op: send request message. - GPR_ASSERT(glb_policy->lb_calld->send_message_payload != nullptr); - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message.send_message = - glb_policy->lb_calld->send_message_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - glb_lb_call_data_ref(glb_policy->lb_calld, - "lb_on_sent_initial_request_locked"); - call_error = grpc_call_start_batch_and_execute( - glb_policy->lb_calld->lb_call, ops, static_cast(op - ops), - &glb_policy->lb_calld->lb_on_sent_initial_request); - GPR_ASSERT(GRPC_CALL_OK == call_error); - // Op: recv initial metadata. - op = ops; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata.recv_initial_metadata = - &glb_policy->lb_calld->lb_initial_metadata_recv; - op->flags = 0; - op->reserved = nullptr; - op++; - // Op: recv response. - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = - &glb_policy->lb_calld->recv_message_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - glb_lb_call_data_ref(glb_policy->lb_calld, "lb_on_response_received_locked"); - call_error = grpc_call_start_batch_and_execute( - glb_policy->lb_calld->lb_call, ops, static_cast(op - ops), - &glb_policy->lb_calld->lb_on_response_received); - GPR_ASSERT(GRPC_CALL_OK == call_error); - // Op: recv server status. - op = ops; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &glb_policy->lb_calld->lb_trailing_metadata_recv; - op->data.recv_status_on_client.status = &glb_policy->lb_calld->lb_call_status; - op->data.recv_status_on_client.status_details = - &glb_policy->lb_calld->lb_call_status_details; - op->flags = 0; - op->reserved = nullptr; - op++; - // This callback signals the end of the LB call, so it relies on the initial - // ref instead of a new ref. When it's invoked, it's the initial ref that is - // unreffed. - call_error = grpc_call_start_batch_and_execute( - glb_policy->lb_calld->lb_call, ops, static_cast(op - ops), - &glb_policy->lb_calld->lb_on_server_status_received); - GPR_ASSERT(GRPC_CALL_OK == call_error); -} - -static void lb_on_sent_initial_request_locked(void* arg, grpc_error* error) { - glb_lb_call_data* lb_calld = static_cast(arg); - grpc_byte_buffer_destroy(lb_calld->send_message_payload); - lb_calld->send_message_payload = nullptr; - // If we attempted to send a client load report before the initial request was - // sent (and this lb_calld is still in use), send the load report now. - if (lb_calld->client_load_report_is_due && - lb_calld == lb_calld->glb_policy->lb_calld) { - send_client_load_report_locked(lb_calld); - lb_calld->client_load_report_is_due = false; + "[grpclb %p] Query for backends (lb_channel: %p, lb_calld: %p)", + this, lb_channel_, lb_calld_.get()); } - glb_lb_call_data_unref(lb_calld, "lb_on_sent_initial_request_locked"); + lb_calld_->StartQuery(); } -static void lb_on_response_received_locked(void* arg, grpc_error* error) { - glb_lb_call_data* lb_calld = static_cast(arg); - glb_lb_policy* glb_policy = lb_calld->glb_policy; - // Empty payload means the LB call was cancelled. - if (lb_calld != glb_policy->lb_calld || - lb_calld->recv_message_payload == nullptr) { - glb_lb_call_data_unref(lb_calld, "lb_on_response_received_locked"); - return; - } - grpc_op ops[2]; - memset(ops, 0, sizeof(ops)); - grpc_op* op = ops; - glb_policy->lb_call_backoff->Reset(); - grpc_byte_buffer_reader bbr; - grpc_byte_buffer_reader_init(&bbr, lb_calld->recv_message_payload); - grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); - grpc_byte_buffer_reader_destroy(&bbr); - grpc_byte_buffer_destroy(lb_calld->recv_message_payload); - lb_calld->recv_message_payload = nullptr; - grpc_grpclb_initial_response* initial_response; - grpc_grpclb_serverlist* serverlist; - if (!lb_calld->seen_initial_response && - (initial_response = grpc_grpclb_initial_response_parse(response_slice)) != - nullptr) { - // Have NOT seen initial response, look for initial response. - if (initial_response->has_client_stats_report_interval) { - lb_calld->client_stats_report_interval = GPR_MAX( - GPR_MS_PER_SEC, grpc_grpclb_duration_to_millis( - &initial_response->client_stats_report_interval)); - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Received initial LB response message; " - "client load reporting interval = %" PRIdPTR " milliseconds", - glb_policy, lb_calld->client_stats_report_interval); - } - } else if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Received initial LB response message; client load " - "reporting NOT enabled", - glb_policy); - } - grpc_grpclb_initial_response_destroy(initial_response); - lb_calld->seen_initial_response = true; - } else if ((serverlist = grpc_grpclb_response_parse_serverlist( - response_slice)) != nullptr) { - // Have seen initial response, look for serverlist. - GPR_ASSERT(lb_calld->lb_call != nullptr); +void GrpcLb::OnFallbackTimerLocked(void* arg, grpc_error* error) { + GrpcLb* grpclb_policy = static_cast(arg); + grpclb_policy->fallback_timer_callback_pending_ = false; + // If we receive a serverlist after the timer fires but before this callback + // actually runs, don't fall back. + if (grpclb_policy->serverlist_ == nullptr && !grpclb_policy->shutting_down_ && + error == GRPC_ERROR_NONE) { if (grpc_lb_glb_trace.enabled()) { gpr_log(GPR_INFO, - "[grpclb %p] Serverlist with %" PRIuPTR " servers received", - glb_policy, serverlist->num_servers); - for (size_t i = 0; i < serverlist->num_servers; ++i) { - grpc_resolved_address addr; - parse_server(serverlist->servers[i], &addr); - char* ipport; - grpc_sockaddr_to_string(&ipport, &addr, false); - gpr_log(GPR_INFO, "[grpclb %p] Serverlist[%" PRIuPTR "]: %s", - glb_policy, i, ipport); - gpr_free(ipport); - } - } - /* update serverlist */ - if (serverlist->num_servers > 0) { - // Start sending client load report only after we start using the - // serverlist returned from the current LB call. - if (lb_calld->client_stats_report_interval > 0 && - lb_calld->client_stats == nullptr) { - lb_calld->client_stats = grpc_grpclb_client_stats_create(); - glb_lb_call_data_ref(lb_calld, "client_load_report"); - schedule_next_client_load_report(lb_calld); - } - if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, serverlist)) { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Incoming server list identical to current, " - "ignoring.", - glb_policy); - } - grpc_grpclb_destroy_serverlist(serverlist); - } else { /* new serverlist */ - if (glb_policy->serverlist != nullptr) { - /* dispose of the old serverlist */ - grpc_grpclb_destroy_serverlist(glb_policy->serverlist); - } else { - /* or dispose of the fallback */ - grpc_lb_addresses_destroy(glb_policy->fallback_backend_addresses); - glb_policy->fallback_backend_addresses = nullptr; - if (glb_policy->fallback_timer_callback_pending) { - grpc_timer_cancel(&glb_policy->lb_fallback_timer); - glb_policy->fallback_timer_callback_pending = false; - } - } - /* and update the copy in the glb_lb_policy instance. This - * serverlist instance will be destroyed either upon the next - * update or in glb_destroy() */ - glb_policy->serverlist = serverlist; - glb_policy->serverlist_index = 0; - rr_handover_locked(glb_policy); - } - } else { - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, "[grpclb %p] Received empty server list, ignoring.", - glb_policy); - } - grpc_grpclb_destroy_serverlist(serverlist); + "[grpclb %p] Falling back to use backends from resolver", + grpclb_policy); } - } else { - // No valid initial response or serverlist found. - gpr_log(GPR_ERROR, - "[grpclb %p] Invalid LB response received: '%s'. Ignoring.", - glb_policy, - grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX)); - } - grpc_slice_unref_internal(response_slice); - if (!glb_policy->shutting_down) { - // Keep listening for serverlist updates. - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &lb_calld->recv_message_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - // Reuse the "lb_on_response_received_locked" ref taken in - // query_for_backends_locked(). - const grpc_call_error call_error = grpc_call_start_batch_and_execute( - lb_calld->lb_call, ops, static_cast(op - ops), - &lb_calld->lb_on_response_received); - GPR_ASSERT(GRPC_CALL_OK == call_error); - } else { - glb_lb_call_data_unref(lb_calld, - "lb_on_response_received_locked+glb_shutdown"); + GPR_ASSERT(grpclb_policy->fallback_backend_addresses_ != nullptr); + grpclb_policy->CreateOrUpdateRoundRobinPolicyLocked(); } + grpclb_policy->Unref(DEBUG_LOCATION, "on_fallback_timer"); } -static void lb_on_server_status_received_locked(void* arg, grpc_error* error) { - glb_lb_call_data* lb_calld = static_cast(arg); - glb_lb_policy* glb_policy = lb_calld->glb_policy; - GPR_ASSERT(lb_calld->lb_call != nullptr); +void GrpcLb::StartBalancerCallRetryTimerLocked() { + grpc_millis next_try = lb_call_backoff_.NextAttemptTime(); if (grpc_lb_glb_trace.enabled()) { - char* status_details = - grpc_slice_to_c_string(lb_calld->lb_call_status_details); - gpr_log(GPR_INFO, - "[grpclb %p] Status from LB server received. Status = %d, details " - "= '%s', (lb_calld: %p, lb_call: %p), error '%s'", - lb_calld->glb_policy, lb_calld->lb_call_status, status_details, - lb_calld, lb_calld->lb_call, grpc_error_string(error)); - gpr_free(status_details); - } - grpc_lb_policy_try_reresolve(&glb_policy->base, &grpc_lb_glb_trace, - GRPC_ERROR_NONE); - // If this lb_calld is still in use, this call ended because of a failure so - // we want to retry connecting. Otherwise, we have deliberately ended this - // call and no further action is required. - if (lb_calld == glb_policy->lb_calld) { - glb_policy->lb_calld = nullptr; - if (lb_calld->client_load_report_timer_callback_pending) { - grpc_timer_cancel(&lb_calld->client_load_report_timer); - } - GPR_ASSERT(!glb_policy->shutting_down); - if (lb_calld->seen_initial_response) { - // If we lose connection to the LB server, reset the backoff and restart - // the LB call immediately. - glb_policy->lb_call_backoff->Reset(); - query_for_backends_locked(glb_policy); + gpr_log(GPR_DEBUG, "[grpclb %p] Connection to LB server lost...", this); + grpc_millis timeout = next_try - ExecCtx::Get()->Now(); + if (timeout > 0) { + gpr_log(GPR_DEBUG, + "[grpclb %p] ... retry_timer_active in %" PRIuPTR "ms.", this, + timeout); } else { - // If this LB call fails establishing any connection to the LB server, - // retry later. - start_lb_call_retry_timer_locked(glb_policy); + gpr_log(GPR_DEBUG, "[grpclb %p] ... retry_timer_active immediately.", + this); } } - glb_lb_call_data_unref(lb_calld, "lb_call_ended"); + // TODO(roth): We currently track this ref manually. Once the + // ClosureRef API is ready, we should pass the RefCountedPtr<> along + // with the callback. + auto self = Ref(DEBUG_LOCATION, "on_balancer_call_retry_timer"); + self.release(); + GRPC_CLOSURE_INIT(&lb_on_call_retry_, &GrpcLb::OnBalancerCallRetryTimerLocked, + this, grpc_combiner_scheduler(combiner())); + retry_timer_callback_pending_ = true; + grpc_timer_init(&lb_call_retry_timer_, next_try, &lb_on_call_retry_); } -static void lb_on_fallback_timer_locked(void* arg, grpc_error* error) { - glb_lb_policy* glb_policy = static_cast(arg); - glb_policy->fallback_timer_callback_pending = false; - /* If we receive a serverlist after the timer fires but before this callback - * actually runs, don't fall back. */ - if (glb_policy->serverlist == nullptr && !glb_policy->shutting_down && - error == GRPC_ERROR_NONE) { +void GrpcLb::OnBalancerCallRetryTimerLocked(void* arg, grpc_error* error) { + GrpcLb* grpclb_policy = reinterpret_cast(arg); + grpclb_policy->retry_timer_callback_pending_ = false; + if (!grpclb_policy->shutting_down_ && error == GRPC_ERROR_NONE && + grpclb_policy->lb_calld_ == nullptr) { if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Falling back to use backends from resolver", - glb_policy); + gpr_log(GPR_INFO, "[grpclb %p] Restarting call to LB server", + grpclb_policy); } - GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); - rr_handover_locked(glb_policy); - } - GRPC_LB_POLICY_UNREF(&glb_policy->base, "grpclb_fallback_timer"); -} - -static void fallback_update_locked(glb_lb_policy* glb_policy, - const grpc_lb_addresses* addresses) { - GPR_ASSERT(glb_policy->fallback_backend_addresses != nullptr); - grpc_lb_addresses_destroy(glb_policy->fallback_backend_addresses); - glb_policy->fallback_backend_addresses = - extract_backend_addresses_locked(addresses); - if (glb_policy->lb_fallback_timeout_ms > 0 && - glb_policy->rr_policy != nullptr) { - rr_handover_locked(glb_policy); - } -} - -static void glb_update_locked(grpc_lb_policy* policy, - const grpc_lb_policy_args* args) { - glb_lb_policy* glb_policy = reinterpret_cast(policy); - const grpc_arg* arg = - grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); - if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { - if (glb_policy->lb_channel == nullptr) { - // If we don't have a current channel to the LB, go into TRANSIENT - // FAILURE. - grpc_connectivity_state_set( - &glb_policy->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Missing update in args"), - "glb_update_missing"); - } else { - // otherwise, keep using the current LB channel (ignore this update). - gpr_log( - GPR_ERROR, - "[grpclb %p] No valid LB addresses channel arg in update, ignoring.", - glb_policy); - } - return; - } - const grpc_lb_addresses* addresses = - static_cast(arg->value.pointer.p); - // If a non-empty serverlist hasn't been received from the balancer, - // propagate the update to fallback_backend_addresses. - if (glb_policy->serverlist == nullptr) { - fallback_update_locked(glb_policy, addresses); - } - GPR_ASSERT(glb_policy->lb_channel != nullptr); - // Propagate updates to the LB channel (pick_first) through the fake - // resolver. - grpc_channel_args* lb_channel_args = build_lb_channel_args( - addresses, glb_policy->response_generator.get(), args->args); - glb_policy->response_generator->SetResponse(lb_channel_args); - grpc_channel_args_destroy(lb_channel_args); - // Start watching the LB channel connectivity for connection, if not - // already doing so. - if (!glb_policy->watching_lb_channel) { - glb_policy->lb_channel_connectivity = grpc_channel_check_connectivity_state( - glb_policy->lb_channel, true /* try to connect */); - grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element( - grpc_channel_get_channel_stack(glb_policy->lb_channel)); - GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter); - glb_policy->watching_lb_channel = true; - GRPC_LB_POLICY_REF(&glb_policy->base, "watch_lb_channel_connectivity"); - grpc_client_channel_watch_connectivity_state( - client_channel_elem, - grpc_polling_entity_create_from_pollset_set( - glb_policy->base.interested_parties), - &glb_policy->lb_channel_connectivity, - &glb_policy->lb_channel_on_connectivity_changed, nullptr); + grpclb_policy->StartBalancerCallLocked(); } + grpclb_policy->Unref(DEBUG_LOCATION, "on_balancer_call_retry_timer"); } // Invoked as part of the update process. It continues watching the LB channel // until it shuts down or becomes READY. It's invoked even if the LB channel // stayed READY throughout the update (for example if the update is identical). -static void glb_lb_channel_on_connectivity_changed_cb(void* arg, - grpc_error* error) { - glb_lb_policy* glb_policy = static_cast(arg); - if (glb_policy->shutting_down) goto done; +void GrpcLb::OnBalancerChannelConnectivityChangedLocked(void* arg, + grpc_error* error) { + GrpcLb* grpclb_policy = static_cast(arg); + if (grpclb_policy->shutting_down_) goto done; // Re-initialize the lb_call. This should also take care of updating the // embedded RR policy. Note that the current RR policy, if any, will stay in // effect until an update from the new lb_call is received. - switch (glb_policy->lb_channel_connectivity) { + switch (grpclb_policy->lb_channel_connectivity_) { case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_TRANSIENT_FAILURE: { // Keep watching the LB channel. grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element( - grpc_channel_get_channel_stack(glb_policy->lb_channel)); + grpc_channel_get_channel_stack(grpclb_policy->lb_channel_)); GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter); grpc_client_channel_watch_connectivity_state( client_channel_elem, grpc_polling_entity_create_from_pollset_set( - glb_policy->base.interested_parties), - &glb_policy->lb_channel_connectivity, - &glb_policy->lb_channel_on_connectivity_changed, nullptr); + grpclb_policy->interested_parties()), + &grpclb_policy->lb_channel_connectivity_, + &grpclb_policy->lb_channel_on_connectivity_changed_, nullptr); break; } // The LB channel may be IDLE because it's shut down before the update. // Restart the LB call to kick the LB channel into gear. case GRPC_CHANNEL_IDLE: case GRPC_CHANNEL_READY: - if (glb_policy->lb_calld != nullptr) { - lb_call_data_shutdown(glb_policy); - } - if (glb_policy->started_picking) { - if (glb_policy->retry_timer_callback_pending) { - grpc_timer_cancel(&glb_policy->lb_call_retry_timer); + grpclb_policy->lb_calld_.reset(); + if (grpclb_policy->started_picking_) { + if (grpclb_policy->retry_timer_callback_pending_) { + grpc_timer_cancel(&grpclb_policy->lb_call_retry_timer_); } - glb_policy->lb_call_backoff->Reset(); - query_for_backends_locked(glb_policy); + grpclb_policy->lb_call_backoff_.Reset(); + grpclb_policy->StartBalancerCallLocked(); } // Fall through. case GRPC_CHANNEL_SHUTDOWN: done: - glb_policy->watching_lb_channel = false; - GRPC_LB_POLICY_UNREF(&glb_policy->base, + grpclb_policy->watching_lb_channel_ = false; + grpclb_policy->Unref(DEBUG_LOCATION, "watch_lb_channel_connectivity_cb_shutdown"); } } -/* Code wiring the policy with the rest of the core */ -static const grpc_lb_policy_vtable glb_lb_policy_vtable = { - glb_destroy, - glb_shutdown_locked, - glb_pick_locked, - glb_cancel_pick_locked, - glb_cancel_picks_locked, - glb_ping_one_locked, - glb_exit_idle_locked, - glb_check_connectivity_locked, - glb_notify_on_state_change_locked, - glb_update_locked}; - -static grpc_lb_policy* glb_create(grpc_lb_policy_factory* factory, - grpc_lb_policy_args* args) { - /* Count the number of gRPC-LB addresses. There must be at least one. */ - const grpc_arg* arg = - grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); - if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { - return nullptr; +// +// PendingPick +// + +// Adds lb_token of selected subchannel (address) to the call's initial +// metadata. +grpc_error* AddLbTokenToInitialMetadata( + grpc_mdelem lb_token, grpc_linked_mdelem* lb_token_mdelem_storage, + grpc_metadata_batch* initial_metadata) { + GPR_ASSERT(lb_token_mdelem_storage != nullptr); + GPR_ASSERT(!GRPC_MDISNULL(lb_token)); + return grpc_metadata_batch_add_tail(initial_metadata, lb_token_mdelem_storage, + lb_token); +} + +// Destroy function used when embedding client stats in call context. +void DestroyClientStats(void* arg) { + grpc_grpclb_client_stats_unref( + reinterpret_cast(arg)); +} + +void GrpcLb::PendingPickSetMetadataAndContext(PendingPick* pp) { + /* if connected_subchannel is nullptr, no pick has been made by the RR + * policy (e.g., all addresses failed to connect). There won't be any + * user_data/token available */ + if (pp->pick->connected_subchannel != nullptr) { + if (!GRPC_MDISNULL(pp->lb_token)) { + AddLbTokenToInitialMetadata(GRPC_MDELEM_REF(pp->lb_token), + &pp->pick->lb_token_mdelem_storage, + pp->pick->initial_metadata); + } else { + gpr_log(GPR_ERROR, + "[grpclb %p] No LB token for connected subchannel pick %p", + pp->grpclb_policy, pp->pick); + abort(); + } + // Pass on client stats via context. Passes ownership of the reference. + if (pp->client_stats != nullptr) { + pp->pick->subchannel_call_context[GRPC_GRPCLB_CLIENT_STATS].value = + pp->client_stats; + pp->pick->subchannel_call_context[GRPC_GRPCLB_CLIENT_STATS].destroy = + DestroyClientStats; + } + } else { + if (pp->client_stats != nullptr) { + grpc_grpclb_client_stats_unref(pp->client_stats); + } } - grpc_lb_addresses* addresses = - static_cast(arg->value.pointer.p); - size_t num_grpclb_addrs = 0; - for (size_t i = 0; i < addresses->num_addresses; ++i) { - if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; +} + +/* The \a on_complete closure passed as part of the pick requires keeping a + * reference to its associated round robin instance. We wrap this closure in + * order to unref the round robin instance upon its invocation */ +void GrpcLb::OnPendingPickComplete(void* arg, grpc_error* error) { + PendingPick* pp = reinterpret_cast(arg); + PendingPickSetMetadataAndContext(pp); + GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_REF(error)); + Delete(pp); +} + +GrpcLb::PendingPick* GrpcLb::PendingPickCreate(PickState* pick) { + PendingPick* pp = New(); + pp->grpclb_policy = this; + pp->pick = pick; + GRPC_CLOSURE_INIT(&pp->on_complete, &GrpcLb::OnPendingPickComplete, pp, + grpc_schedule_on_exec_ctx); + pp->original_on_complete = pick->on_complete; + pick->on_complete = &pp->on_complete; + return pp; +} + +void GrpcLb::AddPendingPick(PendingPick* pp) { + pp->next = pending_picks_; + pending_picks_ = pp; +} + +// +// PendingPing +// + +void GrpcLb::AddPendingPing(grpc_closure* on_initiate, grpc_closure* on_ack) { + PendingPing* pping = New(); + pping->on_initiate = on_initiate; + pping->on_ack = on_ack; + pping->next = pending_pings_; + pending_pings_ = pping; +} + +// +// code for interacting with the RR policy +// + +// Performs a pick over \a rr_policy_. Given that a pick can return +// immediately (ignoring its completion callback), we need to perform the +// cleanups this callback would otherwise be responsible for. +// If \a force_async is true, then we will manually schedule the +// completion callback even if the pick is available immediately. +bool GrpcLb::PickFromRoundRobinPolicyLocked(bool force_async, PendingPick* pp) { + // Check for drops if we are not using fallback backend addresses. + if (serverlist_ != nullptr) { + // Look at the index into the serverlist to see if we should drop this call. + grpc_grpclb_server* server = serverlist_->servers[serverlist_index_++]; + if (serverlist_index_ == serverlist_->num_servers) { + serverlist_index_ = 0; // Wrap-around. + } + if (server->drop) { + // Update client load reporting stats to indicate the number of + // dropped calls. Note that we have to do this here instead of in + // the client_load_reporting filter, because we do not create a + // subchannel call (and therefore no client_load_reporting filter) + // for dropped calls. + if (lb_calld_ != nullptr && lb_calld_->client_stats() != nullptr) { + grpc_grpclb_client_stats_add_call_dropped_locked( + server->load_balance_token, lb_calld_->client_stats()); + } + if (force_async) { + GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_NONE); + Delete(pp); + return false; + } + Delete(pp); + return true; + } + } + // Set client_stats and user_data. + if (lb_calld_ != nullptr && lb_calld_->client_stats() != nullptr) { + pp->client_stats = grpc_grpclb_client_stats_ref(lb_calld_->client_stats()); + } + GPR_ASSERT(pp->pick->user_data == nullptr); + pp->pick->user_data = (void**)&pp->lb_token; + // Pick via the RR policy. + bool pick_done = rr_policy_->PickLocked(pp->pick); + if (pick_done) { + PendingPickSetMetadataAndContext(pp); + if (force_async) { + GRPC_CLOSURE_SCHED(pp->original_on_complete, GRPC_ERROR_NONE); + pick_done = false; + } + Delete(pp); } - if (num_grpclb_addrs == 0) return nullptr; + // else, the pending pick will be registered and taken care of by the + // pending pick list inside the RR policy. Eventually, + // OnPendingPickComplete() will be called, which will (among other + // things) add the LB token to the call's initial metadata. + return pick_done; +} - glb_lb_policy* glb_policy = - static_cast(gpr_zalloc(sizeof(*glb_policy))); +void GrpcLb::CreateRoundRobinPolicyLocked(const Args& args) { + GPR_ASSERT(rr_policy_ == nullptr); + rr_policy_ = LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy( + "round_robin", args); + if (rr_policy_ == nullptr) { + gpr_log(GPR_ERROR, "[grpclb %p] Failure creating a RoundRobin policy", + this); + return; + } + // TODO(roth): We currently track this ref manually. Once the new + // ClosureRef API is done, pass the RefCountedPtr<> along with the closure. + auto self = Ref(DEBUG_LOCATION, "on_rr_reresolution_requested"); + self.release(); + rr_policy_->SetReresolutionClosureLocked(&on_rr_request_reresolution_); + grpc_error* rr_state_error = nullptr; + rr_connectivity_state_ = rr_policy_->CheckConnectivityLocked(&rr_state_error); + // Connectivity state is a function of the RR policy updated/created. + UpdateConnectivityStateFromRoundRobinPolicyLocked(rr_state_error); + // Add the gRPC LB's interested_parties pollset_set to that of the newly + // created RR policy. This will make the RR policy progress upon activity on + // gRPC LB, which in turn is tied to the application's call. + grpc_pollset_set_add_pollset_set(rr_policy_->interested_parties(), + interested_parties()); + // Subscribe to changes to the connectivity of the new RR. + // TODO(roth): We currently track this ref manually. Once the new + // ClosureRef API is done, pass the RefCountedPtr<> along with the closure. + self = Ref(DEBUG_LOCATION, "on_rr_connectivity_changed"); + self.release(); + rr_policy_->NotifyOnStateChangeLocked(&rr_connectivity_state_, + &on_rr_connectivity_changed_); + rr_policy_->ExitIdleLocked(); + // Send pending picks to RR policy. + PendingPick* pp; + while ((pp = pending_picks_)) { + pending_picks_ = pp->next; + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, + "[grpclb %p] Pending pick about to (async) PICK from RR %p", this, + rr_policy_.get()); + } + PickFromRoundRobinPolicyLocked(true /* force_async */, pp); + } + // Send pending pings to RR policy. + PendingPing* pping; + while ((pping = pending_pings_)) { + pending_pings_ = pping->next; + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_INFO, "[grpclb %p] Pending ping about to PING from RR %p", + this, rr_policy_.get()); + } + rr_policy_->PingOneLocked(pping->on_initiate, pping->on_ack); + Delete(pping); + } +} - /* Get server name. */ - arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); - const char* server_uri = grpc_channel_arg_get_string(arg); - GPR_ASSERT(server_uri != nullptr); - grpc_uri* uri = grpc_uri_parse(server_uri, true); - GPR_ASSERT(uri->path[0] != '\0'); - glb_policy->server_name = - gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path); - if (grpc_lb_glb_trace.enabled()) { - gpr_log(GPR_INFO, - "[grpclb %p] Will use '%s' as the server name for LB request.", - glb_policy, glb_policy->server_name); +grpc_channel_args* GrpcLb::CreateRoundRobinPolicyArgsLocked() { + grpc_lb_addresses* addresses; + if (serverlist_ != nullptr) { + GPR_ASSERT(serverlist_->num_servers > 0); + addresses = ProcessServerlist(serverlist_); + } else { + // If CreateOrUpdateRoundRobinPolicyLocked() is invoked when we haven't + // received any serverlist from the balancer, we use the fallback backends + // returned by the resolver. Note that the fallback backend list may be + // empty, in which case the new round_robin policy will keep the requested + // picks pending. + GPR_ASSERT(fallback_backend_addresses_ != nullptr); + addresses = grpc_lb_addresses_copy(fallback_backend_addresses_); } - grpc_uri_destroy(uri); + GPR_ASSERT(addresses != nullptr); + // Replace the LB addresses in the channel args that we pass down to + // the subchannel. + static const char* keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; + const grpc_arg arg = grpc_lb_addresses_create_channel_arg(addresses); + grpc_channel_args* args = grpc_channel_args_copy_and_add_and_remove( + args_, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg, 1); + grpc_lb_addresses_destroy(addresses); + return args; +} - glb_policy->cc_factory = args->client_channel_factory; - GPR_ASSERT(glb_policy->cc_factory != nullptr); +void GrpcLb::CreateOrUpdateRoundRobinPolicyLocked() { + if (shutting_down_) return; + grpc_channel_args* args = CreateRoundRobinPolicyArgsLocked(); + GPR_ASSERT(args != nullptr); + if (rr_policy_ != nullptr) { + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_DEBUG, "[grpclb %p] Updating RR policy %p", this, + rr_policy_.get()); + } + rr_policy_->UpdateLocked(*args); + } else { + LoadBalancingPolicy::Args lb_policy_args; + lb_policy_args.combiner = combiner(); + lb_policy_args.client_channel_factory = client_channel_factory(); + lb_policy_args.args = args; + CreateRoundRobinPolicyLocked(lb_policy_args); + if (grpc_lb_glb_trace.enabled()) { + gpr_log(GPR_DEBUG, "[grpclb %p] Created new RR policy %p", this, + rr_policy_.get()); + } + } + grpc_channel_args_destroy(args); +} - arg = grpc_channel_args_find(args->args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS); - glb_policy->lb_call_timeout_ms = - grpc_channel_arg_get_integer(arg, {0, 0, INT_MAX}); +void GrpcLb::OnRoundRobinRequestReresolutionLocked(void* arg, + grpc_error* error) { + GrpcLb* grpclb_policy = reinterpret_cast(arg); + if (grpclb_policy->shutting_down_ || error != GRPC_ERROR_NONE) { + grpclb_policy->Unref(DEBUG_LOCATION, "on_rr_reresolution_requested"); + return; + } + if (grpc_lb_glb_trace.enabled()) { + gpr_log( + GPR_DEBUG, + "[grpclb %p] Re-resolution requested from the internal RR policy (%p).", + grpclb_policy, grpclb_policy->rr_policy_.get()); + } + // If we are talking to a balancer, we expect to get updated addresses form + // the balancer, so we can ignore the re-resolution request from the RR + // policy. Otherwise, handle the re-resolution request using the + // grpclb policy's original re-resolution closure. + if (grpclb_policy->lb_calld_ == nullptr || + !grpclb_policy->lb_calld_->seen_initial_response()) { + grpclb_policy->TryReresolutionLocked(&grpc_lb_glb_trace, GRPC_ERROR_NONE); + } + // Give back the wrapper closure to the RR policy. + grpclb_policy->rr_policy_->SetReresolutionClosureLocked( + &grpclb_policy->on_rr_request_reresolution_); +} - arg = grpc_channel_args_find(args->args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); - glb_policy->lb_fallback_timeout_ms = grpc_channel_arg_get_integer( - arg, {GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS, 0, INT_MAX}); +void GrpcLb::UpdateConnectivityStateFromRoundRobinPolicyLocked( + grpc_error* rr_state_error) { + const grpc_connectivity_state curr_glb_state = + grpc_connectivity_state_check(&state_tracker_); + /* The new connectivity status is a function of the previous one and the new + * input coming from the status of the RR policy. + * + * current state (grpclb's) + * | + * v || I | C | R | TF | SD | <- new state (RR's) + * ===++====+=====+=====+======+======+ + * I || I | C | R | [I] | [I] | + * ---++----+-----+-----+------+------+ + * C || I | C | R | [C] | [C] | + * ---++----+-----+-----+------+------+ + * R || I | C | R | [R] | [R] | + * ---++----+-----+-----+------+------+ + * TF || I | C | R | [TF] | [TF] | + * ---++----+-----+-----+------+------+ + * SD || NA | NA | NA | NA | NA | (*) + * ---++----+-----+-----+------+------+ + * + * A [STATE] indicates that the old RR policy is kept. In those cases, STATE + * is the current state of grpclb, which is left untouched. + * + * In summary, if the new state is TRANSIENT_FAILURE or SHUTDOWN, stick to + * the previous RR instance. + * + * Note that the status is never updated to SHUTDOWN as a result of calling + * this function. Only glb_shutdown() has the power to set that state. + * + * (*) This function mustn't be called during shutting down. */ + GPR_ASSERT(curr_glb_state != GRPC_CHANNEL_SHUTDOWN); + switch (rr_connectivity_state_) { + case GRPC_CHANNEL_TRANSIENT_FAILURE: + case GRPC_CHANNEL_SHUTDOWN: + GPR_ASSERT(rr_state_error != GRPC_ERROR_NONE); + break; + case GRPC_CHANNEL_IDLE: + case GRPC_CHANNEL_CONNECTING: + case GRPC_CHANNEL_READY: + GPR_ASSERT(rr_state_error == GRPC_ERROR_NONE); + } + if (grpc_lb_glb_trace.enabled()) { + gpr_log( + GPR_INFO, + "[grpclb %p] Setting grpclb's state to %s from new RR policy %p state.", + this, grpc_connectivity_state_name(rr_connectivity_state_), + rr_policy_.get()); + } + grpc_connectivity_state_set(&state_tracker_, rr_connectivity_state_, + rr_state_error, + "update_lb_connectivity_status_locked"); +} - // Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args, - // since we use this to trigger the client_load_reporting filter. - grpc_arg new_arg = grpc_channel_arg_string_create( - (char*)GRPC_ARG_LB_POLICY_NAME, (char*)"grpclb"); - static const char* args_to_remove[] = {GRPC_ARG_LB_POLICY_NAME}; - glb_policy->args = grpc_channel_args_copy_and_add_and_remove( - args->args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &new_arg, 1); - - /* Extract the backend addresses (may be empty) from the resolver for - * fallback. */ - glb_policy->fallback_backend_addresses = - extract_backend_addresses_locked(addresses); - - /* Create a client channel over them to communicate with a LB service */ - glb_policy->response_generator = - grpc_core::MakeRefCounted(); - grpc_channel_args* lb_channel_args = build_lb_channel_args( - addresses, glb_policy->response_generator.get(), args->args); - char* uri_str; - gpr_asprintf(&uri_str, "fake:///%s", glb_policy->server_name); - glb_policy->lb_channel = grpc_lb_policy_grpclb_create_lb_channel( - uri_str, args->client_channel_factory, lb_channel_args); - - /* Propagate initial resolution */ - glb_policy->response_generator->SetResponse(lb_channel_args); - grpc_channel_args_destroy(lb_channel_args); - gpr_free(uri_str); - if (glb_policy->lb_channel == nullptr) { - gpr_free((void*)glb_policy->server_name); - grpc_channel_args_destroy(glb_policy->args); - gpr_free(glb_policy); - return nullptr; +void GrpcLb::OnRoundRobinConnectivityChangedLocked(void* arg, + grpc_error* error) { + GrpcLb* grpclb_policy = reinterpret_cast(arg); + if (grpclb_policy->shutting_down_) { + grpclb_policy->Unref(DEBUG_LOCATION, "on_rr_connectivity_changed"); + return; } - grpc_subchannel_index_ref(); - GRPC_CLOSURE_INIT(&glb_policy->rr_on_connectivity_changed, - rr_on_connectivity_changed_locked, glb_policy, - grpc_combiner_scheduler(args->combiner)); - GRPC_CLOSURE_INIT(&glb_policy->rr_on_reresolution_requested, - rr_on_reresolution_requested_locked, glb_policy, - grpc_combiner_scheduler(args->combiner)); - GRPC_CLOSURE_INIT(&glb_policy->lb_channel_on_connectivity_changed, - glb_lb_channel_on_connectivity_changed_cb, glb_policy, - grpc_combiner_scheduler(args->combiner)); - grpc_lb_policy_init(&glb_policy->base, &glb_lb_policy_vtable, args->combiner); - grpc_connectivity_state_init(&glb_policy->state_tracker, GRPC_CHANNEL_IDLE, - "grpclb"); - // Init LB call backoff option. - grpc_core::BackOff::Options backoff_options; - backoff_options - .set_initial_backoff(GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * 1000) - .set_multiplier(GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER) - .set_jitter(GRPC_GRPCLB_RECONNECT_JITTER) - .set_max_backoff(GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000); - glb_policy->lb_call_backoff.Init(backoff_options); - return &glb_policy->base; + grpclb_policy->UpdateConnectivityStateFromRoundRobinPolicyLocked( + GRPC_ERROR_REF(error)); + // Resubscribe. Reuse the "on_rr_connectivity_changed" ref. + grpclb_policy->rr_policy_->NotifyOnStateChangeLocked( + &grpclb_policy->rr_connectivity_state_, + &grpclb_policy->on_rr_connectivity_changed_); } -static void glb_factory_ref(grpc_lb_policy_factory* factory) {} +// +// factory +// + +class GrpcLbFactory : public LoadBalancingPolicyFactory { + public: + OrphanablePtr CreateLoadBalancingPolicy( + const LoadBalancingPolicy::Args& args) const override { + /* Count the number of gRPC-LB addresses. There must be at least one. */ + const grpc_arg* arg = + grpc_channel_args_find(args.args, GRPC_ARG_LB_ADDRESSES); + if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { + return nullptr; + } + grpc_lb_addresses* addresses = + reinterpret_cast(arg->value.pointer.p); + size_t num_grpclb_addrs = 0; + for (size_t i = 0; i < addresses->num_addresses; ++i) { + if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; + } + if (num_grpclb_addrs == 0) return nullptr; + return OrphanablePtr(New(addresses, args)); + } -static void glb_factory_unref(grpc_lb_policy_factory* factory) {} + const char* name() const override { return "grpclb"; } +}; -static const grpc_lb_policy_factory_vtable glb_factory_vtable = { - glb_factory_ref, glb_factory_unref, glb_create, "grpclb"}; +} // namespace -static grpc_lb_policy_factory glb_lb_policy_factory = {&glb_factory_vtable}; +} // namespace grpc_core -grpc_lb_policy_factory* grpc_glb_lb_factory_create() { - return &glb_lb_policy_factory; -} +// +// Plugin registration +// -/* Plugin registration */ +namespace { // Only add client_load_reporting filter if the grpclb LB policy is used. -static bool maybe_add_client_load_reporting_filter( - grpc_channel_stack_builder* builder, void* arg) { +bool maybe_add_client_load_reporting_filter(grpc_channel_stack_builder* builder, + void* arg) { const grpc_channel_args* args = grpc_channel_stack_builder_get_channel_arguments(builder); const grpc_arg* channel_arg = @@ -1938,14 +1867,18 @@ static bool maybe_add_client_load_reporting_filter( if (channel_arg != nullptr && channel_arg->type == GRPC_ARG_STRING && strcmp(channel_arg->value.string, "grpclb") == 0) { return grpc_channel_stack_builder_append_filter( - builder, static_cast(arg), nullptr, - nullptr); + builder, (const grpc_channel_filter*)arg, nullptr, nullptr); } return true; } +} // namespace + void grpc_lb_policy_grpclb_init() { - grpc_register_lb_policy(grpc_glb_lb_factory_create()); + grpc_core::LoadBalancingPolicyRegistry::Builder:: + RegisterLoadBalancingPolicyFactory( + grpc_core::UniquePtr( + grpc_core::New())); grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, maybe_add_client_load_reporting_filter, diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h deleted file mode 100644 index 0a2edb0e3d..0000000000 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H -#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H - -#include "src/core/ext/filters/client_channel/lb_policy_factory.h" - -/** Returns a load balancing factory for the glb policy, which tries to connect - * to a load balancing server to decide the next successfully connected - * subchannel to pick. */ -grpc_lb_policy_factory* grpc_glb_lb_factory_create(); - -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */ diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 296bdcb247..f1878a594e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -29,194 +29,225 @@ #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/transport/connectivity_state.h" -grpc_core::TraceFlag grpc_lb_pick_first_trace(false, "pick_first"); +namespace grpc_core { + +TraceFlag grpc_lb_pick_first_trace(false, "pick_first"); + +namespace { + +// +// pick_first LB policy +// + +class PickFirst : public LoadBalancingPolicy { + public: + explicit PickFirst(const Args& args); + + void UpdateLocked(const grpc_channel_args& args) override; + bool PickLocked(PickState* pick) override; + void CancelPickLocked(PickState* pick, grpc_error* error) override; + void CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) override; + void NotifyOnStateChangeLocked(grpc_connectivity_state* state, + grpc_closure* closure) override; + grpc_connectivity_state CheckConnectivityLocked( + grpc_error** connectivity_error) override; + void HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) override; + void PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) override; + void ExitIdleLocked() override; + + private: + ~PickFirst(); + + void ShutdownLocked() override; + + void StartPickingLocked(); + void DestroyUnselectedSubchannelsLocked(); + + static void OnConnectivityChangedLocked(void* arg, grpc_error* error); + + void SubchannelListRefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason); + void SubchannelListUnrefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason); -typedef struct { - /** base policy: must be first */ - grpc_lb_policy base; /** all our subchannels */ - grpc_lb_subchannel_list* subchannel_list; + grpc_lb_subchannel_list* subchannel_list_ = nullptr; /** latest pending subchannel list */ - grpc_lb_subchannel_list* latest_pending_subchannel_list; + grpc_lb_subchannel_list* latest_pending_subchannel_list_ = nullptr; /** selected subchannel in \a subchannel_list */ - grpc_lb_subchannel_data* selected; + grpc_lb_subchannel_data* selected_ = nullptr; /** have we started picking? */ - bool started_picking; + bool started_picking_ = false; /** are we shut down? */ - bool shutdown; + bool shutdown_ = false; /** list of picks that are waiting on connectivity */ - grpc_lb_policy_pick_state* pending_picks; + PickState* pending_picks_ = nullptr; /** our connectivity state tracker */ - grpc_connectivity_state_tracker state_tracker; -} pick_first_lb_policy; - -static void pf_destroy(grpc_lb_policy* pol) { - pick_first_lb_policy* p = reinterpret_cast(pol); - GPR_ASSERT(p->subchannel_list == nullptr); - GPR_ASSERT(p->latest_pending_subchannel_list == nullptr); - GPR_ASSERT(p->pending_picks == nullptr); - grpc_connectivity_state_destroy(&p->state_tracker); - gpr_free(p); - grpc_subchannel_index_unref(); + grpc_connectivity_state_tracker state_tracker_; +}; + +PickFirst::PickFirst(const Args& args) : LoadBalancingPolicy(args) { + GPR_ASSERT(args.client_channel_factory != nullptr); + grpc_connectivity_state_init(&state_tracker_, GRPC_CHANNEL_IDLE, + "pick_first"); if (grpc_lb_pick_first_trace.enabled()) { - gpr_log(GPR_DEBUG, "Pick First %p destroyed.", (void*)p); + gpr_log(GPR_DEBUG, "Pick First %p created.", this); } + UpdateLocked(*args.args); + grpc_subchannel_index_ref(); } -static void pf_shutdown_locked(grpc_lb_policy* pol, - grpc_lb_policy* new_policy) { - pick_first_lb_policy* p = reinterpret_cast(pol); - grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel shutdown"); +PickFirst::~PickFirst() { if (grpc_lb_pick_first_trace.enabled()) { - gpr_log(GPR_DEBUG, "Pick First %p Shutting down", p); + gpr_log(GPR_DEBUG, "Destroying Pick First %p", this); } - p->shutdown = true; - grpc_lb_policy_pick_state* pick; - while ((pick = p->pending_picks) != nullptr) { - p->pending_picks = pick->next; - if (new_policy != nullptr) { - // Hand off to new LB policy. - if (grpc_lb_policy_pick_locked(new_policy, pick)) { - // Synchronous return, schedule closure. - GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); - } - } else { - pick->connected_subchannel.reset(); - GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_REF(error)); + GPR_ASSERT(subchannel_list_ == nullptr); + GPR_ASSERT(latest_pending_subchannel_list_ == nullptr); + GPR_ASSERT(pending_picks_ == nullptr); + grpc_connectivity_state_destroy(&state_tracker_); + grpc_subchannel_index_unref(); +} + +void PickFirst::HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) { + PickState* pick; + while ((pick = pending_picks_) != nullptr) { + pending_picks_ = pick->next; + if (new_policy->PickLocked(pick)) { + // Synchronous return, schedule closure. + GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); } } - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_SHUTDOWN, +} + +void PickFirst::ShutdownLocked() { + grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel shutdown"); + if (grpc_lb_pick_first_trace.enabled()) { + gpr_log(GPR_DEBUG, "Pick First %p Shutting down", this); + } + shutdown_ = true; + PickState* pick; + while ((pick = pending_picks_) != nullptr) { + pending_picks_ = pick->next; + pick->connected_subchannel.reset(); + GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_REF(error)); + } + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "shutdown"); - if (p->subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, - "pf_shutdown"); - p->subchannel_list = nullptr; + if (subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(subchannel_list_, "pf_shutdown"); + subchannel_list_ = nullptr; } - if (p->latest_pending_subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref( - p->latest_pending_subchannel_list, "pf_shutdown"); - p->latest_pending_subchannel_list = nullptr; + if (latest_pending_subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(latest_pending_subchannel_list_, + "pf_shutdown"); + latest_pending_subchannel_list_ = nullptr; } - grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_pick_first_trace, - GRPC_ERROR_CANCELLED); + TryReresolutionLocked(&grpc_lb_pick_first_trace, GRPC_ERROR_CANCELLED); GRPC_ERROR_UNREF(error); } -static void pf_cancel_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick, - grpc_error* error) { - pick_first_lb_policy* p = reinterpret_cast(pol); - grpc_lb_policy_pick_state* pp = p->pending_picks; - p->pending_picks = nullptr; +void PickFirst::CancelPickLocked(PickState* pick, grpc_error* error) { + PickState* pp = pending_picks_; + pending_picks_ = nullptr; while (pp != nullptr) { - grpc_lb_policy_pick_state* next = pp->next; + PickState* next = pp->next; if (pp == pick) { pick->connected_subchannel.reset(); GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Pick Cancelled", &error, 1)); } else { - pp->next = p->pending_picks; - p->pending_picks = pp; + pp->next = pending_picks_; + pending_picks_ = pp; } pp = next; } GRPC_ERROR_UNREF(error); } -static void pf_cancel_picks_locked(grpc_lb_policy* pol, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error) { - pick_first_lb_policy* p = reinterpret_cast(pol); - grpc_lb_policy_pick_state* pick = p->pending_picks; - p->pending_picks = nullptr; +void PickFirst::CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) { + PickState* pick = pending_picks_; + pending_picks_ = nullptr; while (pick != nullptr) { - grpc_lb_policy_pick_state* next = pick->next; + PickState* next = pick->next; if ((pick->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Pick Cancelled", &error, 1)); } else { - pick->next = p->pending_picks; - p->pending_picks = pick; + pick->next = pending_picks_; + pending_picks_ = pick; } pick = next; } GRPC_ERROR_UNREF(error); } -static void start_picking_locked(pick_first_lb_policy* p) { - p->started_picking = true; - if (p->subchannel_list != nullptr && - p->subchannel_list->num_subchannels > 0) { - p->subchannel_list->checking_subchannel = 0; - for (size_t i = 0; i < p->subchannel_list->num_subchannels; ++i) { - if (p->subchannel_list->subchannels[i].subchannel != nullptr) { - grpc_lb_subchannel_list_ref_for_connectivity_watch( - p->subchannel_list, "connectivity_watch+start_picking"); +void PickFirst::StartPickingLocked() { + started_picking_ = true; + if (subchannel_list_ != nullptr && subchannel_list_->num_subchannels > 0) { + subchannel_list_->checking_subchannel = 0; + for (size_t i = 0; i < subchannel_list_->num_subchannels; ++i) { + if (subchannel_list_->subchannels[i].subchannel != nullptr) { + SubchannelListRefForConnectivityWatch( + subchannel_list_, "connectivity_watch+start_picking"); grpc_lb_subchannel_data_start_connectivity_watch( - &p->subchannel_list->subchannels[i]); + &subchannel_list_->subchannels[i]); break; } } } } -static void pf_exit_idle_locked(grpc_lb_policy* pol) { - pick_first_lb_policy* p = reinterpret_cast(pol); - if (!p->started_picking) { - start_picking_locked(p); +void PickFirst::ExitIdleLocked() { + if (!started_picking_) { + StartPickingLocked(); } } -static int pf_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick) { - pick_first_lb_policy* p = reinterpret_cast(pol); +bool PickFirst::PickLocked(PickState* pick) { // If we have a selected subchannel already, return synchronously. - if (p->selected != nullptr) { - pick->connected_subchannel = p->selected->connected_subchannel; - return 1; + if (selected_ != nullptr) { + pick->connected_subchannel = selected_->connected_subchannel; + return true; } // No subchannel selected yet, so handle asynchronously. - if (!p->started_picking) { - start_picking_locked(p); + if (!started_picking_) { + StartPickingLocked(); } - pick->next = p->pending_picks; - p->pending_picks = pick; - return 0; + pick->next = pending_picks_; + pending_picks_ = pick; + return false; } -static void destroy_unselected_subchannels_locked(pick_first_lb_policy* p) { - for (size_t i = 0; i < p->subchannel_list->num_subchannels; ++i) { - grpc_lb_subchannel_data* sd = &p->subchannel_list->subchannels[i]; - if (p->selected != sd) { +void PickFirst::DestroyUnselectedSubchannelsLocked() { + for (size_t i = 0; i < subchannel_list_->num_subchannels; ++i) { + grpc_lb_subchannel_data* sd = &subchannel_list_->subchannels[i]; + if (selected_ != sd) { grpc_lb_subchannel_data_unref_subchannel(sd, "selected_different_subchannel"); } } } -static grpc_connectivity_state pf_check_connectivity_locked( - grpc_lb_policy* pol, grpc_error** error) { - pick_first_lb_policy* p = reinterpret_cast(pol); - return grpc_connectivity_state_get(&p->state_tracker, error); +grpc_connectivity_state PickFirst::CheckConnectivityLocked(grpc_error** error) { + return grpc_connectivity_state_get(&state_tracker_, error); } -static void pf_notify_on_state_change_locked(grpc_lb_policy* pol, - grpc_connectivity_state* current, - grpc_closure* notify) { - pick_first_lb_policy* p = reinterpret_cast(pol); - grpc_connectivity_state_notify_on_state_change(&p->state_tracker, current, +void PickFirst::NotifyOnStateChangeLocked(grpc_connectivity_state* current, + grpc_closure* notify) { + grpc_connectivity_state_notify_on_state_change(&state_tracker_, current, notify); } -static void pf_ping_one_locked(grpc_lb_policy* pol, grpc_closure* on_initiate, - grpc_closure* on_ack) { - pick_first_lb_policy* p = reinterpret_cast(pol); - if (p->selected) { - p->selected->connected_subchannel->Ping(on_initiate, on_ack); +void PickFirst::PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) { + if (selected_ != nullptr) { + selected_->connected_subchannel->Ping(on_initiate, on_ack); } else { GRPC_CLOSURE_SCHED(on_initiate, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Not connected")); @@ -225,18 +256,31 @@ static void pf_ping_one_locked(grpc_lb_policy* pol, grpc_closure* on_initiate, } } -static void pf_connectivity_changed_locked(void* arg, grpc_error* error); +void PickFirst::SubchannelListRefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason) { + // TODO(roth): We currently track this ref manually. Once the new + // ClosureRef API is ready and the subchannel_list code has been + // converted to a C++ API, find a way to hold the RefCountedPtr<> + // somewhere (maybe in the subchannel_data object) instead of doing + // this manually. + auto self = Ref(DEBUG_LOCATION, reason); + self.release(); + grpc_lb_subchannel_list_ref(subchannel_list, reason); +} -static void pf_update_locked(grpc_lb_policy* policy, - const grpc_lb_policy_args* args) { - pick_first_lb_policy* p = reinterpret_cast(policy); - const grpc_arg* arg = - grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); +void PickFirst::SubchannelListUnrefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason) { + Unref(DEBUG_LOCATION, reason); + grpc_lb_subchannel_list_unref(subchannel_list, reason); +} + +void PickFirst::UpdateLocked(const grpc_channel_args& args) { + const grpc_arg* arg = grpc_channel_args_find(&args, GRPC_ARG_LB_ADDRESSES); if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { - if (p->subchannel_list == nullptr) { + if (subchannel_list_ == nullptr) { // If we don't have a current subchannel list, go into TRANSIENT FAILURE. grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Missing update in args"), "pf_update_missing"); } else { @@ -244,77 +288,78 @@ static void pf_update_locked(grpc_lb_policy* policy, gpr_log(GPR_ERROR, "No valid LB addresses channel arg for Pick First %p update, " "ignoring.", - (void*)p); + this); } return; } const grpc_lb_addresses* addresses = - static_cast(arg->value.pointer.p); + (const grpc_lb_addresses*)arg->value.pointer.p; if (grpc_lb_pick_first_trace.enabled()) { - gpr_log(GPR_INFO, "Pick First %p received update with %lu addresses", - (void*)p, static_cast(addresses->num_addresses)); + gpr_log(GPR_INFO, + "Pick First %p received update with %" PRIuPTR " addresses", this, + addresses->num_addresses); } grpc_lb_subchannel_list* subchannel_list = grpc_lb_subchannel_list_create( - &p->base, &grpc_lb_pick_first_trace, addresses, args, - pf_connectivity_changed_locked); + this, &grpc_lb_pick_first_trace, addresses, combiner(), + client_channel_factory(), args, &PickFirst::OnConnectivityChangedLocked); if (subchannel_list->num_subchannels == 0) { // Empty update or no valid subchannels. Unsubscribe from all current // subchannels and put the channel in TRANSIENT_FAILURE. grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Empty update"), "pf_update_empty"); - if (p->subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + if (subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(subchannel_list_, "sl_shutdown_empty_update"); } - p->subchannel_list = subchannel_list; // Empty list. - p->selected = nullptr; + subchannel_list_ = subchannel_list; // Empty list. + selected_ = nullptr; return; } - if (p->selected == nullptr) { + if (selected_ == nullptr) { // We don't yet have a selected subchannel, so replace the current // subchannel list immediately. - if (p->subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + if (subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(subchannel_list_, "pf_update_before_selected"); } - p->subchannel_list = subchannel_list; + subchannel_list_ = subchannel_list; } else { // We do have a selected subchannel. // Check if it's present in the new list. If so, we're done. for (size_t i = 0; i < subchannel_list->num_subchannels; ++i) { grpc_lb_subchannel_data* sd = &subchannel_list->subchannels[i]; - if (sd->subchannel == p->selected->subchannel) { + if (sd->subchannel == selected_->subchannel) { // The currently selected subchannel is in the update: we are done. if (grpc_lb_pick_first_trace.enabled()) { gpr_log(GPR_INFO, "Pick First %p found already selected subchannel %p " "at update index %" PRIuPTR " of %" PRIuPTR "; update done", - p, p->selected->subchannel, i, + this, selected_->subchannel, i, subchannel_list->num_subchannels); } - if (p->selected->connected_subchannel != nullptr) { - sd->connected_subchannel = p->selected->connected_subchannel; + if (selected_->connected_subchannel != nullptr) { + sd->connected_subchannel = selected_->connected_subchannel; } - p->selected = sd; - if (p->subchannel_list != nullptr) { + selected_ = sd; + if (subchannel_list_ != nullptr) { grpc_lb_subchannel_list_shutdown_and_unref( - p->subchannel_list, "pf_update_includes_selected"); + subchannel_list_, "pf_update_includes_selected"); } - p->subchannel_list = subchannel_list; - destroy_unselected_subchannels_locked(p); - grpc_lb_subchannel_list_ref_for_connectivity_watch( + subchannel_list_ = subchannel_list; + DestroyUnselectedSubchannelsLocked(); + SubchannelListRefForConnectivityWatch( subchannel_list, "connectivity_watch+replace_selected"); grpc_lb_subchannel_data_start_connectivity_watch(sd); // If there was a previously pending update (which may or may // not have contained the currently selected subchannel), drop // it, so that it doesn't override what we've done here. - if (p->latest_pending_subchannel_list != nullptr) { + if (latest_pending_subchannel_list_ != nullptr) { grpc_lb_subchannel_list_shutdown_and_unref( - p->latest_pending_subchannel_list, + latest_pending_subchannel_list_, "pf_update_includes_selected+outdated"); - p->latest_pending_subchannel_list = nullptr; + latest_pending_subchannel_list_ = nullptr; } return; } @@ -323,84 +368,81 @@ static void pf_update_locked(grpc_lb_policy* policy, // pending subchannel list to the new subchannel list. We will wait // for it to report READY before swapping it into the current // subchannel list. - if (p->latest_pending_subchannel_list != nullptr) { + if (latest_pending_subchannel_list_ != nullptr) { if (grpc_lb_pick_first_trace.enabled()) { gpr_log(GPR_DEBUG, "Pick First %p Shutting down latest pending subchannel list " "%p, about to be replaced by newer latest %p", - (void*)p, (void*)p->latest_pending_subchannel_list, - (void*)subchannel_list); + this, latest_pending_subchannel_list_, subchannel_list); } grpc_lb_subchannel_list_shutdown_and_unref( - p->latest_pending_subchannel_list, "sl_outdated_dont_smash"); + latest_pending_subchannel_list_, "sl_outdated_dont_smash"); } - p->latest_pending_subchannel_list = subchannel_list; + latest_pending_subchannel_list_ = subchannel_list; } // If we've started picking, start trying to connect to the first // subchannel in the new list. - if (p->started_picking) { - grpc_lb_subchannel_list_ref_for_connectivity_watch( - subchannel_list, "connectivity_watch+update"); + if (started_picking_) { + SubchannelListRefForConnectivityWatch(subchannel_list, + "connectivity_watch+update"); grpc_lb_subchannel_data_start_connectivity_watch( &subchannel_list->subchannels[0]); } } -static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { - grpc_lb_subchannel_data* sd = static_cast(arg); - pick_first_lb_policy* p = - reinterpret_cast(sd->subchannel_list->policy); +void PickFirst::OnConnectivityChangedLocked(void* arg, grpc_error* error) { + grpc_lb_subchannel_data* sd = reinterpret_cast(arg); + PickFirst* p = reinterpret_cast(sd->subchannel_list->policy); if (grpc_lb_pick_first_trace.enabled()) { gpr_log(GPR_DEBUG, "Pick First %p connectivity changed for subchannel %p (%" PRIuPTR " of %" PRIuPTR - "), subchannel_list %p: state=%s p->shutdown=%d " + "), subchannel_list %p: state=%s p->shutdown_=%d " "sd->subchannel_list->shutting_down=%d error=%s", - (void*)p, (void*)sd->subchannel, - sd->subchannel_list->checking_subchannel, - sd->subchannel_list->num_subchannels, (void*)sd->subchannel_list, + p, sd->subchannel, sd->subchannel_list->checking_subchannel, + sd->subchannel_list->num_subchannels, sd->subchannel_list, grpc_connectivity_state_name(sd->pending_connectivity_state_unsafe), - p->shutdown, sd->subchannel_list->shutting_down, + p->shutdown_, sd->subchannel_list->shutting_down, grpc_error_string(error)); } // If the policy is shutting down, unref and return. - if (p->shutdown) { + if (p->shutdown_) { grpc_lb_subchannel_data_stop_connectivity_watch(sd); grpc_lb_subchannel_data_unref_subchannel(sd, "pf_shutdown"); - grpc_lb_subchannel_list_unref_for_connectivity_watch(sd->subchannel_list, - "pf_shutdown"); + p->SubchannelListUnrefForConnectivityWatch(sd->subchannel_list, + "pf_shutdown"); return; } // If the subchannel list is shutting down, stop watching. if (sd->subchannel_list->shutting_down || error == GRPC_ERROR_CANCELLED) { grpc_lb_subchannel_data_stop_connectivity_watch(sd); grpc_lb_subchannel_data_unref_subchannel(sd, "pf_sl_shutdown"); - grpc_lb_subchannel_list_unref_for_connectivity_watch(sd->subchannel_list, - "pf_sl_shutdown"); + p->SubchannelListUnrefForConnectivityWatch(sd->subchannel_list, + "pf_sl_shutdown"); return; } // If we're still here, the notification must be for a subchannel in // either the current or latest pending subchannel lists. - GPR_ASSERT(sd->subchannel_list == p->subchannel_list || - sd->subchannel_list == p->latest_pending_subchannel_list); + GPR_ASSERT(sd->subchannel_list == p->subchannel_list_ || + sd->subchannel_list == p->latest_pending_subchannel_list_); // Update state. sd->curr_connectivity_state = sd->pending_connectivity_state_unsafe; // Handle updates for the currently selected subchannel. - if (p->selected == sd) { + if (p->selected_ == sd) { // If the new state is anything other than READY and there is a // pending update, switch to the pending update. if (sd->curr_connectivity_state != GRPC_CHANNEL_READY && - p->latest_pending_subchannel_list != nullptr) { - p->selected = nullptr; + p->latest_pending_subchannel_list_ != nullptr) { + p->selected_ = nullptr; grpc_lb_subchannel_data_stop_connectivity_watch(sd); - grpc_lb_subchannel_list_unref_for_connectivity_watch( + p->SubchannelListUnrefForConnectivityWatch( sd->subchannel_list, "selected_not_ready+switch_to_update"); grpc_lb_subchannel_list_shutdown_and_unref( - p->subchannel_list, "selected_not_ready+switch_to_update"); - p->subchannel_list = p->latest_pending_subchannel_list; - p->latest_pending_subchannel_list = nullptr; + p->subchannel_list_, "selected_not_ready+switch_to_update"); + p->subchannel_list_ = p->latest_pending_subchannel_list_; + p->latest_pending_subchannel_list_ = nullptr; grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &p->state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_REF(error), "selected_not_ready+switch_to_update"); } else { // TODO(juanlishen): we re-resolve when the selected subchannel goes to @@ -411,21 +453,20 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { GPR_ASSERT(sd->curr_connectivity_state != GRPC_CHANNEL_SHUTDOWN); if (sd->curr_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { // If the selected channel goes bad, request a re-resolution. - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_IDLE, + grpc_connectivity_state_set(&p->state_tracker_, GRPC_CHANNEL_IDLE, GRPC_ERROR_NONE, "selected_changed+reresolve"); - p->started_picking = false; - grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_pick_first_trace, - GRPC_ERROR_NONE); - // in transient failure. Rely on re-resolution to recover. - p->selected = nullptr; + p->started_picking_ = false; + p->TryReresolutionLocked(&grpc_lb_pick_first_trace, GRPC_ERROR_NONE); + // In transient failure. Rely on re-resolution to recover. + p->selected_ = nullptr; grpc_lb_subchannel_data_stop_connectivity_watch(sd); - grpc_lb_subchannel_list_unref_for_connectivity_watch( - sd->subchannel_list, "pf_selected_shutdown"); + p->SubchannelListUnrefForConnectivityWatch(sd->subchannel_list, + "pf_selected_shutdown"); grpc_lb_subchannel_data_unref_subchannel( sd, "pf_selected_shutdown"); // Unrefs connected subchannel } else { - grpc_connectivity_state_set(&p->state_tracker, + grpc_connectivity_state_set(&p->state_tracker_, sd->curr_connectivity_state, GRPC_ERROR_REF(error), "selected_changed"); // Renew notification. @@ -436,45 +477,45 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { } // If we get here, there are two possible cases: // 1. We do not currently have a selected subchannel, and the update is - // for a subchannel in p->subchannel_list that we're trying to + // for a subchannel in p->subchannel_list_ that we're trying to // connect to. The goal here is to find a subchannel that we can // select. // 2. We do currently have a selected subchannel, and the update is - // for a subchannel in p->latest_pending_subchannel_list. The + // for a subchannel in p->latest_pending_subchannel_list_. The // goal here is to find a subchannel from the update that we can // select in place of the current one. switch (sd->curr_connectivity_state) { case GRPC_CHANNEL_READY: { - // Case 2. Promote p->latest_pending_subchannel_list to - // p->subchannel_list. + // Case 2. Promote p->latest_pending_subchannel_list_ to + // p->subchannel_list_. sd->connected_subchannel = grpc_subchannel_get_connected_subchannel(sd->subchannel); - if (sd->subchannel_list == p->latest_pending_subchannel_list) { - GPR_ASSERT(p->subchannel_list != nullptr); - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + if (sd->subchannel_list == p->latest_pending_subchannel_list_) { + GPR_ASSERT(p->subchannel_list_ != nullptr); + grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list_, "finish_update"); - p->subchannel_list = p->latest_pending_subchannel_list; - p->latest_pending_subchannel_list = nullptr; + p->subchannel_list_ = p->latest_pending_subchannel_list_; + p->latest_pending_subchannel_list_ = nullptr; } // Cases 1 and 2. - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_READY, + grpc_connectivity_state_set(&p->state_tracker_, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, "connecting_ready"); - p->selected = sd; + p->selected_ = sd; if (grpc_lb_pick_first_trace.enabled()) { - gpr_log(GPR_INFO, "Pick First %p selected subchannel %p", (void*)p, - (void*)sd->subchannel); + gpr_log(GPR_INFO, "Pick First %p selected subchannel %p", p, + sd->subchannel); } // Drop all other subchannels, since we are now connected. - destroy_unselected_subchannels_locked(p); + p->DestroyUnselectedSubchannelsLocked(); // Update any calls that were waiting for a pick. - grpc_lb_policy_pick_state* pick; - while ((pick = p->pending_picks)) { - p->pending_picks = pick->next; - pick->connected_subchannel = p->selected->connected_subchannel; + PickState* pick; + while ((pick = p->pending_picks_)) { + p->pending_picks_ = pick->next; + pick->connected_subchannel = p->selected_->connected_subchannel; if (grpc_lb_pick_first_trace.enabled()) { gpr_log(GPR_INFO, "Servicing pending pick with selected subchannel %p", - (void*)p->selected); + p->selected_); } GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); } @@ -494,9 +535,9 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { // Case 1: Only set state to TRANSIENT_FAILURE if we've tried // all subchannels. if (sd->subchannel_list->checking_subchannel == 0 && - sd->subchannel_list == p->subchannel_list) { + sd->subchannel_list == p->subchannel_list_) { grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &p->state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_REF(error), "connecting_transient_failure"); } // Reuses the connectivity refs from the previous watch. @@ -506,8 +547,8 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_IDLE: { // Only update connectivity state in case 1. - if (sd->subchannel_list == p->subchannel_list) { - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_CONNECTING, + if (sd->subchannel_list == p->subchannel_list_) { + grpc_connectivity_state_set(&p->state_tracker_, GRPC_CHANNEL_CONNECTING, GRPC_ERROR_REF(error), "connecting_changed"); } @@ -520,51 +561,29 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { } } -static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { - pf_destroy, - pf_shutdown_locked, - pf_pick_locked, - pf_cancel_pick_locked, - pf_cancel_picks_locked, - pf_ping_one_locked, - pf_exit_idle_locked, - pf_check_connectivity_locked, - pf_notify_on_state_change_locked, - pf_update_locked}; - -static void pick_first_factory_ref(grpc_lb_policy_factory* factory) {} - -static void pick_first_factory_unref(grpc_lb_policy_factory* factory) {} - -static grpc_lb_policy* create_pick_first(grpc_lb_policy_factory* factory, - grpc_lb_policy_args* args) { - GPR_ASSERT(args->client_channel_factory != nullptr); - pick_first_lb_policy* p = - static_cast(gpr_zalloc(sizeof(*p))); - if (grpc_lb_pick_first_trace.enabled()) { - gpr_log(GPR_DEBUG, "Pick First %p created.", (void*)p); - } - pf_update_locked(&p->base, args); - grpc_lb_policy_init(&p->base, &pick_first_lb_policy_vtable, args->combiner); - grpc_subchannel_index_ref(); - return &p->base; -} +// +// factory +// -static const grpc_lb_policy_factory_vtable pick_first_factory_vtable = { - pick_first_factory_ref, pick_first_factory_unref, create_pick_first, - "pick_first"}; +class PickFirstFactory : public LoadBalancingPolicyFactory { + public: + OrphanablePtr CreateLoadBalancingPolicy( + const LoadBalancingPolicy::Args& args) const override { + return OrphanablePtr(New(args)); + } -static grpc_lb_policy_factory pick_first_lb_policy_factory = { - &pick_first_factory_vtable}; + const char* name() const override { return "pick_first"; } +}; -static grpc_lb_policy_factory* pick_first_lb_factory_create() { - return &pick_first_lb_policy_factory; -} +} // namespace -/* Plugin registration */ +} // namespace grpc_core void grpc_lb_policy_pick_first_init() { - grpc_register_lb_policy(pick_first_lb_factory_create()); + grpc_core::LoadBalancingPolicyRegistry::Builder:: + RegisterLoadBalancingPolicyFactory( + grpc_core::UniquePtr( + grpc_core::New())); } void grpc_lb_policy_pick_first_shutdown() {} diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index b5b4c44ef1..178e299b61 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -40,34 +40,94 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/static_metadata.h" -grpc_core::TraceFlag grpc_lb_round_robin_trace(false, "round_robin"); - -typedef struct round_robin_lb_policy { - /** base policy: must be first */ - grpc_lb_policy base; - - grpc_lb_subchannel_list* subchannel_list; - +namespace grpc_core { + +TraceFlag grpc_lb_round_robin_trace(false, "round_robin"); + +namespace { + +// +// round_robin LB policy +// + +class RoundRobin : public LoadBalancingPolicy { + public: + explicit RoundRobin(const Args& args); + + void UpdateLocked(const grpc_channel_args& args) override; + bool PickLocked(PickState* pick) override; + void CancelPickLocked(PickState* pick, grpc_error* error) override; + void CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) override; + void NotifyOnStateChangeLocked(grpc_connectivity_state* state, + grpc_closure* closure) override; + grpc_connectivity_state CheckConnectivityLocked( + grpc_error** connectivity_error) override; + void HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) override; + void PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) override; + void ExitIdleLocked() override; + + private: + ~RoundRobin(); + + void ShutdownLocked() override; + + void StartPickingLocked(); + size_t GetNextReadySubchannelIndexLocked(); + void UpdateLastReadySubchannelIndexLocked(size_t last_ready_index); + void UpdateConnectivityStatusLocked(grpc_lb_subchannel_data* sd, + grpc_error* error); + + static void OnConnectivityChangedLocked(void* arg, grpc_error* error); + + void SubchannelListRefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason); + void SubchannelListUnrefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason); + + /** list of subchannels */ + grpc_lb_subchannel_list* subchannel_list_ = nullptr; /** have we started picking? */ - bool started_picking; + bool started_picking_ = false; /** are we shutting down? */ - bool shutdown; + bool shutdown_ = false; /** List of picks that are waiting on connectivity */ - grpc_lb_policy_pick_state* pending_picks; - + PickState* pending_picks_ = nullptr; /** our connectivity state tracker */ - grpc_connectivity_state_tracker state_tracker; - + grpc_connectivity_state_tracker state_tracker_; /** Index into subchannels for last pick. */ - size_t last_ready_subchannel_index; - + size_t last_ready_subchannel_index_ = 0; /** Latest version of the subchannel list. * Subchannel connectivity callbacks will only promote updated subchannel * lists if they equal \a latest_pending_subchannel_list. In other words, * racing callbacks that reference outdated subchannel lists won't perform any * update. */ - grpc_lb_subchannel_list* latest_pending_subchannel_list; -} round_robin_lb_policy; + grpc_lb_subchannel_list* latest_pending_subchannel_list_ = nullptr; +}; + +RoundRobin::RoundRobin(const Args& args) : LoadBalancingPolicy(args) { + GPR_ASSERT(args.client_channel_factory != nullptr); + grpc_connectivity_state_init(&state_tracker_, GRPC_CHANNEL_IDLE, + "round_robin"); + UpdateLocked(*args.args); + if (grpc_lb_round_robin_trace.enabled()) { + gpr_log(GPR_DEBUG, "[RR %p] Created with %" PRIuPTR " subchannels", this, + subchannel_list_->num_subchannels); + } + grpc_subchannel_index_ref(); +} + +RoundRobin::~RoundRobin() { + if (grpc_lb_round_robin_trace.enabled()) { + gpr_log(GPR_DEBUG, "[RR %p] Destroying Round Robin policy", this); + } + GPR_ASSERT(subchannel_list_ == nullptr); + GPR_ASSERT(latest_pending_subchannel_list_ == nullptr); + GPR_ASSERT(pending_picks_ == nullptr); + grpc_connectivity_state_destroy(&state_tracker_); + grpc_subchannel_index_unref(); +} /** Returns the index into p->subchannel_list->subchannels of the next * subchannel in READY state, or p->subchannel_list->num_subchannels if no @@ -75,195 +135,190 @@ typedef struct round_robin_lb_policy { * * Note that this function does *not* update p->last_ready_subchannel_index. * The caller must do that if it returns a pick. */ -static size_t get_next_ready_subchannel_index_locked( - const round_robin_lb_policy* p) { - GPR_ASSERT(p->subchannel_list != nullptr); +size_t RoundRobin::GetNextReadySubchannelIndexLocked() { + GPR_ASSERT(subchannel_list_ != nullptr); if (grpc_lb_round_robin_trace.enabled()) { gpr_log(GPR_INFO, - "[RR %p] getting next ready subchannel (out of %lu), " - "last_ready_subchannel_index=%lu", - (void*)p, - static_cast(p->subchannel_list->num_subchannels), - static_cast(p->last_ready_subchannel_index)); - } - for (size_t i = 0; i < p->subchannel_list->num_subchannels; ++i) { - const size_t index = (i + p->last_ready_subchannel_index + 1) % - p->subchannel_list->num_subchannels; + "[RR %p] getting next ready subchannel (out of %" PRIuPTR + "), " + "last_ready_subchannel_index=%" PRIuPTR, + this, subchannel_list_->num_subchannels, + last_ready_subchannel_index_); + } + for (size_t i = 0; i < subchannel_list_->num_subchannels; ++i) { + const size_t index = (i + last_ready_subchannel_index_ + 1) % + subchannel_list_->num_subchannels; if (grpc_lb_round_robin_trace.enabled()) { gpr_log( GPR_DEBUG, - "[RR %p] checking subchannel %p, subchannel_list %p, index %lu: " - "state=%s", - (void*)p, (void*)p->subchannel_list->subchannels[index].subchannel, - (void*)p->subchannel_list, static_cast(index), + "[RR %p] checking subchannel %p, subchannel_list %p, index %" PRIuPTR + ": state=%s", + this, subchannel_list_->subchannels[index].subchannel, + subchannel_list_, index, grpc_connectivity_state_name( - p->subchannel_list->subchannels[index].curr_connectivity_state)); + subchannel_list_->subchannels[index].curr_connectivity_state)); } - if (p->subchannel_list->subchannels[index].curr_connectivity_state == + if (subchannel_list_->subchannels[index].curr_connectivity_state == GRPC_CHANNEL_READY) { if (grpc_lb_round_robin_trace.enabled()) { gpr_log(GPR_DEBUG, - "[RR %p] found next ready subchannel (%p) at index %lu of " - "subchannel_list %p", - (void*)p, - (void*)p->subchannel_list->subchannels[index].subchannel, - static_cast(index), (void*)p->subchannel_list); + "[RR %p] found next ready subchannel (%p) at index %" PRIuPTR + " of subchannel_list %p", + this, subchannel_list_->subchannels[index].subchannel, index, + subchannel_list_); } return index; } } if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_DEBUG, "[RR %p] no subchannels in ready state", (void*)p); + gpr_log(GPR_DEBUG, "[RR %p] no subchannels in ready state", this); } - return p->subchannel_list->num_subchannels; + return subchannel_list_->num_subchannels; } -// Sets p->last_ready_subchannel_index to last_ready_index. -static void update_last_ready_subchannel_index_locked(round_robin_lb_policy* p, - size_t last_ready_index) { - GPR_ASSERT(last_ready_index < p->subchannel_list->num_subchannels); - p->last_ready_subchannel_index = last_ready_index; +// Sets last_ready_subchannel_index_ to last_ready_index. +void RoundRobin::UpdateLastReadySubchannelIndexLocked(size_t last_ready_index) { + GPR_ASSERT(last_ready_index < subchannel_list_->num_subchannels); + last_ready_subchannel_index_ = last_ready_index; if (grpc_lb_round_robin_trace.enabled()) { gpr_log(GPR_DEBUG, - "[RR %p] setting last_ready_subchannel_index=%lu (SC %p, CSC %p)", - (void*)p, static_cast(last_ready_index), - (void*)p->subchannel_list->subchannels[last_ready_index].subchannel, - (void*)p->subchannel_list->subchannels[last_ready_index] + "[RR %p] setting last_ready_subchannel_index=%" PRIuPTR + " (SC %p, CSC %p)", + this, last_ready_index, + subchannel_list_->subchannels[last_ready_index].subchannel, + subchannel_list_->subchannels[last_ready_index] .connected_subchannel.get()); } } -static void rr_destroy(grpc_lb_policy* pol) { - round_robin_lb_policy* p = reinterpret_cast(pol); - if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_DEBUG, "[RR %p] Destroying Round Robin policy at %p", - (void*)pol, (void*)pol); +void RoundRobin::HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) { + PickState* pick; + while ((pick = pending_picks_) != nullptr) { + pending_picks_ = pick->next; + if (new_policy->PickLocked(pick)) { + // Synchronous return, schedule closure. + GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); + } } - GPR_ASSERT(p->subchannel_list == nullptr); - GPR_ASSERT(p->latest_pending_subchannel_list == nullptr); - grpc_connectivity_state_destroy(&p->state_tracker); - grpc_subchannel_index_unref(); - gpr_free(p); } -static void rr_shutdown_locked(grpc_lb_policy* pol, - grpc_lb_policy* new_policy) { - round_robin_lb_policy* p = reinterpret_cast(pol); +void RoundRobin::ShutdownLocked() { grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel shutdown"); if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_DEBUG, "[RR %p] Shutting down", p); - } - p->shutdown = true; - grpc_lb_policy_pick_state* pick; - while ((pick = p->pending_picks) != nullptr) { - p->pending_picks = pick->next; - if (new_policy != nullptr) { - // Hand off to new LB policy. - if (grpc_lb_policy_pick_locked(new_policy, pick)) { - // Synchronous return; schedule callback. - GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); - } - } else { - pick->connected_subchannel.reset(); - GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_REF(error)); - } + gpr_log(GPR_DEBUG, "[RR %p] Shutting down", this); + } + shutdown_ = true; + PickState* pick; + while ((pick = pending_picks_) != nullptr) { + pending_picks_ = pick->next; + pick->connected_subchannel.reset(); + GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_REF(error)); } - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_SHUTDOWN, + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "rr_shutdown"); - if (p->subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + if (subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(subchannel_list_, "sl_shutdown_rr_shutdown"); - p->subchannel_list = nullptr; + subchannel_list_ = nullptr; } - if (p->latest_pending_subchannel_list != nullptr) { + if (latest_pending_subchannel_list_ != nullptr) { grpc_lb_subchannel_list_shutdown_and_unref( - p->latest_pending_subchannel_list, "sl_shutdown_pending_rr_shutdown"); - p->latest_pending_subchannel_list = nullptr; + latest_pending_subchannel_list_, "sl_shutdown_pending_rr_shutdown"); + latest_pending_subchannel_list_ = nullptr; } - grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_round_robin_trace, - GRPC_ERROR_CANCELLED); + TryReresolutionLocked(&grpc_lb_round_robin_trace, GRPC_ERROR_CANCELLED); GRPC_ERROR_UNREF(error); } -static void rr_cancel_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick, - grpc_error* error) { - round_robin_lb_policy* p = reinterpret_cast(pol); - grpc_lb_policy_pick_state* pp = p->pending_picks; - p->pending_picks = nullptr; +void RoundRobin::CancelPickLocked(PickState* pick, grpc_error* error) { + PickState* pp = pending_picks_; + pending_picks_ = nullptr; while (pp != nullptr) { - grpc_lb_policy_pick_state* next = pp->next; + PickState* next = pp->next; if (pp == pick) { pick->connected_subchannel.reset(); GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( - "Pick cancelled", &error, 1)); + "Pick Cancelled", &error, 1)); } else { - pp->next = p->pending_picks; - p->pending_picks = pp; + pp->next = pending_picks_; + pending_picks_ = pp; } pp = next; } GRPC_ERROR_UNREF(error); } -static void rr_cancel_picks_locked(grpc_lb_policy* pol, - uint32_t initial_metadata_flags_mask, - uint32_t initial_metadata_flags_eq, - grpc_error* error) { - round_robin_lb_policy* p = reinterpret_cast(pol); - grpc_lb_policy_pick_state* pick = p->pending_picks; - p->pending_picks = nullptr; +void RoundRobin::CancelMatchingPicksLocked(uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq, + grpc_error* error) { + PickState* pick = pending_picks_; + pending_picks_ = nullptr; while (pick != nullptr) { - grpc_lb_policy_pick_state* next = pick->next; + PickState* next = pick->next; if ((pick->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { pick->connected_subchannel.reset(); GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( - "Pick cancelled", &error, 1)); + "Pick Cancelled", &error, 1)); } else { - pick->next = p->pending_picks; - p->pending_picks = pick; + pick->next = pending_picks_; + pending_picks_ = pick; } pick = next; } GRPC_ERROR_UNREF(error); } -static void start_picking_locked(round_robin_lb_policy* p) { - p->started_picking = true; - for (size_t i = 0; i < p->subchannel_list->num_subchannels; i++) { - if (p->subchannel_list->subchannels[i].subchannel != nullptr) { - grpc_lb_subchannel_list_ref_for_connectivity_watch(p->subchannel_list, - "connectivity_watch"); +void RoundRobin::SubchannelListRefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason) { + // TODO(roth): We currently track this ref manually. Once the new + // ClosureRef API is ready and the subchannel_list code has been + // converted to a C++ API, find a way to hold the RefCountedPtr<> + // somewhere (maybe in the subchannel_data object) instead of doing + // this manually. + auto self = Ref(DEBUG_LOCATION, reason); + self.release(); + grpc_lb_subchannel_list_ref(subchannel_list, reason); +} + +void RoundRobin::SubchannelListUnrefForConnectivityWatch( + grpc_lb_subchannel_list* subchannel_list, const char* reason) { + Unref(DEBUG_LOCATION, reason); + grpc_lb_subchannel_list_unref(subchannel_list, reason); +} + +void RoundRobin::StartPickingLocked() { + started_picking_ = true; + for (size_t i = 0; i < subchannel_list_->num_subchannels; i++) { + if (subchannel_list_->subchannels[i].subchannel != nullptr) { + SubchannelListRefForConnectivityWatch(subchannel_list_, + "connectivity_watch"); grpc_lb_subchannel_data_start_connectivity_watch( - &p->subchannel_list->subchannels[i]); + &subchannel_list_->subchannels[i]); } } } -static void rr_exit_idle_locked(grpc_lb_policy* pol) { - round_robin_lb_policy* p = reinterpret_cast(pol); - if (!p->started_picking) { - start_picking_locked(p); +void RoundRobin::ExitIdleLocked() { + if (!started_picking_) { + StartPickingLocked(); } } -static int rr_pick_locked(grpc_lb_policy* pol, - grpc_lb_policy_pick_state* pick) { - round_robin_lb_policy* p = reinterpret_cast(pol); +bool RoundRobin::PickLocked(PickState* pick) { if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_INFO, "[RR %p] Trying to pick (shutdown: %d)", pol, - p->shutdown); + gpr_log(GPR_DEBUG, "[RR %p] Trying to pick (shutdown: %d)", this, + shutdown_); } - GPR_ASSERT(!p->shutdown); - if (p->subchannel_list != nullptr) { - const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); - if (next_ready_index < p->subchannel_list->num_subchannels) { + GPR_ASSERT(!shutdown_); + if (subchannel_list_ != nullptr) { + const size_t next_ready_index = GetNextReadySubchannelIndexLocked(); + if (next_ready_index < subchannel_list_->num_subchannels) { /* readily available, report right away */ grpc_lb_subchannel_data* sd = - &p->subchannel_list->subchannels[next_ready_index]; + &subchannel_list_->subchannels[next_ready_index]; pick->connected_subchannel = sd->connected_subchannel; if (pick->user_data != nullptr) { *pick->user_data = sd->user_data; @@ -273,24 +328,24 @@ static int rr_pick_locked(grpc_lb_policy* pol, GPR_DEBUG, "[RR %p] Picked target <-- Subchannel %p (connected %p) (sl %p, " "index %" PRIuPTR ")", - p, sd->subchannel, pick->connected_subchannel.get(), + this, sd->subchannel, pick->connected_subchannel.get(), sd->subchannel_list, next_ready_index); } /* only advance the last picked pointer if the selection was used */ - update_last_ready_subchannel_index_locked(p, next_ready_index); - return 1; + UpdateLastReadySubchannelIndexLocked(next_ready_index); + return true; } } /* no pick currently available. Save for later in list of pending picks */ - if (!p->started_picking) { - start_picking_locked(p); + if (!started_picking_) { + StartPickingLocked(); } - pick->next = p->pending_picks; - p->pending_picks = pick; - return 0; + pick->next = pending_picks_; + pending_picks_ = pick; + return false; } -static void update_state_counters_locked(grpc_lb_subchannel_data* sd) { +void UpdateStateCountersLocked(grpc_lb_subchannel_data* sd) { grpc_lb_subchannel_list* subchannel_list = sd->subchannel_list; GPR_ASSERT(sd->prev_connectivity_state != GRPC_CHANNEL_SHUTDOWN); GPR_ASSERT(sd->curr_connectivity_state != GRPC_CHANNEL_SHUTDOWN); @@ -318,8 +373,8 @@ static void update_state_counters_locked(grpc_lb_subchannel_data* sd) { * (the grpc_lb_subchannel_data associated with the updated subchannel) and the * subchannel list \a sd belongs to (sd->subchannel_list). \a error will be used * only if the policy transitions to state TRANSIENT_FAILURE. */ -static void update_lb_connectivity_status_locked(grpc_lb_subchannel_data* sd, - grpc_error* error) { +void RoundRobin::UpdateConnectivityStatusLocked(grpc_lb_subchannel_data* sd, + grpc_error* error) { /* In priority order. The first rule to match terminates the search (ie, if we * are on rule n, all previous rules were unfulfilled). * @@ -335,64 +390,61 @@ static void update_lb_connectivity_status_locked(grpc_lb_subchannel_data* sd, * subchannel_list->num_subchannels. */ grpc_lb_subchannel_list* subchannel_list = sd->subchannel_list; - round_robin_lb_policy* p = - reinterpret_cast(subchannel_list->policy); GPR_ASSERT(sd->curr_connectivity_state != GRPC_CHANNEL_IDLE); if (subchannel_list->num_ready > 0) { /* 1) READY */ - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_READY, + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, "rr_ready"); } else if (sd->curr_connectivity_state == GRPC_CHANNEL_CONNECTING) { /* 2) CONNECTING */ - grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_CONNECTING, + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE, "rr_connecting"); } else if (subchannel_list->num_transient_failures == subchannel_list->num_subchannels) { /* 3) TRANSIENT_FAILURE */ - grpc_connectivity_state_set(&p->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - GRPC_ERROR_REF(error), "rr_transient_failure"); + grpc_connectivity_state_set(&state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, + GRPC_ERROR_REF(error), + "rr_exhausted_subchannels"); } GRPC_ERROR_UNREF(error); } -static void rr_connectivity_changed_locked(void* arg, grpc_error* error) { - grpc_lb_subchannel_data* sd = static_cast(arg); - round_robin_lb_policy* p = - reinterpret_cast(sd->subchannel_list->policy); +void RoundRobin::OnConnectivityChangedLocked(void* arg, grpc_error* error) { + grpc_lb_subchannel_data* sd = reinterpret_cast(arg); + RoundRobin* p = reinterpret_cast(sd->subchannel_list->policy); if (grpc_lb_round_robin_trace.enabled()) { gpr_log( GPR_DEBUG, "[RR %p] connectivity changed for subchannel %p, subchannel_list %p: " "prev_state=%s new_state=%s p->shutdown=%d " "sd->subchannel_list->shutting_down=%d error=%s", - (void*)p, (void*)sd->subchannel, (void*)sd->subchannel_list, + p, sd->subchannel, sd->subchannel_list, grpc_connectivity_state_name(sd->prev_connectivity_state), grpc_connectivity_state_name(sd->pending_connectivity_state_unsafe), - p->shutdown, sd->subchannel_list->shutting_down, + p->shutdown_, sd->subchannel_list->shutting_down, grpc_error_string(error)); } GPR_ASSERT(sd->subchannel != nullptr); // If the policy is shutting down, unref and return. - if (p->shutdown) { + if (p->shutdown_) { grpc_lb_subchannel_data_stop_connectivity_watch(sd); grpc_lb_subchannel_data_unref_subchannel(sd, "rr_shutdown"); - grpc_lb_subchannel_list_unref_for_connectivity_watch(sd->subchannel_list, - "rr_shutdown"); + p->SubchannelListUnrefForConnectivityWatch(sd->subchannel_list, + "rr_shutdown"); return; } // If the subchannel list is shutting down, stop watching. if (sd->subchannel_list->shutting_down || error == GRPC_ERROR_CANCELLED) { grpc_lb_subchannel_data_stop_connectivity_watch(sd); grpc_lb_subchannel_data_unref_subchannel(sd, "rr_sl_shutdown"); - grpc_lb_subchannel_list_unref_for_connectivity_watch(sd->subchannel_list, - "rr_sl_shutdown"); + p->SubchannelListUnrefForConnectivityWatch(sd->subchannel_list, + "rr_sl_shutdown"); return; } // If we're still here, the notification must be for a subchannel in // either the current or latest pending subchannel lists. - GPR_ASSERT(sd->subchannel_list == p->subchannel_list || - sd->subchannel_list == p->latest_pending_subchannel_list); + GPR_ASSERT(sd->subchannel_list == p->subchannel_list_ || + sd->subchannel_list == p->latest_pending_subchannel_list_); GPR_ASSERT(sd->pending_connectivity_state_unsafe != GRPC_CHANNEL_SHUTDOWN); // Now that we're inside the combiner, copy the pending connectivity // state (which was set by the connectivity state watcher) to @@ -409,8 +461,7 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) { "Requesting re-resolution", p, sd->subchannel); } - grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_round_robin_trace, - GRPC_ERROR_NONE); + p->TryReresolutionLocked(&grpc_lb_round_robin_trace, GRPC_ERROR_NONE); break; } case GRPC_CHANNEL_READY: { @@ -418,49 +469,47 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) { sd->connected_subchannel = grpc_subchannel_get_connected_subchannel(sd->subchannel); } - if (sd->subchannel_list != p->subchannel_list) { - // promote sd->subchannel_list to p->subchannel_list. + if (sd->subchannel_list != p->subchannel_list_) { + // promote sd->subchannel_list to p->subchannel_list_. // sd->subchannel_list must be equal to - // p->latest_pending_subchannel_list because we have already filtered + // p->latest_pending_subchannel_list_ because we have already filtered // for sds belonging to outdated subchannel lists. - GPR_ASSERT(sd->subchannel_list == p->latest_pending_subchannel_list); + GPR_ASSERT(sd->subchannel_list == p->latest_pending_subchannel_list_); GPR_ASSERT(!sd->subchannel_list->shutting_down); if (grpc_lb_round_robin_trace.enabled()) { - const unsigned long num_subchannels = - p->subchannel_list != nullptr - ? static_cast( - p->subchannel_list->num_subchannels) + const size_t num_subchannels = + p->subchannel_list_ != nullptr + ? p->subchannel_list_->num_subchannels : 0; gpr_log(GPR_DEBUG, - "[RR %p] phasing out subchannel list %p (size %lu) in favor " - "of %p (size %lu)", - p, p->subchannel_list, num_subchannels, sd->subchannel_list, + "[RR %p] phasing out subchannel list %p (size %" PRIuPTR + ") in favor of %p (size %" PRIuPTR ")", + p, p->subchannel_list_, num_subchannels, sd->subchannel_list, num_subchannels); } - if (p->subchannel_list != nullptr) { + if (p->subchannel_list_ != nullptr) { // dispose of the current subchannel_list - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list_, "sl_phase_out_shutdown"); } - p->subchannel_list = p->latest_pending_subchannel_list; - p->latest_pending_subchannel_list = nullptr; + p->subchannel_list_ = p->latest_pending_subchannel_list_; + p->latest_pending_subchannel_list_ = nullptr; } /* at this point we know there's at least one suitable subchannel. Go * ahead and pick one and notify the pending suitors in - * p->pending_picks. This preemptively replicates rr_pick()'s actions. - */ - const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); - GPR_ASSERT(next_ready_index < p->subchannel_list->num_subchannels); + * p->pending_picks. This preemptively replicates rr_pick()'s actions. */ + const size_t next_ready_index = p->GetNextReadySubchannelIndexLocked(); + GPR_ASSERT(next_ready_index < p->subchannel_list_->num_subchannels); grpc_lb_subchannel_data* selected = - &p->subchannel_list->subchannels[next_ready_index]; - if (p->pending_picks != nullptr) { + &p->subchannel_list_->subchannels[next_ready_index]; + if (p->pending_picks_ != nullptr) { // if the selected subchannel is going to be used for the pending // picks, update the last picked pointer - update_last_ready_subchannel_index_locked(p, next_ready_index); + p->UpdateLastReadySubchannelIndexLocked(next_ready_index); } - grpc_lb_policy_pick_state* pick; - while ((pick = p->pending_picks)) { - p->pending_picks = pick->next; + PickState* pick; + while ((pick = p->pending_picks_)) { + p->pending_picks_ = pick->next; pick->connected_subchannel = selected->connected_subchannel; if (pick->user_data != nullptr) { *pick->user_data = selected->user_data; @@ -468,10 +517,9 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) { if (grpc_lb_round_robin_trace.enabled()) { gpr_log(GPR_DEBUG, "[RR %p] Fulfilling pending pick. Target <-- subchannel %p " - "(subchannel_list %p, index %lu)", - (void*)p, (void*)selected->subchannel, - (void*)p->subchannel_list, - static_cast(next_ready_index)); + "(subchannel_list %p, index %" PRIuPTR ")", + p, selected->subchannel, p->subchannel_list_, + next_ready_index); } GRPC_CLOSURE_SCHED(pick->on_complete, GRPC_ERROR_NONE); } @@ -482,40 +530,34 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) { case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_IDLE:; // fallthrough } - // Update state counters and new overall state. - update_state_counters_locked(sd); + // Update state counters. + UpdateStateCountersLocked(sd); // Only update connectivity based on the selected subchannel list. - if (sd->subchannel_list == p->subchannel_list) { - update_lb_connectivity_status_locked(sd, GRPC_ERROR_REF(error)); + if (sd->subchannel_list == p->subchannel_list_) { + p->UpdateConnectivityStatusLocked(sd, GRPC_ERROR_REF(error)); } // Renew notification. grpc_lb_subchannel_data_start_connectivity_watch(sd); } -static grpc_connectivity_state rr_check_connectivity_locked( - grpc_lb_policy* pol, grpc_error** error) { - round_robin_lb_policy* p = reinterpret_cast(pol); - return grpc_connectivity_state_get(&p->state_tracker, error); +grpc_connectivity_state RoundRobin::CheckConnectivityLocked( + grpc_error** error) { + return grpc_connectivity_state_get(&state_tracker_, error); } -static void rr_notify_on_state_change_locked(grpc_lb_policy* pol, - grpc_connectivity_state* current, - grpc_closure* notify) { - round_robin_lb_policy* p = reinterpret_cast(pol); - grpc_connectivity_state_notify_on_state_change(&p->state_tracker, current, +void RoundRobin::NotifyOnStateChangeLocked(grpc_connectivity_state* current, + grpc_closure* notify) { + grpc_connectivity_state_notify_on_state_change(&state_tracker_, current, notify); } -static void rr_ping_one_locked(grpc_lb_policy* pol, grpc_closure* on_initiate, +void RoundRobin::PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) { - round_robin_lb_policy* p = reinterpret_cast(pol); - const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); - if (next_ready_index < p->subchannel_list->num_subchannels) { + const size_t next_ready_index = GetNextReadySubchannelIndexLocked(); + if (next_ready_index < subchannel_list_->num_subchannels) { grpc_lb_subchannel_data* selected = - &p->subchannel_list->subchannels[next_ready_index]; - grpc_core::RefCountedPtr target = - selected->connected_subchannel; - target->Ping(on_initiate, on_ack); + &subchannel_list_->subchannels[next_ready_index]; + selected->connected_subchannel->Ping(on_initiate, on_ack); } else { GRPC_CLOSURE_SCHED(on_initiate, GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Round Robin not connected")); @@ -524,45 +566,41 @@ static void rr_ping_one_locked(grpc_lb_policy* pol, grpc_closure* on_initiate, } } -static void rr_update_locked(grpc_lb_policy* policy, - const grpc_lb_policy_args* args) { - round_robin_lb_policy* p = reinterpret_cast(policy); - const grpc_arg* arg = - grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); +void RoundRobin::UpdateLocked(const grpc_channel_args& args) { + const grpc_arg* arg = grpc_channel_args_find(&args, GRPC_ARG_LB_ADDRESSES); if (arg == nullptr || arg->type != GRPC_ARG_POINTER) { - gpr_log(GPR_ERROR, "[RR %p] update provided no addresses; ignoring", p); + gpr_log(GPR_ERROR, "[RR %p] update provided no addresses; ignoring", this); // If we don't have a current subchannel list, go into TRANSIENT_FAILURE. // Otherwise, keep using the current subchannel list (ignore this update). - if (p->subchannel_list == nullptr) { + if (subchannel_list_ == nullptr) { grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Missing update in args"), "rr_update_missing"); } return; } - grpc_lb_addresses* addresses = - static_cast(arg->value.pointer.p); + grpc_lb_addresses* addresses = (grpc_lb_addresses*)arg->value.pointer.p; if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_DEBUG, "[RR %p] received update with %" PRIuPTR " addresses", p, - addresses->num_addresses); + gpr_log(GPR_DEBUG, "[RR %p] received update with %" PRIuPTR " addresses", + this, addresses->num_addresses); } grpc_lb_subchannel_list* subchannel_list = grpc_lb_subchannel_list_create( - &p->base, &grpc_lb_round_robin_trace, addresses, args, - rr_connectivity_changed_locked); + this, &grpc_lb_round_robin_trace, addresses, combiner(), + client_channel_factory(), args, &RoundRobin::OnConnectivityChangedLocked); if (subchannel_list->num_subchannels == 0) { grpc_connectivity_state_set( - &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + &state_tracker_, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Empty update"), "rr_update_empty"); - if (p->subchannel_list != nullptr) { - grpc_lb_subchannel_list_shutdown_and_unref(p->subchannel_list, + if (subchannel_list_ != nullptr) { + grpc_lb_subchannel_list_shutdown_and_unref(subchannel_list_, "sl_shutdown_empty_update"); } - p->subchannel_list = subchannel_list; // empty list + subchannel_list_ = subchannel_list; // empty list return; } - if (p->started_picking) { + if (started_picking_) { for (size_t i = 0; i < subchannel_list->num_subchannels; ++i) { const grpc_connectivity_state subchannel_state = grpc_subchannel_check_connectivity( @@ -587,87 +625,61 @@ static void rr_update_locked(grpc_lb_policy* policy, ++subchannel_list->num_transient_failures; } } - if (p->latest_pending_subchannel_list != nullptr) { + if (latest_pending_subchannel_list_ != nullptr) { if (grpc_lb_round_robin_trace.enabled()) { gpr_log(GPR_DEBUG, "[RR %p] Shutting down latest pending subchannel list %p, " "about to be replaced by newer latest %p", - (void*)p, (void*)p->latest_pending_subchannel_list, - (void*)subchannel_list); + this, latest_pending_subchannel_list_, subchannel_list); } grpc_lb_subchannel_list_shutdown_and_unref( - p->latest_pending_subchannel_list, "sl_outdated"); + latest_pending_subchannel_list_, "sl_outdated"); } - p->latest_pending_subchannel_list = subchannel_list; + latest_pending_subchannel_list_ = subchannel_list; for (size_t i = 0; i < subchannel_list->num_subchannels; ++i) { /* Watch every new subchannel. A subchannel list becomes active the * moment one of its subchannels is READY. At that moment, we swap * p->subchannel_list for sd->subchannel_list, provided the subchannel * list is still valid (ie, isn't shutting down) */ - grpc_lb_subchannel_list_ref_for_connectivity_watch(subchannel_list, - "connectivity_watch"); + SubchannelListRefForConnectivityWatch(subchannel_list, + "connectivity_watch"); grpc_lb_subchannel_data_start_connectivity_watch( &subchannel_list->subchannels[i]); } } else { // The policy isn't picking yet. Save the update for later, disposing of // previous version if any. - if (p->subchannel_list != nullptr) { + if (subchannel_list_ != nullptr) { grpc_lb_subchannel_list_shutdown_and_unref( - p->subchannel_list, "rr_update_before_started_picking"); + subchannel_list_, "rr_update_before_started_picking"); } - p->subchannel_list = subchannel_list; + subchannel_list_ = subchannel_list; } } -static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { - rr_destroy, - rr_shutdown_locked, - rr_pick_locked, - rr_cancel_pick_locked, - rr_cancel_picks_locked, - rr_ping_one_locked, - rr_exit_idle_locked, - rr_check_connectivity_locked, - rr_notify_on_state_change_locked, - rr_update_locked}; - -static void round_robin_factory_ref(grpc_lb_policy_factory* factory) {} - -static void round_robin_factory_unref(grpc_lb_policy_factory* factory) {} - -static grpc_lb_policy* round_robin_create(grpc_lb_policy_factory* factory, - grpc_lb_policy_args* args) { - GPR_ASSERT(args->client_channel_factory != nullptr); - round_robin_lb_policy* p = - static_cast(gpr_zalloc(sizeof(*p))); - grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable, args->combiner); - grpc_subchannel_index_ref(); - grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, - "round_robin"); - rr_update_locked(&p->base, args); - if (grpc_lb_round_robin_trace.enabled()) { - gpr_log(GPR_DEBUG, "[RR %p] Created with %lu subchannels", (void*)p, - static_cast(p->subchannel_list->num_subchannels)); - } - return &p->base; -} +// +// factory +// -static const grpc_lb_policy_factory_vtable round_robin_factory_vtable = { - round_robin_factory_ref, round_robin_factory_unref, round_robin_create, - "round_robin"}; +class RoundRobinFactory : public LoadBalancingPolicyFactory { + public: + OrphanablePtr CreateLoadBalancingPolicy( + const LoadBalancingPolicy::Args& args) const override { + return OrphanablePtr(New(args)); + } -static grpc_lb_policy_factory round_robin_lb_policy_factory = { - &round_robin_factory_vtable}; + const char* name() const override { return "round_robin"; } +}; -static grpc_lb_policy_factory* round_robin_lb_factory_create() { - return &round_robin_lb_policy_factory; -} +} // namespace -/* Plugin registration */ +} // namespace grpc_core void grpc_lb_policy_round_robin_init() { - grpc_register_lb_policy(round_robin_lb_factory_create()); + grpc_core::LoadBalancingPolicyRegistry::Builder:: + RegisterLoadBalancingPolicyFactory( + grpc_core::UniquePtr( + grpc_core::New())); } void grpc_lb_policy_round_robin_shutdown() {} diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc index e35c5e8db3..f1580e8b91 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc @@ -67,7 +67,7 @@ void grpc_lb_subchannel_data_start_connectivity_watch( } sd->connectivity_notification_pending = true; grpc_subchannel_notify_on_state_change( - sd->subchannel, sd->subchannel_list->policy->interested_parties, + sd->subchannel, sd->subchannel_list->policy->interested_parties(), &sd->pending_connectivity_state_unsafe, &sd->connectivity_changed_closure); } @@ -88,9 +88,10 @@ void grpc_lb_subchannel_data_stop_connectivity_watch( } grpc_lb_subchannel_list* grpc_lb_subchannel_list_create( - grpc_lb_policy* p, grpc_core::TraceFlag* tracer, - const grpc_lb_addresses* addresses, const grpc_lb_policy_args* args, - grpc_iomgr_cb_func connectivity_changed_cb) { + grpc_core::LoadBalancingPolicy* p, grpc_core::TraceFlag* tracer, + const grpc_lb_addresses* addresses, grpc_combiner* combiner, + grpc_client_channel_factory* client_channel_factory, + const grpc_channel_args& args, grpc_iomgr_cb_func connectivity_changed_cb) { grpc_lb_subchannel_list* subchannel_list = static_cast( gpr_zalloc(sizeof(*subchannel_list))); @@ -118,12 +119,11 @@ grpc_lb_subchannel_list* grpc_lb_subchannel_list_create( grpc_arg addr_arg = grpc_create_subchannel_address_arg(&addresses->addresses[i].address); grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove( - args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &addr_arg, - 1); + &args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &addr_arg, 1); gpr_free(addr_arg.value.string); sc_args.args = new_args; grpc_subchannel* subchannel = grpc_client_channel_factory_create_subchannel( - args->client_channel_factory, &sc_args); + client_channel_factory, &sc_args); grpc_channel_args_destroy(new_args); if (subchannel == nullptr) { // Subchannel could not be created. @@ -154,7 +154,7 @@ grpc_lb_subchannel_list* grpc_lb_subchannel_list_create( sd->subchannel = subchannel; GRPC_CLOSURE_INIT(&sd->connectivity_changed_closure, connectivity_changed_cb, sd, - grpc_combiner_scheduler(args->combiner)); + grpc_combiner_scheduler(combiner)); // We assume that the current state is IDLE. If not, we'll get a // callback telling us that. sd->prev_connectivity_state = GRPC_CHANNEL_IDLE; @@ -212,18 +212,6 @@ void grpc_lb_subchannel_list_unref(grpc_lb_subchannel_list* subchannel_list, } } -void grpc_lb_subchannel_list_ref_for_connectivity_watch( - grpc_lb_subchannel_list* subchannel_list, const char* reason) { - GRPC_LB_POLICY_REF(subchannel_list->policy, reason); - grpc_lb_subchannel_list_ref(subchannel_list, reason); -} - -void grpc_lb_subchannel_list_unref_for_connectivity_watch( - grpc_lb_subchannel_list* subchannel_list, const char* reason) { - GRPC_LB_POLICY_UNREF(subchannel_list->policy, reason); - grpc_lb_subchannel_list_unref(subchannel_list, reason); -} - static void subchannel_data_cancel_connectivity_watch( grpc_lb_subchannel_data* sd, const char* reason) { if (sd->subchannel_list->tracer->enabled()) { diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 91537f3afe..7a8f5f1029 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -82,7 +82,7 @@ void grpc_lb_subchannel_data_stop_connectivity_watch( struct grpc_lb_subchannel_list { /** backpointer to owning policy */ - grpc_lb_policy* policy; + grpc_core::LoadBalancingPolicy* policy; grpc_core::TraceFlag* tracer; @@ -115,9 +115,10 @@ struct grpc_lb_subchannel_list { }; grpc_lb_subchannel_list* grpc_lb_subchannel_list_create( - grpc_lb_policy* p, grpc_core::TraceFlag* tracer, - const grpc_lb_addresses* addresses, const grpc_lb_policy_args* args, - grpc_iomgr_cb_func connectivity_changed_cb); + grpc_core::LoadBalancingPolicy* p, grpc_core::TraceFlag* tracer, + const grpc_lb_addresses* addresses, grpc_combiner* combiner, + grpc_client_channel_factory* client_channel_factory, + const grpc_channel_args& args, grpc_iomgr_cb_func connectivity_changed_cb); void grpc_lb_subchannel_list_ref(grpc_lb_subchannel_list* subchannel_list, const char* reason); @@ -125,13 +126,6 @@ void grpc_lb_subchannel_list_ref(grpc_lb_subchannel_list* subchannel_list, void grpc_lb_subchannel_list_unref(grpc_lb_subchannel_list* subchannel_list, const char* reason); -/// Takes and releases refs needed for a connectivity notification. -/// This includes a ref to subchannel_list and a weak ref to the LB policy. -void grpc_lb_subchannel_list_ref_for_connectivity_watch( - grpc_lb_subchannel_list* subchannel_list, const char* reason); -void grpc_lb_subchannel_list_unref_for_connectivity_watch( - grpc_lb_subchannel_list* subchannel_list, const char* reason); - /// Mark subchannel_list as discarded. Unsubscribes all its subchannels. The /// connectivity state notification callback will ultimately unref it. void grpc_lb_subchannel_list_shutdown_and_unref( diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.cc b/src/core/ext/filters/client_channel/lb_policy_factory.cc index f2a800b221..2018aabb91 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.cc +++ b/src/core/ext/filters/client_channel/lb_policy_factory.cc @@ -151,17 +151,3 @@ grpc_lb_addresses* grpc_lb_addresses_find_channel_arg( return nullptr; return static_cast(lb_addresses_arg->value.pointer.p); } - -void grpc_lb_policy_factory_ref(grpc_lb_policy_factory* factory) { - factory->vtable->ref(factory); -} - -void grpc_lb_policy_factory_unref(grpc_lb_policy_factory* factory) { - factory->vtable->unref(factory); -} - -grpc_lb_policy* grpc_lb_policy_factory_create_lb_policy( - grpc_lb_policy_factory* factory, grpc_lb_policy_args* args) { - if (factory == nullptr) return nullptr; - return factory->vtable->create_lb_policy(factory, args); -} diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index 9da231b657..e0e7d8bf5c 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -26,21 +26,20 @@ #include "src/core/ext/filters/client_channel/lb_policy.h" #include "src/core/ext/filters/client_channel/uri_parser.h" +// +// representation of an LB address +// + // Channel arg key for grpc_lb_addresses. #define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses" -typedef struct grpc_lb_policy_factory grpc_lb_policy_factory; -typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable; - -struct grpc_lb_policy_factory { - const grpc_lb_policy_factory_vtable* vtable; -}; - /** A resolved address alongside any LB related information associated with it. * \a user_data, if not NULL, contains opaque data meant to be consumed by the * gRPC LB policy. Note that no all LB policies support \a user_data as input. * Those who don't will simply ignore it and will correspondingly return NULL in * their namesake pick() output argument. */ +// TODO(roth): Once we figure out a better way of handling user_data in +// LB policies, convert these structs to C++ classes. typedef struct grpc_lb_address { grpc_resolved_address address; bool is_balancer; @@ -101,30 +100,27 @@ grpc_arg grpc_lb_addresses_create_channel_arg( grpc_lb_addresses* grpc_lb_addresses_find_channel_arg( const grpc_channel_args* channel_args); -/** Arguments passed to LB policies. */ -struct grpc_lb_policy_args { - grpc_client_channel_factory* client_channel_factory; - grpc_channel_args* args; - grpc_combiner* combiner; -}; +// +// LB policy factory +// -struct grpc_lb_policy_factory_vtable { - void (*ref)(grpc_lb_policy_factory* factory); - void (*unref)(grpc_lb_policy_factory* factory); +namespace grpc_core { - /** Implementation of grpc_lb_policy_factory_create_lb_policy */ - grpc_lb_policy* (*create_lb_policy)(grpc_lb_policy_factory* factory, - grpc_lb_policy_args* args); +class LoadBalancingPolicyFactory { + public: + /// Returns a new LB policy instance. + virtual OrphanablePtr CreateLoadBalancingPolicy( + const LoadBalancingPolicy::Args& args) const GRPC_ABSTRACT; - /** Name for the LB policy this factory implements */ - const char* name; -}; + /// Returns the LB policy name that this factory provides. + /// Caller does NOT take ownership of result. + virtual const char* name() const GRPC_ABSTRACT; -void grpc_lb_policy_factory_ref(grpc_lb_policy_factory* factory); -void grpc_lb_policy_factory_unref(grpc_lb_policy_factory* factory); + virtual ~LoadBalancingPolicyFactory() {} + + GRPC_ABSTRACT_BASE_CLASS +}; -/** Create a lb_policy instance. */ -grpc_lb_policy* grpc_lb_policy_factory_create_lb_policy( - grpc_lb_policy_factory* factory, grpc_lb_policy_args* args); +} // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.cc b/src/core/ext/filters/client_channel/lb_policy_registry.cc index 8414504e8f..f495cdb3c2 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.cc +++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc @@ -21,50 +21,75 @@ #include #include "src/core/lib/gpr/string.h" +#include "src/core/lib/gprpp/inlined_vector.h" -#define MAX_POLICIES 10 +namespace grpc_core { -static grpc_lb_policy_factory* g_all_of_the_lb_policies[MAX_POLICIES]; -static int g_number_of_lb_policies = 0; +namespace { -void grpc_lb_policy_registry_init(void) { g_number_of_lb_policies = 0; } +class RegistryState { + public: + RegistryState() {} -void grpc_lb_policy_registry_shutdown(void) { - int i; - for (i = 0; i < g_number_of_lb_policies; i++) { - grpc_lb_policy_factory_unref(g_all_of_the_lb_policies[i]); + void RegisterLoadBalancingPolicyFactory( + UniquePtr factory) { + for (size_t i = 0; i < factories_.size(); ++i) { + GPR_ASSERT(strcmp(factories_[i]->name(), factory->name()) != 0); + } + factories_.push_back(std::move(factory)); } -} -void grpc_register_lb_policy(grpc_lb_policy_factory* factory) { - int i; - for (i = 0; i < g_number_of_lb_policies; i++) { - GPR_ASSERT(0 != gpr_stricmp(factory->vtable->name, - g_all_of_the_lb_policies[i]->vtable->name)); + LoadBalancingPolicyFactory* GetLoadBalancingPolicyFactory( + const char* name) const { + for (size_t i = 0; i < factories_.size(); ++i) { + if (strcmp(name, factories_[i]->name()) == 0) { + return factories_[i].get(); + } + } + return nullptr; } - GPR_ASSERT(g_number_of_lb_policies != MAX_POLICIES); - grpc_lb_policy_factory_ref(factory); - g_all_of_the_lb_policies[g_number_of_lb_policies++] = factory; -} -static grpc_lb_policy_factory* lookup_factory(const char* name) { - int i; + private: + InlinedVector, 10> factories_; +}; - if (name == nullptr) return nullptr; +RegistryState* g_state = nullptr; - for (i = 0; i < g_number_of_lb_policies; i++) { - if (0 == gpr_stricmp(name, g_all_of_the_lb_policies[i]->vtable->name)) { - return g_all_of_the_lb_policies[i]; - } - } +} // namespace + +// +// LoadBalancingPolicyRegistry::Builder +// - return nullptr; +void LoadBalancingPolicyRegistry::Builder::InitRegistry() { + if (g_state == nullptr) g_state = New(); } -grpc_lb_policy* grpc_lb_policy_create(const char* name, - grpc_lb_policy_args* args) { - grpc_lb_policy_factory* factory = lookup_factory(name); - grpc_lb_policy* lb_policy = - grpc_lb_policy_factory_create_lb_policy(factory, args); - return lb_policy; +void LoadBalancingPolicyRegistry::Builder::ShutdownRegistry() { + Delete(g_state); + g_state = nullptr; } + +void LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory( + UniquePtr factory) { + InitRegistry(); + g_state->RegisterLoadBalancingPolicyFactory(std::move(factory)); +} + +// +// LoadBalancingPolicyRegistry +// + +OrphanablePtr +LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy( + const char* name, const LoadBalancingPolicy::Args& args) { + GPR_ASSERT(g_state != nullptr); + // Find factory. + LoadBalancingPolicyFactory* factory = + g_state->GetLoadBalancingPolicyFactory(name); + if (factory == nullptr) return nullptr; // Specified name not found. + // Create policy via factory. + return factory->CreateLoadBalancingPolicy(args); +} + +} // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h index 5aff79376b..14c21dfe63 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.h +++ b/src/core/ext/filters/client_channel/lb_policy_registry.h @@ -20,21 +20,34 @@ #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H #include "src/core/ext/filters/client_channel/lb_policy_factory.h" +#include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/exec_ctx.h" -/** Initialize the registry and set \a default_factory as the factory to be - * returned when no name is provided in a lookup */ -void grpc_lb_policy_registry_init(void); -void grpc_lb_policy_registry_shutdown(void); +namespace grpc_core { -/** Register a LB policy factory. */ -void grpc_register_lb_policy(grpc_lb_policy_factory* factory); +class LoadBalancingPolicyRegistry { + public: + /// Methods used to create and populate the LoadBalancingPolicyRegistry. + /// NOT THREAD SAFE -- to be used only during global gRPC + /// initialization and shutdown. + class Builder { + public: + /// Global initialization and shutdown hooks. + static void InitRegistry(); + static void ShutdownRegistry(); -/** Create a \a grpc_lb_policy instance. - * - * If \a name is NULL, the default factory from \a grpc_lb_policy_registry_init - * will be returned. */ -grpc_lb_policy* grpc_lb_policy_create(const char* name, - grpc_lb_policy_args* args); + /// Registers an LB policy factory. The factory will be used to create an + /// LB policy whose name matches that of the factory. + static void RegisterLoadBalancingPolicyFactory( + UniquePtr factory); + }; + + /// Creates an LB policy of the type specified by \a name. + static OrphanablePtr CreateLoadBalancingPolicy( + const char* name, const LoadBalancingPolicy::Args& args); +}; + +} // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index c095b5bed9..e00dc3a4ee 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -885,7 +885,6 @@ src/core/ext/filters/client_channel/lb_policy.h \ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 3efaa6e686..0e15ab47ce 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9002,7 +9002,6 @@ ], "headers": [ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", @@ -9015,7 +9014,6 @@ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc", "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc", @@ -9039,7 +9037,6 @@ ], "headers": [ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", @@ -9052,7 +9049,6 @@ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc", "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc", "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc", -- cgit v1.2.3 From 75f0a9fbd21eb28b896f34f28a72c3a1230a72ed Mon Sep 17 00:00:00 2001 From: Yihua Zhang Date: Tue, 20 Feb 2018 10:09:47 -0800 Subject: place security_connector in its own subdirectory --- BUILD | 4 +- CMakeLists.txt | 4 +- Makefile | 6 +- build.yaml | 4 +- config.m4 | 3 +- config.w32 | 3 +- gRPC-C++.podspec | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- grpc.gyp | 2 +- package.xml | 4 +- .../chttp2/client/secure/secure_channel_create.cc | 2 +- src/core/lib/security/credentials/credentials.h | 2 +- .../security_connector/security_connector.cc | 1100 ++++++++++++++++++++ .../security_connector/security_connector.h | 249 +++++ .../lib/security/transport/client_auth_filter.cc | 2 +- .../lib/security/transport/security_connector.cc | 1100 -------------------- .../lib/security/transport/security_connector.h | 249 ----- .../lib/security/transport/security_handshaker.h | 2 +- src/core/lib/surface/init_secure.cc | 2 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/security/security_connector_test.cc | 2 +- test/core/security/ssl_server_fuzzer.cc | 2 +- test/core/surface/secure_channel_create_test.cc | 2 +- test/core/tsi/fake_transport_security_test.cc | 2 +- test/core/tsi/ssl_transport_security_test.cc | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/generated/sources_and_headers.json | 6 +- 28 files changed, 1387 insertions(+), 1385 deletions(-) create mode 100644 src/core/lib/security/security_connector/security_connector.cc create mode 100644 src/core/lib/security/security_connector/security_connector.h delete mode 100644 src/core/lib/security/transport/security_connector.cc delete mode 100644 src/core/lib/security/transport/security_connector.h (limited to 'src/core/ext') diff --git a/BUILD b/BUILD index 31dd9fded7..f4f947c0f6 100644 --- a/BUILD +++ b/BUILD @@ -1328,10 +1328,10 @@ grpc_cc_library( "src/core/lib/security/credentials/oauth2/oauth2_credentials.cc", "src/core/lib/security/credentials/plugin/plugin_credentials.cc", "src/core/lib/security/credentials/ssl/ssl_credentials.cc", + "src/core/lib/security/security_connector/security_connector.cc", "src/core/lib/security/transport/client_auth_filter.cc", "src/core/lib/security/transport/lb_targets_info.cc", "src/core/lib/security/transport/secure_endpoint.cc", - "src/core/lib/security/transport/security_connector.cc", "src/core/lib/security/transport/security_handshaker.cc", "src/core/lib/security/transport/server_auth_filter.cc", "src/core/lib/security/transport/tsi_error.cc", @@ -1351,10 +1351,10 @@ grpc_cc_library( "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/json_util.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 9155d2beb3..64a7dc7890 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -959,10 +959,10 @@ add_library(grpc src/core/lib/security/credentials/oauth2/oauth2_credentials.cc src/core/lib/security/credentials/plugin/plugin_credentials.cc src/core/lib/security/credentials/ssl/ssl_credentials.cc + src/core/lib/security/security_connector/security_connector.cc src/core/lib/security/transport/client_auth_filter.cc src/core/lib/security/transport/lb_targets_info.cc src/core/lib/security/transport/secure_endpoint.cc - src/core/lib/security/transport/security_connector.cc src/core/lib/security/transport/security_handshaker.cc src/core/lib/security/transport/server_auth_filter.cc src/core/lib/security/transport/tsi_error.cc @@ -1323,10 +1323,10 @@ add_library(grpc_cronet src/core/lib/security/credentials/oauth2/oauth2_credentials.cc src/core/lib/security/credentials/plugin/plugin_credentials.cc src/core/lib/security/credentials/ssl/ssl_credentials.cc + src/core/lib/security/security_connector/security_connector.cc src/core/lib/security/transport/client_auth_filter.cc src/core/lib/security/transport/lb_targets_info.cc src/core/lib/security/transport/secure_endpoint.cc - src/core/lib/security/transport/security_connector.cc src/core/lib/security/transport/security_handshaker.cc src/core/lib/security/transport/server_auth_filter.cc src/core/lib/security/transport/tsi_error.cc diff --git a/Makefile b/Makefile index 197142b9ba..ba6c51a7ce 100644 --- a/Makefile +++ b/Makefile @@ -3193,10 +3193,10 @@ LIBGRPC_SRC = \ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \ src/core/lib/security/credentials/plugin/plugin_credentials.cc \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ + src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ - src/core/lib/security/transport/security_connector.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ src/core/lib/security/transport/tsi_error.cc \ @@ -3559,10 +3559,10 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \ src/core/lib/security/credentials/plugin/plugin_credentials.cc \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ + src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ - src/core/lib/security/transport/security_connector.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ src/core/lib/security/transport/tsi_error.cc \ @@ -22219,10 +22219,10 @@ src/core/lib/security/credentials/jwt/jwt_verifier.cc: $(OPENSSL_DEP) src/core/lib/security/credentials/oauth2/oauth2_credentials.cc: $(OPENSSL_DEP) src/core/lib/security/credentials/plugin/plugin_credentials.cc: $(OPENSSL_DEP) src/core/lib/security/credentials/ssl/ssl_credentials.cc: $(OPENSSL_DEP) +src/core/lib/security/security_connector/security_connector.cc: $(OPENSSL_DEP) src/core/lib/security/transport/client_auth_filter.cc: $(OPENSSL_DEP) src/core/lib/security/transport/lb_targets_info.cc: $(OPENSSL_DEP) src/core/lib/security/transport/secure_endpoint.cc: $(OPENSSL_DEP) -src/core/lib/security/transport/security_connector.cc: $(OPENSSL_DEP) src/core/lib/security/transport/security_handshaker.cc: $(OPENSSL_DEP) src/core/lib/security/transport/server_auth_filter.cc: $(OPENSSL_DEP) src/core/lib/security/transport/tsi_error.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 74c76a4072..8ef1cf41e3 100644 --- a/build.yaml +++ b/build.yaml @@ -650,10 +650,10 @@ filegroups: - src/core/lib/security/credentials/oauth2/oauth2_credentials.h - src/core/lib/security/credentials/plugin/plugin_credentials.h - src/core/lib/security/credentials/ssl/ssl_credentials.h + - src/core/lib/security/security_connector/security_connector.h - src/core/lib/security/transport/auth_filters.h - src/core/lib/security/transport/lb_targets_info.h - src/core/lib/security/transport/secure_endpoint.h - - src/core/lib/security/transport/security_connector.h - src/core/lib/security/transport/security_handshaker.h - src/core/lib/security/transport/tsi_error.h - src/core/lib/security/util/json_util.h @@ -673,10 +673,10 @@ filegroups: - src/core/lib/security/credentials/oauth2/oauth2_credentials.cc - src/core/lib/security/credentials/plugin/plugin_credentials.cc - src/core/lib/security/credentials/ssl/ssl_credentials.cc + - src/core/lib/security/security_connector/security_connector.cc - src/core/lib/security/transport/client_auth_filter.cc - src/core/lib/security/transport/lb_targets_info.cc - src/core/lib/security/transport/secure_endpoint.cc - - src/core/lib/security/transport/security_connector.cc - src/core/lib/security/transport/security_handshaker.cc - src/core/lib/security/transport/server_auth_filter.cc - src/core/lib/security/transport/tsi_error.cc diff --git a/config.m4 b/config.m4 index 5bc2e58eed..d95e6dbe3d 100644 --- a/config.m4 +++ b/config.m4 @@ -258,10 +258,10 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \ src/core/lib/security/credentials/plugin/plugin_credentials.cc \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ + src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ - src/core/lib/security/transport/security_connector.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ src/core/lib/security/transport/tsi_error.cc \ @@ -641,6 +641,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/oauth2) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/plugin) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/ssl) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/security_connector) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/util) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/slice) diff --git a/config.w32 b/config.w32 index 2ef122b630..06b0c60b81 100644 --- a/config.w32 +++ b/config.w32 @@ -235,10 +235,10 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\security\\credentials\\oauth2\\oauth2_credentials.cc " + "src\\core\\lib\\security\\credentials\\plugin\\plugin_credentials.cc " + "src\\core\\lib\\security\\credentials\\ssl\\ssl_credentials.cc " + + "src\\core\\lib\\security\\security_connector\\security_connector.cc " + "src\\core\\lib\\security\\transport\\client_auth_filter.cc " + "src\\core\\lib\\security\\transport\\lb_targets_info.cc " + "src\\core\\lib\\security\\transport\\secure_endpoint.cc " + - "src\\core\\lib\\security\\transport\\security_connector.cc " + "src\\core\\lib\\security\\transport\\security_handshaker.cc " + "src\\core\\lib\\security\\transport\\server_auth_filter.cc " + "src\\core\\lib\\security\\transport\\tsi_error.cc " + @@ -654,6 +654,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\oauth2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\plugin"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\ssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\security_connector"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\transport"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\util"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 2f5465c6b8..f80dd3bfef 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -339,10 +339,10 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', 'src/core/lib/security/credentials/plugin/plugin_credentials.h', 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', - 'src/core/lib/security/transport/security_connector.h', 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 95db0d8e7d..6459836692 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -283,10 +283,10 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', 'src/core/lib/security/credentials/plugin/plugin_credentials.h', 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', - 'src/core/lib/security/transport/security_connector.h', 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', @@ -642,10 +642,10 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc', 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', + 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', - 'src/core/lib/security/transport/security_connector.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', 'src/core/lib/security/transport/tsi_error.cc', @@ -772,10 +772,10 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', 'src/core/lib/security/credentials/plugin/plugin_credentials.h', 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', - 'src/core/lib/security/transport/security_connector.h', 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', diff --git a/grpc.gemspec b/grpc.gemspec index ac901da0fe..1690b1d013 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -209,10 +209,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.h ) s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.h ) s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) + s.files += %w( src/core/lib/security/security_connector/security_connector.h ) s.files += %w( src/core/lib/security/transport/auth_filters.h ) s.files += %w( src/core/lib/security/transport/lb_targets_info.h ) s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) - s.files += %w( src/core/lib/security/transport/security_connector.h ) s.files += %w( src/core/lib/security/transport/security_handshaker.h ) s.files += %w( src/core/lib/security/transport/tsi_error.h ) s.files += %w( src/core/lib/security/util/json_util.h ) @@ -572,10 +572,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.cc ) s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.cc ) s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.cc ) + s.files += %w( src/core/lib/security/security_connector/security_connector.cc ) s.files += %w( src/core/lib/security/transport/client_auth_filter.cc ) s.files += %w( src/core/lib/security/transport/lb_targets_info.cc ) s.files += %w( src/core/lib/security/transport/secure_endpoint.cc ) - s.files += %w( src/core/lib/security/transport/security_connector.cc ) s.files += %w( src/core/lib/security/transport/security_handshaker.cc ) s.files += %w( src/core/lib/security/transport/server_auth_filter.cc ) s.files += %w( src/core/lib/security/transport/tsi_error.cc ) diff --git a/grpc.gyp b/grpc.gyp index 44bc7e870c..c9390d306e 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -399,10 +399,10 @@ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc', 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', + 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', - 'src/core/lib/security/transport/security_connector.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', 'src/core/lib/security/transport/tsi_error.cc', diff --git a/package.xml b/package.xml index 5575855648..7c03ccaa92 100644 --- a/package.xml +++ b/package.xml @@ -216,10 +216,10 @@ + - @@ -579,10 +579,10 @@ + - diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index 8f896f70b4..f3cc16d8cc 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -30,8 +30,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/security/transport/lb_targets_info.h" -#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/slice/slice_hash_table.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 4825b65720..50beca897e 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -27,7 +27,7 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/polling_entity.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" struct grpc_http_response; diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc new file mode 100644 index 0000000000..eb88045711 --- /dev/null +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -0,0 +1,1100 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "src/core/lib/security/security_connector/security_connector.h" + +#include +#include + +#include +#include +#include +#include + +#include "src/core/ext/transport/chttp2/alpn/alpn.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/gpr/env.h" +#include "src/core/lib/gpr/host_port.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/iomgr/load_file.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" +#include "src/core/lib/security/transport/lb_targets_info.h" +#include "src/core/lib/security/transport/secure_endpoint.h" +#include "src/core/lib/security/transport/security_handshaker.h" +#include "src/core/tsi/fake_transport_security.h" +#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/tsi/transport_security_adapter.h" + +grpc_core::DebugOnlyTraceFlag grpc_trace_security_connector_refcount( + false, "security_connector_refcount"); + +/* -- Constants. -- */ + +#ifndef INSTALL_PREFIX +static const char* installed_roots_path = "/usr/share/grpc/roots.pem"; +#else +static const char* installed_roots_path = + INSTALL_PREFIX "/share/grpc/roots.pem"; +#endif + +/* -- Overridden default roots. -- */ + +static grpc_ssl_roots_override_callback ssl_roots_override_cb = nullptr; + +void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) { + ssl_roots_override_cb = cb; +} + +/* -- Cipher suites. -- */ + +/* Defines the cipher suites that we accept by default. All these cipher suites + are compliant with HTTP2. */ +#define GRPC_SSL_CIPHER_SUITES \ + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384" + +static gpr_once cipher_suites_once = GPR_ONCE_INIT; +static const char* cipher_suites = nullptr; + +static void init_cipher_suites(void) { + char* overridden = gpr_getenv("GRPC_SSL_CIPHER_SUITES"); + cipher_suites = overridden != nullptr ? overridden : GRPC_SSL_CIPHER_SUITES; +} + +static const char* ssl_cipher_suites(void) { + gpr_once_init(&cipher_suites_once, init_cipher_suites); + return cipher_suites; +} + +/* -- Common methods. -- */ + +/* Returns the first property with that name. */ +const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer, + const char* name) { + size_t i; + if (peer == nullptr) return nullptr; + for (i = 0; i < peer->property_count; i++) { + const tsi_peer_property* property = &peer->properties[i]; + if (name == nullptr && property->name == nullptr) { + return property; + } + if (name != nullptr && property->name != nullptr && + strcmp(property->name, name) == 0) { + return property; + } + } + return nullptr; +} + +void grpc_channel_security_connector_add_handshakers( + grpc_channel_security_connector* connector, + grpc_handshake_manager* handshake_mgr) { + if (connector != nullptr) { + connector->add_handshakers(connector, handshake_mgr); + } +} + +void grpc_server_security_connector_add_handshakers( + grpc_server_security_connector* connector, + grpc_handshake_manager* handshake_mgr) { + if (connector != nullptr) { + connector->add_handshakers(connector, handshake_mgr); + } +} + +void grpc_security_connector_check_peer(grpc_security_connector* sc, + tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + if (sc == nullptr) { + GRPC_CLOSURE_SCHED(on_peer_checked, + GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "cannot check peer -- no security connector")); + tsi_peer_destruct(&peer); + } else { + sc->vtable->check_peer(sc, peer, auth_context, on_peer_checked); + } +} + +int grpc_security_connector_cmp(grpc_security_connector* sc, + grpc_security_connector* other) { + if (sc == nullptr || other == nullptr) return GPR_ICMP(sc, other); + int c = GPR_ICMP(sc->vtable, other->vtable); + if (c != 0) return c; + return sc->vtable->cmp(sc, other); +} + +int grpc_channel_security_connector_cmp(grpc_channel_security_connector* sc1, + grpc_channel_security_connector* sc2) { + GPR_ASSERT(sc1->channel_creds != nullptr); + GPR_ASSERT(sc2->channel_creds != nullptr); + int c = GPR_ICMP(sc1->channel_creds, sc2->channel_creds); + if (c != 0) return c; + c = GPR_ICMP(sc1->request_metadata_creds, sc2->request_metadata_creds); + if (c != 0) return c; + c = GPR_ICMP((void*)sc1->check_call_host, (void*)sc2->check_call_host); + if (c != 0) return c; + c = GPR_ICMP((void*)sc1->cancel_check_call_host, + (void*)sc2->cancel_check_call_host); + if (c != 0) return c; + return GPR_ICMP((void*)sc1->add_handshakers, (void*)sc2->add_handshakers); +} + +int grpc_server_security_connector_cmp(grpc_server_security_connector* sc1, + grpc_server_security_connector* sc2) { + GPR_ASSERT(sc1->server_creds != nullptr); + GPR_ASSERT(sc2->server_creds != nullptr); + int c = GPR_ICMP(sc1->server_creds, sc2->server_creds); + if (c != 0) return c; + return GPR_ICMP((void*)sc1->add_handshakers, (void*)sc2->add_handshakers); +} + +bool grpc_channel_security_connector_check_call_host( + grpc_channel_security_connector* sc, const char* host, + grpc_auth_context* auth_context, grpc_closure* on_call_host_checked, + grpc_error** error) { + if (sc == nullptr || sc->check_call_host == nullptr) { + *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "cannot check call host -- no security connector"); + return true; + } + return sc->check_call_host(sc, host, auth_context, on_call_host_checked, + error); +} + +void grpc_channel_security_connector_cancel_check_call_host( + grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, + grpc_error* error) { + if (sc == nullptr || sc->cancel_check_call_host == nullptr) { + GRPC_ERROR_UNREF(error); + return; + } + sc->cancel_check_call_host(sc, on_call_host_checked, error); +} + +#ifndef NDEBUG +grpc_security_connector* grpc_security_connector_ref( + grpc_security_connector* sc, const char* file, int line, + const char* reason) { + if (sc == nullptr) return nullptr; + if (grpc_trace_security_connector_refcount.enabled()) { + gpr_atm val = gpr_atm_no_barrier_load(&sc->refcount.count); + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "SECURITY_CONNECTOR:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", sc, + val, val + 1, reason); + } +#else +grpc_security_connector* grpc_security_connector_ref( + grpc_security_connector* sc) { + if (sc == nullptr) return nullptr; +#endif + gpr_ref(&sc->refcount); + return sc; +} + +#ifndef NDEBUG +void grpc_security_connector_unref(grpc_security_connector* sc, + const char* file, int line, + const char* reason) { + if (sc == nullptr) return; + if (grpc_trace_security_connector_refcount.enabled()) { + gpr_atm val = gpr_atm_no_barrier_load(&sc->refcount.count); + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "SECURITY_CONNECTOR:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", sc, + val, val - 1, reason); + } +#else +void grpc_security_connector_unref(grpc_security_connector* sc) { + if (sc == nullptr) return; +#endif + if (gpr_unref(&sc->refcount)) sc->vtable->destroy(sc); +} + +static void connector_arg_destroy(void* p) { + GRPC_SECURITY_CONNECTOR_UNREF((grpc_security_connector*)p, + "connector_arg_destroy"); +} + +static void* connector_arg_copy(void* p) { + return GRPC_SECURITY_CONNECTOR_REF((grpc_security_connector*)p, + "connector_arg_copy"); +} + +static int connector_cmp(void* a, void* b) { + return grpc_security_connector_cmp(static_cast(a), + static_cast(b)); +} + +static const grpc_arg_pointer_vtable connector_arg_vtable = { + connector_arg_copy, connector_arg_destroy, connector_cmp}; + +grpc_arg grpc_security_connector_to_arg(grpc_security_connector* sc) { + return grpc_channel_arg_pointer_create((char*)GRPC_ARG_SECURITY_CONNECTOR, sc, + &connector_arg_vtable); +} + +grpc_security_connector* grpc_security_connector_from_arg(const grpc_arg* arg) { + if (strcmp(arg->key, GRPC_ARG_SECURITY_CONNECTOR)) return nullptr; + if (arg->type != GRPC_ARG_POINTER) { + gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, + GRPC_ARG_SECURITY_CONNECTOR); + return nullptr; + } + return static_cast(arg->value.pointer.p); +} + +grpc_security_connector* grpc_security_connector_find_in_args( + const grpc_channel_args* args) { + size_t i; + if (args == nullptr) return nullptr; + for (i = 0; i < args->num_args; i++) { + grpc_security_connector* sc = + grpc_security_connector_from_arg(&args->args[i]); + if (sc != nullptr) return sc; + } + return nullptr; +} + +static tsi_client_certificate_request_type +get_tsi_client_certificate_request_type( + grpc_ssl_client_certificate_request_type grpc_request_type) { + switch (grpc_request_type) { + case GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE: + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY; + + default: + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + } +} + +/* -- Fake implementation. -- */ + +typedef struct { + grpc_channel_security_connector base; + char* target; + char* expected_targets; + bool is_lb_channel; +} grpc_fake_channel_security_connector; + +static void fake_channel_destroy(grpc_security_connector* sc) { + grpc_fake_channel_security_connector* c = + reinterpret_cast(sc); + grpc_call_credentials_unref(c->base.request_metadata_creds); + gpr_free(c->target); + gpr_free(c->expected_targets); + gpr_free(c); +} + +static void fake_server_destroy(grpc_security_connector* sc) { gpr_free(sc); } + +static bool fake_check_target(const char* target_type, const char* target, + const char* set_str) { + GPR_ASSERT(target_type != nullptr); + GPR_ASSERT(target != nullptr); + char** set = nullptr; + size_t set_size = 0; + gpr_string_split(set_str, ",", &set, &set_size); + bool found = false; + for (size_t i = 0; i < set_size; ++i) { + if (set[i] != nullptr && strcmp(target, set[i]) == 0) found = true; + } + for (size_t i = 0; i < set_size; ++i) { + gpr_free(set[i]); + } + gpr_free(set); + return found; +} + +static void fake_secure_name_check(const char* target, + const char* expected_targets, + bool is_lb_channel) { + if (expected_targets == nullptr) return; + char** lbs_and_backends = nullptr; + size_t lbs_and_backends_size = 0; + bool success = false; + gpr_string_split(expected_targets, ";", &lbs_and_backends, + &lbs_and_backends_size); + if (lbs_and_backends_size > 2 || lbs_and_backends_size == 0) { + gpr_log(GPR_ERROR, "Invalid expected targets arg value: '%s'", + expected_targets); + goto done; + } + if (is_lb_channel) { + if (lbs_and_backends_size != 2) { + gpr_log(GPR_ERROR, + "Invalid expected targets arg value: '%s'. Expectations for LB " + "channels must be of the form 'be1,be2,be3,...;lb1,lb2,...", + expected_targets); + goto done; + } + if (!fake_check_target("LB", target, lbs_and_backends[1])) { + gpr_log(GPR_ERROR, "LB target '%s' not found in expected set '%s'", + target, lbs_and_backends[1]); + goto done; + } + success = true; + } else { + if (!fake_check_target("Backend", target, lbs_and_backends[0])) { + gpr_log(GPR_ERROR, "Backend target '%s' not found in expected set '%s'", + target, lbs_and_backends[0]); + goto done; + } + success = true; + } +done: + for (size_t i = 0; i < lbs_and_backends_size; ++i) { + gpr_free(lbs_and_backends[i]); + } + gpr_free(lbs_and_backends); + if (!success) abort(); +} + +static void fake_check_peer(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + const char* prop_name; + grpc_error* error = GRPC_ERROR_NONE; + *auth_context = nullptr; + if (peer.property_count != 1) { + error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Fake peers should only have 1 property."); + goto end; + } + prop_name = peer.properties[0].name; + if (prop_name == nullptr || + strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { + char* msg; + gpr_asprintf(&msg, "Unexpected property in fake peer: %s.", + prop_name == nullptr ? "" : prop_name); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + gpr_free(msg); + goto end; + } + if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, + peer.properties[0].value.length)) { + error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid value for cert type property."); + goto end; + } + *auth_context = grpc_auth_context_create(nullptr); + grpc_auth_context_add_cstring_property( + *auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, + GRPC_FAKE_TRANSPORT_SECURITY_TYPE); +end: + GRPC_CLOSURE_SCHED(on_peer_checked, error); + tsi_peer_destruct(&peer); +} + +static void fake_channel_check_peer(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + fake_check_peer(sc, peer, auth_context, on_peer_checked); + grpc_fake_channel_security_connector* c = + reinterpret_cast(sc); + fake_secure_name_check(c->target, c->expected_targets, c->is_lb_channel); +} + +static void fake_server_check_peer(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + fake_check_peer(sc, peer, auth_context, on_peer_checked); +} + +static int fake_channel_cmp(grpc_security_connector* sc1, + grpc_security_connector* sc2) { + grpc_fake_channel_security_connector* c1 = + reinterpret_cast(sc1); + grpc_fake_channel_security_connector* c2 = + reinterpret_cast(sc2); + int c = grpc_channel_security_connector_cmp(&c1->base, &c2->base); + if (c != 0) return c; + c = strcmp(c1->target, c2->target); + if (c != 0) return c; + if (c1->expected_targets == nullptr || c2->expected_targets == nullptr) { + c = GPR_ICMP(c1->expected_targets, c2->expected_targets); + } else { + c = strcmp(c1->expected_targets, c2->expected_targets); + } + if (c != 0) return c; + return GPR_ICMP(c1->is_lb_channel, c2->is_lb_channel); +} + +static int fake_server_cmp(grpc_security_connector* sc1, + grpc_security_connector* sc2) { + return grpc_server_security_connector_cmp( + reinterpret_cast(sc1), + reinterpret_cast(sc2)); +} + +static bool fake_channel_check_call_host(grpc_channel_security_connector* sc, + const char* host, + grpc_auth_context* auth_context, + grpc_closure* on_call_host_checked, + grpc_error** error) { + return true; +} + +static void fake_channel_cancel_check_call_host( + grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, + grpc_error* error) { + GRPC_ERROR_UNREF(error); +} + +static void fake_channel_add_handshakers( + grpc_channel_security_connector* sc, + grpc_handshake_manager* handshake_mgr) { + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create( + tsi_create_fake_handshaker(true /* is_client */), &sc->base)); +} + +static void fake_server_add_handshakers(grpc_server_security_connector* sc, + grpc_handshake_manager* handshake_mgr) { + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create( + tsi_create_fake_handshaker(false /* is_client */), &sc->base)); +} + +static grpc_security_connector_vtable fake_channel_vtable = { + fake_channel_destroy, fake_channel_check_peer, fake_channel_cmp}; + +static grpc_security_connector_vtable fake_server_vtable = { + fake_server_destroy, fake_server_check_peer, fake_server_cmp}; + +grpc_channel_security_connector* grpc_fake_channel_security_connector_create( + grpc_channel_credentials* channel_creds, + grpc_call_credentials* request_metadata_creds, const char* target, + const grpc_channel_args* args) { + grpc_fake_channel_security_connector* c = + static_cast( + gpr_zalloc(sizeof(*c))); + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; + c->base.base.vtable = &fake_channel_vtable; + c->base.channel_creds = channel_creds; + c->base.request_metadata_creds = + grpc_call_credentials_ref(request_metadata_creds); + c->base.check_call_host = fake_channel_check_call_host; + c->base.cancel_check_call_host = fake_channel_cancel_check_call_host; + c->base.add_handshakers = fake_channel_add_handshakers; + c->target = gpr_strdup(target); + const char* expected_targets = grpc_fake_transport_get_expected_targets(args); + c->expected_targets = gpr_strdup(expected_targets); + c->is_lb_channel = (grpc_lb_targets_info_find_in_args(args) != nullptr); + return &c->base; +} + +grpc_server_security_connector* grpc_fake_server_security_connector_create( + grpc_server_credentials* server_creds) { + grpc_server_security_connector* c = + static_cast( + gpr_zalloc(sizeof(grpc_server_security_connector))); + gpr_ref_init(&c->base.refcount, 1); + c->base.vtable = &fake_server_vtable; + c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; + c->server_creds = server_creds; + c->add_handshakers = fake_server_add_handshakers; + return c; +} + +/* --- Ssl implementation. --- */ + +typedef struct { + grpc_channel_security_connector base; + tsi_ssl_client_handshaker_factory* client_handshaker_factory; + char* target_name; + char* overridden_target_name; +} grpc_ssl_channel_security_connector; + +typedef struct { + grpc_server_security_connector base; + tsi_ssl_server_handshaker_factory* server_handshaker_factory; +} grpc_ssl_server_security_connector; + +static bool server_connector_has_cert_config_fetcher( + grpc_ssl_server_security_connector* c) { + GPR_ASSERT(c != nullptr); + grpc_ssl_server_credentials* server_creds = + reinterpret_cast(c->base.server_creds); + GPR_ASSERT(server_creds != nullptr); + return server_creds->certificate_config_fetcher.cb != nullptr; +} + +static void ssl_channel_destroy(grpc_security_connector* sc) { + grpc_ssl_channel_security_connector* c = + reinterpret_cast(sc); + grpc_channel_credentials_unref(c->base.channel_creds); + grpc_call_credentials_unref(c->base.request_metadata_creds); + tsi_ssl_client_handshaker_factory_unref(c->client_handshaker_factory); + c->client_handshaker_factory = nullptr; + if (c->target_name != nullptr) gpr_free(c->target_name); + if (c->overridden_target_name != nullptr) gpr_free(c->overridden_target_name); + gpr_free(sc); +} + +static void ssl_server_destroy(grpc_security_connector* sc) { + grpc_ssl_server_security_connector* c = + reinterpret_cast(sc); + grpc_server_credentials_unref(c->base.server_creds); + tsi_ssl_server_handshaker_factory_unref(c->server_handshaker_factory); + c->server_handshaker_factory = nullptr; + gpr_free(sc); +} + +static void ssl_channel_add_handshakers(grpc_channel_security_connector* sc, + grpc_handshake_manager* handshake_mgr) { + grpc_ssl_channel_security_connector* c = + reinterpret_cast(sc); + // Instantiate TSI handshaker. + tsi_handshaker* tsi_hs = nullptr; + tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker( + c->client_handshaker_factory, + c->overridden_target_name != nullptr ? c->overridden_target_name + : c->target_name, + &tsi_hs); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", + tsi_result_to_string(result)); + return; + } + // Create handshakers. + grpc_handshake_manager_add( + handshake_mgr, grpc_security_handshaker_create( + tsi_create_adapter_handshaker(tsi_hs), &sc->base)); +} + +static const char** fill_alpn_protocol_strings(size_t* num_alpn_protocols) { + GPR_ASSERT(num_alpn_protocols != nullptr); + *num_alpn_protocols = grpc_chttp2_num_alpn_versions(); + const char** alpn_protocol_strings = static_cast( + gpr_malloc(sizeof(const char*) * (*num_alpn_protocols))); + for (size_t i = 0; i < *num_alpn_protocols; i++) { + alpn_protocol_strings[i] = grpc_chttp2_get_alpn_version_index(i); + } + return alpn_protocol_strings; +} + +/* Attempts to replace the server_handshaker_factory with a new factory using + * the provided grpc_ssl_server_certificate_config. Should new factory creation + * fail, the existing factory will not be replaced. Returns true on success (new + * factory created). */ +static bool try_replace_server_handshaker_factory( + grpc_ssl_server_security_connector* sc, + const grpc_ssl_server_certificate_config* config) { + if (config == nullptr) { + gpr_log(GPR_ERROR, + "Server certificate config callback returned invalid (NULL) " + "config."); + return false; + } + gpr_log(GPR_DEBUG, "Using new server certificate config (%p).", config); + + size_t num_alpn_protocols = 0; + const char** alpn_protocol_strings = + fill_alpn_protocol_strings(&num_alpn_protocols); + tsi_ssl_pem_key_cert_pair* cert_pairs = grpc_convert_grpc_to_tsi_cert_pairs( + config->pem_key_cert_pairs, config->num_key_cert_pairs); + tsi_ssl_server_handshaker_factory* new_handshaker_factory = nullptr; + grpc_ssl_server_credentials* server_creds = + reinterpret_cast(sc->base.server_creds); + tsi_result result = tsi_create_ssl_server_handshaker_factory_ex( + cert_pairs, config->num_key_cert_pairs, config->pem_root_certs, + get_tsi_client_certificate_request_type( + server_creds->config.client_certificate_request), + ssl_cipher_suites(), alpn_protocol_strings, + static_cast(num_alpn_protocols), &new_handshaker_factory); + gpr_free(cert_pairs); + gpr_free((void*)alpn_protocol_strings); + + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + return false; + } + tsi_ssl_server_handshaker_factory_unref(sc->server_handshaker_factory); + sc->server_handshaker_factory = new_handshaker_factory; + return true; +} + +/* Attempts to fetch the server certificate config if a callback is available. + * Current certificate config will continue to be used if the callback returns + * an error. Returns true if new credentials were sucessfully loaded. */ +static bool try_fetch_ssl_server_credentials( + grpc_ssl_server_security_connector* sc) { + grpc_ssl_server_certificate_config* certificate_config = nullptr; + bool status; + + GPR_ASSERT(sc != nullptr); + if (!server_connector_has_cert_config_fetcher(sc)) return false; + + grpc_ssl_server_credentials* server_creds = + reinterpret_cast(sc->base.server_creds); + grpc_ssl_certificate_config_reload_status cb_result = + server_creds->certificate_config_fetcher.cb( + server_creds->certificate_config_fetcher.user_data, + &certificate_config); + if (cb_result == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED) { + gpr_log(GPR_DEBUG, "No change in SSL server credentials."); + status = false; + } else if (cb_result == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_NEW) { + status = try_replace_server_handshaker_factory(sc, certificate_config); + } else { + // Log error, continue using previously-loaded credentials. + gpr_log(GPR_ERROR, + "Failed fetching new server credentials, continuing to " + "use previously-loaded credentials."); + status = false; + } + + if (certificate_config != nullptr) { + grpc_ssl_server_certificate_config_destroy(certificate_config); + } + return status; +} + +static void ssl_server_add_handshakers(grpc_server_security_connector* sc, + grpc_handshake_manager* handshake_mgr) { + grpc_ssl_server_security_connector* c = + reinterpret_cast(sc); + // Instantiate TSI handshaker. + try_fetch_ssl_server_credentials(c); + tsi_handshaker* tsi_hs = nullptr; + tsi_result result = tsi_ssl_server_handshaker_factory_create_handshaker( + c->server_handshaker_factory, &tsi_hs); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", + tsi_result_to_string(result)); + return; + } + // Create handshakers. + grpc_handshake_manager_add( + handshake_mgr, grpc_security_handshaker_create( + tsi_create_adapter_handshaker(tsi_hs), &sc->base)); +} + +static int ssl_host_matches_name(const tsi_peer* peer, const char* peer_name) { + char* allocated_name = nullptr; + int r; + + if (strchr(peer_name, ':') != nullptr) { + char* ignored_port; + gpr_split_host_port(peer_name, &allocated_name, &ignored_port); + gpr_free(ignored_port); + peer_name = allocated_name; + if (!peer_name) return 0; + } + r = tsi_ssl_peer_matches_name(peer, peer_name); + gpr_free(allocated_name); + return r; +} + +grpc_auth_context* tsi_ssl_peer_to_auth_context(const tsi_peer* peer) { + size_t i; + grpc_auth_context* ctx = nullptr; + const char* peer_identity_property_name = nullptr; + + /* The caller has checked the certificate type property. */ + GPR_ASSERT(peer->property_count >= 1); + ctx = grpc_auth_context_create(nullptr); + grpc_auth_context_add_cstring_property( + ctx, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, + GRPC_SSL_TRANSPORT_SECURITY_TYPE); + for (i = 0; i < peer->property_count; i++) { + const tsi_peer_property* prop = &peer->properties[i]; + if (prop->name == nullptr) continue; + if (strcmp(prop->name, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY) == 0) { + /* If there is no subject alt name, have the CN as the identity. */ + if (peer_identity_property_name == nullptr) { + peer_identity_property_name = GRPC_X509_CN_PROPERTY_NAME; + } + grpc_auth_context_add_property(ctx, GRPC_X509_CN_PROPERTY_NAME, + prop->value.data, prop->value.length); + } else if (strcmp(prop->name, + TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) { + peer_identity_property_name = GRPC_X509_SAN_PROPERTY_NAME; + grpc_auth_context_add_property(ctx, GRPC_X509_SAN_PROPERTY_NAME, + prop->value.data, prop->value.length); + } else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) { + grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME, + prop->value.data, prop->value.length); + } + } + if (peer_identity_property_name != nullptr) { + GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name( + ctx, peer_identity_property_name) == 1); + } + return ctx; +} + +static grpc_error* ssl_check_peer(grpc_security_connector* sc, + const char* peer_name, const tsi_peer* peer, + grpc_auth_context** auth_context) { + /* Check the ALPN. */ + const tsi_peer_property* p = + tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); + if (p == nullptr) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Cannot check peer: missing selected ALPN property."); + } + if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Cannot check peer: invalid ALPN value."); + } + + /* Check the peer name if specified. */ + if (peer_name != nullptr && !ssl_host_matches_name(peer, peer_name)) { + char* msg; + gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name); + grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + gpr_free(msg); + return error; + } + *auth_context = tsi_ssl_peer_to_auth_context(peer); + return GRPC_ERROR_NONE; +} + +static void ssl_channel_check_peer(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + grpc_ssl_channel_security_connector* c = + reinterpret_cast(sc); + grpc_error* error = ssl_check_peer(sc, + c->overridden_target_name != nullptr + ? c->overridden_target_name + : c->target_name, + &peer, auth_context); + GRPC_CLOSURE_SCHED(on_peer_checked, error); + tsi_peer_destruct(&peer); +} + +static void ssl_server_check_peer(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked) { + grpc_error* error = ssl_check_peer(sc, nullptr, &peer, auth_context); + tsi_peer_destruct(&peer); + GRPC_CLOSURE_SCHED(on_peer_checked, error); +} + +static int ssl_channel_cmp(grpc_security_connector* sc1, + grpc_security_connector* sc2) { + grpc_ssl_channel_security_connector* c1 = + reinterpret_cast(sc1); + grpc_ssl_channel_security_connector* c2 = + reinterpret_cast(sc2); + int c = grpc_channel_security_connector_cmp(&c1->base, &c2->base); + if (c != 0) return c; + c = strcmp(c1->target_name, c2->target_name); + if (c != 0) return c; + return (c1->overridden_target_name == nullptr || + c2->overridden_target_name == nullptr) + ? GPR_ICMP(c1->overridden_target_name, c2->overridden_target_name) + : strcmp(c1->overridden_target_name, c2->overridden_target_name); +} + +static int ssl_server_cmp(grpc_security_connector* sc1, + grpc_security_connector* sc2) { + return grpc_server_security_connector_cmp( + reinterpret_cast(sc1), + reinterpret_cast(sc2)); +} + +static void add_shallow_auth_property_to_peer(tsi_peer* peer, + const grpc_auth_property* prop, + const char* tsi_prop_name) { + tsi_peer_property* tsi_prop = &peer->properties[peer->property_count++]; + tsi_prop->name = const_cast(tsi_prop_name); + tsi_prop->value.data = prop->value; + tsi_prop->value.length = prop->value_length; +} + +tsi_peer tsi_shallow_peer_from_ssl_auth_context( + const grpc_auth_context* auth_context) { + size_t max_num_props = 0; + grpc_auth_property_iterator it; + const grpc_auth_property* prop; + tsi_peer peer; + memset(&peer, 0, sizeof(peer)); + + it = grpc_auth_context_property_iterator(auth_context); + while (grpc_auth_property_iterator_next(&it) != nullptr) max_num_props++; + + if (max_num_props > 0) { + peer.properties = static_cast( + gpr_malloc(max_num_props * sizeof(tsi_peer_property))); + it = grpc_auth_context_property_iterator(auth_context); + while ((prop = grpc_auth_property_iterator_next(&it)) != nullptr) { + if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer( + &peer, prop, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY); + } else if (strcmp(prop->name, GRPC_X509_CN_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer( + &peer, prop, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); + } else if (strcmp(prop->name, GRPC_X509_PEM_CERT_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer(&peer, prop, + TSI_X509_PEM_CERT_PROPERTY); + } + } + } + return peer; +} + +void tsi_shallow_peer_destruct(tsi_peer* peer) { + if (peer->properties != nullptr) gpr_free(peer->properties); +} + +static bool ssl_channel_check_call_host(grpc_channel_security_connector* sc, + const char* host, + grpc_auth_context* auth_context, + grpc_closure* on_call_host_checked, + grpc_error** error) { + grpc_ssl_channel_security_connector* c = + reinterpret_cast(sc); + grpc_security_status status = GRPC_SECURITY_ERROR; + tsi_peer peer = tsi_shallow_peer_from_ssl_auth_context(auth_context); + if (ssl_host_matches_name(&peer, host)) status = GRPC_SECURITY_OK; + /* If the target name was overridden, then the original target_name was + 'checked' transitively during the previous peer check at the end of the + handshake. */ + if (c->overridden_target_name != nullptr && + strcmp(host, c->target_name) == 0) { + status = GRPC_SECURITY_OK; + } + if (status != GRPC_SECURITY_OK) { + *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "call host does not match SSL server name"); + } + tsi_shallow_peer_destruct(&peer); + return true; +} + +static void ssl_channel_cancel_check_call_host( + grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, + grpc_error* error) { + GRPC_ERROR_UNREF(error); +} + +static grpc_security_connector_vtable ssl_channel_vtable = { + ssl_channel_destroy, ssl_channel_check_peer, ssl_channel_cmp}; + +static grpc_security_connector_vtable ssl_server_vtable = { + ssl_server_destroy, ssl_server_check_peer, ssl_server_cmp}; + +/* returns a NULL terminated slice. */ +static grpc_slice compute_default_pem_root_certs_once(void) { + grpc_slice result = grpc_empty_slice(); + + /* First try to load the roots from the environment. */ + char* default_root_certs_path = + gpr_getenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR); + if (default_root_certs_path != nullptr) { + GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(default_root_certs_path, 1, &result)); + gpr_free(default_root_certs_path); + } + + /* Try overridden roots if needed. */ + grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; + if (GRPC_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != nullptr) { + char* pem_root_certs = nullptr; + ovrd_res = ssl_roots_override_cb(&pem_root_certs); + if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { + GPR_ASSERT(pem_root_certs != nullptr); + result = grpc_slice_from_copied_buffer( + pem_root_certs, + strlen(pem_root_certs) + 1); // NULL terminator. + } + gpr_free(pem_root_certs); + } + + /* Fall back to installed certs if needed. */ + if (GRPC_SLICE_IS_EMPTY(result) && + ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { + GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(installed_roots_path, 1, &result)); + } + return result; +} + +static grpc_slice default_pem_root_certs; + +static void init_default_pem_root_certs(void) { + default_pem_root_certs = compute_default_pem_root_certs_once(); +} + +grpc_slice grpc_get_default_ssl_roots_for_testing(void) { + return compute_default_pem_root_certs_once(); +} + +const char* grpc_get_default_ssl_roots(void) { + /* TODO(jboeuf@google.com): Maybe revisit the approach which consists in + loading all the roots once for the lifetime of the process. */ + static gpr_once once = GPR_ONCE_INIT; + gpr_once_init(&once, init_default_pem_root_certs); + return GRPC_SLICE_IS_EMPTY(default_pem_root_certs) + ? nullptr + : reinterpret_cast + GRPC_SLICE_START_PTR(default_pem_root_certs); +} + +grpc_security_status grpc_ssl_channel_security_connector_create( + grpc_channel_credentials* channel_creds, + grpc_call_credentials* request_metadata_creds, + const grpc_ssl_config* config, const char* target_name, + const char* overridden_target_name, grpc_channel_security_connector** sc) { + size_t num_alpn_protocols = 0; + const char** alpn_protocol_strings = + fill_alpn_protocol_strings(&num_alpn_protocols); + tsi_result result = TSI_OK; + grpc_ssl_channel_security_connector* c; + const char* pem_root_certs; + char* port; + bool has_key_cert_pair; + + if (config == nullptr || target_name == nullptr) { + gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name."); + goto error; + } + if (config->pem_root_certs == nullptr) { + pem_root_certs = grpc_get_default_ssl_roots(); + if (pem_root_certs == nullptr) { + gpr_log(GPR_ERROR, "Could not get default pem root certs."); + goto error; + } + } else { + pem_root_certs = config->pem_root_certs; + } + + c = static_cast( + gpr_zalloc(sizeof(grpc_ssl_channel_security_connector))); + + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.vtable = &ssl_channel_vtable; + c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; + c->base.channel_creds = grpc_channel_credentials_ref(channel_creds); + c->base.request_metadata_creds = + grpc_call_credentials_ref(request_metadata_creds); + c->base.check_call_host = ssl_channel_check_call_host; + c->base.cancel_check_call_host = ssl_channel_cancel_check_call_host; + c->base.add_handshakers = ssl_channel_add_handshakers; + gpr_split_host_port(target_name, &c->target_name, &port); + gpr_free(port); + if (overridden_target_name != nullptr) { + c->overridden_target_name = gpr_strdup(overridden_target_name); + } + + has_key_cert_pair = config->pem_key_cert_pair != nullptr && + config->pem_key_cert_pair->private_key != nullptr && + config->pem_key_cert_pair->cert_chain != nullptr; + result = tsi_create_ssl_client_handshaker_factory( + has_key_cert_pair ? config->pem_key_cert_pair : nullptr, pem_root_certs, + ssl_cipher_suites(), alpn_protocol_strings, + static_cast(num_alpn_protocols), &c->client_handshaker_factory); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + ssl_channel_destroy(&c->base.base); + *sc = nullptr; + goto error; + } + *sc = &c->base; + gpr_free((void*)alpn_protocol_strings); + return GRPC_SECURITY_OK; + +error: + gpr_free((void*)alpn_protocol_strings); + return GRPC_SECURITY_ERROR; +} + +static grpc_ssl_server_security_connector* +grpc_ssl_server_security_connector_initialize( + grpc_server_credentials* server_creds) { + grpc_ssl_server_security_connector* c = + static_cast( + gpr_zalloc(sizeof(grpc_ssl_server_security_connector))); + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; + c->base.base.vtable = &ssl_server_vtable; + c->base.add_handshakers = ssl_server_add_handshakers; + c->base.server_creds = grpc_server_credentials_ref(server_creds); + return c; +} + +grpc_security_status grpc_ssl_server_security_connector_create( + grpc_server_credentials* gsc, grpc_server_security_connector** sc) { + tsi_result result = TSI_OK; + grpc_ssl_server_credentials* server_credentials = + reinterpret_cast(gsc); + grpc_security_status retval = GRPC_SECURITY_OK; + + GPR_ASSERT(server_credentials != nullptr); + GPR_ASSERT(sc != nullptr); + + grpc_ssl_server_security_connector* c = + grpc_ssl_server_security_connector_initialize(gsc); + if (server_connector_has_cert_config_fetcher(c)) { + // Load initial credentials from certificate_config_fetcher: + if (!try_fetch_ssl_server_credentials(c)) { + gpr_log(GPR_ERROR, "Failed loading SSL server credentials from fetcher."); + retval = GRPC_SECURITY_ERROR; + } + } else { + size_t num_alpn_protocols = 0; + const char** alpn_protocol_strings = + fill_alpn_protocol_strings(&num_alpn_protocols); + result = tsi_create_ssl_server_handshaker_factory_ex( + server_credentials->config.pem_key_cert_pairs, + server_credentials->config.num_key_cert_pairs, + server_credentials->config.pem_root_certs, + get_tsi_client_certificate_request_type( + server_credentials->config.client_certificate_request), + ssl_cipher_suites(), alpn_protocol_strings, + static_cast(num_alpn_protocols), + &c->server_handshaker_factory); + gpr_free((void*)alpn_protocol_strings); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + retval = GRPC_SECURITY_ERROR; + } + } + + if (retval == GRPC_SECURITY_OK) { + *sc = &c->base; + } else { + if (c != nullptr) ssl_server_destroy(&c->base.base); + if (sc != nullptr) *sc = nullptr; + } + return retval; +} diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h new file mode 100644 index 0000000000..0c972a7125 --- /dev/null +++ b/src/core/lib/security/security_connector/security_connector.h @@ -0,0 +1,249 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H +#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H + +#include + +#include + +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/tsi/transport_security_interface.h" + +extern grpc_core::DebugOnlyTraceFlag grpc_trace_security_connector_refcount; + +/* --- status enum. --- */ + +typedef enum { GRPC_SECURITY_OK = 0, GRPC_SECURITY_ERROR } grpc_security_status; + +/* --- URL schemes. --- */ + +#define GRPC_SSL_URL_SCHEME "https" +#define GRPC_FAKE_SECURITY_URL_SCHEME "http+fake_security" + +/* --- security_connector object. --- + + A security connector object represents away to configure the underlying + transport security mechanism and check the resulting trusted peer. */ + +typedef struct grpc_security_connector grpc_security_connector; + +#define GRPC_ARG_SECURITY_CONNECTOR "grpc.security_connector" + +typedef struct { + void (*destroy)(grpc_security_connector* sc); + void (*check_peer)(grpc_security_connector* sc, tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked); + int (*cmp)(grpc_security_connector* sc, grpc_security_connector* other); +} grpc_security_connector_vtable; + +struct grpc_security_connector { + const grpc_security_connector_vtable* vtable; + gpr_refcount refcount; + const char* url_scheme; +}; + +/* Refcounting. */ +#ifndef NDEBUG +#define GRPC_SECURITY_CONNECTOR_REF(p, r) \ + grpc_security_connector_ref((p), __FILE__, __LINE__, (r)) +#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) \ + grpc_security_connector_unref((p), __FILE__, __LINE__, (r)) +grpc_security_connector* grpc_security_connector_ref( + grpc_security_connector* policy, const char* file, int line, + const char* reason); +void grpc_security_connector_unref(grpc_security_connector* policy, + const char* file, int line, + const char* reason); +#else +#define GRPC_SECURITY_CONNECTOR_REF(p, r) grpc_security_connector_ref((p)) +#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) grpc_security_connector_unref((p)) +grpc_security_connector* grpc_security_connector_ref( + grpc_security_connector* policy); +void grpc_security_connector_unref(grpc_security_connector* policy); +#endif + +/* Check the peer. Callee takes ownership of the peer object. + When done, sets *auth_context and invokes on_peer_checked. */ +void grpc_security_connector_check_peer(grpc_security_connector* sc, + tsi_peer peer, + grpc_auth_context** auth_context, + grpc_closure* on_peer_checked); + +/* Compares two security connectors. */ +int grpc_security_connector_cmp(grpc_security_connector* sc, + grpc_security_connector* other); + +/* Util to encapsulate the connector in a channel arg. */ +grpc_arg grpc_security_connector_to_arg(grpc_security_connector* sc); + +/* Util to get the connector from a channel arg. */ +grpc_security_connector* grpc_security_connector_from_arg(const grpc_arg* arg); + +/* Util to find the connector from channel args. */ +grpc_security_connector* grpc_security_connector_find_in_args( + const grpc_channel_args* args); + +/* --- channel_security_connector object. --- + + A channel security connector object represents a way to configure the + underlying transport security mechanism on the client side. */ + +typedef struct grpc_channel_security_connector grpc_channel_security_connector; + +struct grpc_channel_security_connector { + grpc_security_connector base; + grpc_channel_credentials* channel_creds; + grpc_call_credentials* request_metadata_creds; + bool (*check_call_host)(grpc_channel_security_connector* sc, const char* host, + grpc_auth_context* auth_context, + grpc_closure* on_call_host_checked, + grpc_error** error); + void (*cancel_check_call_host)(grpc_channel_security_connector* sc, + grpc_closure* on_call_host_checked, + grpc_error* error); + void (*add_handshakers)(grpc_channel_security_connector* sc, + grpc_handshake_manager* handshake_mgr); +}; + +/// A helper function for use in grpc_security_connector_cmp() implementations. +int grpc_channel_security_connector_cmp(grpc_channel_security_connector* sc1, + grpc_channel_security_connector* sc2); + +/// Checks that the host that will be set for a call is acceptable. +/// Returns true if completed synchronously, in which case \a error will +/// be set to indicate the result. Otherwise, \a on_call_host_checked +/// will be invoked when complete. +bool grpc_channel_security_connector_check_call_host( + grpc_channel_security_connector* sc, const char* host, + grpc_auth_context* auth_context, grpc_closure* on_call_host_checked, + grpc_error** error); + +/// Cancels a pending asychronous call to +/// grpc_channel_security_connector_check_call_host() with +/// \a on_call_host_checked as its callback. +void grpc_channel_security_connector_cancel_check_call_host( + grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, + grpc_error* error); + +/* Registers handshakers with \a handshake_mgr. */ +void grpc_channel_security_connector_add_handshakers( + grpc_channel_security_connector* connector, + grpc_handshake_manager* handshake_mgr); + +/* --- server_security_connector object. --- + + A server security connector object represents a way to configure the + underlying transport security mechanism on the server side. */ + +typedef struct grpc_server_security_connector grpc_server_security_connector; + +struct grpc_server_security_connector { + grpc_security_connector base; + grpc_server_credentials* server_creds; + void (*add_handshakers)(grpc_server_security_connector* sc, + grpc_handshake_manager* handshake_mgr); +}; + +/// A helper function for use in grpc_security_connector_cmp() implementations. +int grpc_server_security_connector_cmp(grpc_server_security_connector* sc1, + grpc_server_security_connector* sc2); + +void grpc_server_security_connector_add_handshakers( + grpc_server_security_connector* sc, grpc_handshake_manager* handshake_mgr); + +/* --- Creation security connectors. --- */ + +/* For TESTING ONLY! + Creates a fake connector that emulates real channel security. */ +grpc_channel_security_connector* grpc_fake_channel_security_connector_create( + grpc_channel_credentials* channel_creds, + grpc_call_credentials* request_metadata_creds, const char* target, + const grpc_channel_args* args); + +/* For TESTING ONLY! + Creates a fake connector that emulates real server security. */ +grpc_server_security_connector* grpc_fake_server_security_connector_create( + grpc_server_credentials* server_creds); + +/* Config for ssl clients. */ + +typedef struct { + tsi_ssl_pem_key_cert_pair* pem_key_cert_pair; + char* pem_root_certs; +} grpc_ssl_config; + +/* Creates an SSL channel_security_connector. + - request_metadata_creds is the credentials object which metadata + will be sent with each request. This parameter can be NULL. + - config is the SSL config to be used for the SSL channel establishment. + - is_client should be 0 for a server or a non-0 value for a client. + - secure_peer_name is the secure peer name that should be checked in + grpc_channel_security_connector_check_peer. This parameter may be NULL in + which case the peer name will not be checked. Note that if this parameter + is not NULL, then, pem_root_certs should not be NULL either. + - sc is a pointer on the connector to be created. + This function returns GRPC_SECURITY_OK in case of success or a + specific error code otherwise. +*/ +grpc_security_status grpc_ssl_channel_security_connector_create( + grpc_channel_credentials* channel_creds, + grpc_call_credentials* request_metadata_creds, + const grpc_ssl_config* config, const char* target_name, + const char* overridden_target_name, grpc_channel_security_connector** sc); + +/* Gets the default ssl roots. Returns NULL if not found. */ +const char* grpc_get_default_ssl_roots(void); + +/* Exposed for TESTING ONLY!. */ +grpc_slice grpc_get_default_ssl_roots_for_testing(void); + +/* Config for ssl servers. */ +typedef struct { + tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs; + size_t num_key_cert_pairs; + char* pem_root_certs; + grpc_ssl_client_certificate_request_type client_certificate_request; +} grpc_ssl_server_config; + +/* Creates an SSL server_security_connector. + - config is the SSL config to be used for the SSL channel establishment. + - sc is a pointer on the connector to be created. + This function returns GRPC_SECURITY_OK in case of success or a + specific error code otherwise. +*/ +grpc_security_status grpc_ssl_server_security_connector_create( + grpc_server_credentials* server_credentials, + grpc_server_security_connector** sc); + +/* Util. */ +const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer, + const char* name); + +/* Exposed for testing only. */ +grpc_auth_context* tsi_ssl_peer_to_auth_context(const tsi_peer* peer); +tsi_peer tsi_shallow_peer_from_ssl_auth_context( + const grpc_auth_context* auth_context); +void tsi_shallow_peer_destruct(tsi_peer* peer); + +#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H */ diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index d2313807ff..506f5a0666 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -29,7 +29,7 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/lib/security/transport/security_connector.cc b/src/core/lib/security/transport/security_connector.cc deleted file mode 100644 index bd5da1bbd2..0000000000 --- a/src/core/lib/security/transport/security_connector.cc +++ /dev/null @@ -1,1100 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "src/core/lib/security/transport/security_connector.h" - -#include -#include - -#include -#include -#include -#include - -#include "src/core/ext/transport/chttp2/alpn/alpn.h" -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/gpr/env.h" -#include "src/core/lib/gpr/host_port.h" -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/iomgr/load_file.h" -#include "src/core/lib/security/context/security_context.h" -#include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/credentials/fake/fake_credentials.h" -#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" -#include "src/core/lib/security/transport/lb_targets_info.h" -#include "src/core/lib/security/transport/secure_endpoint.h" -#include "src/core/lib/security/transport/security_handshaker.h" -#include "src/core/tsi/fake_transport_security.h" -#include "src/core/tsi/ssl_transport_security.h" -#include "src/core/tsi/transport_security_adapter.h" - -grpc_core::DebugOnlyTraceFlag grpc_trace_security_connector_refcount( - false, "security_connector_refcount"); - -/* -- Constants. -- */ - -#ifndef INSTALL_PREFIX -static const char* installed_roots_path = "/usr/share/grpc/roots.pem"; -#else -static const char* installed_roots_path = - INSTALL_PREFIX "/share/grpc/roots.pem"; -#endif - -/* -- Overridden default roots. -- */ - -static grpc_ssl_roots_override_callback ssl_roots_override_cb = nullptr; - -void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) { - ssl_roots_override_cb = cb; -} - -/* -- Cipher suites. -- */ - -/* Defines the cipher suites that we accept by default. All these cipher suites - are compliant with HTTP2. */ -#define GRPC_SSL_CIPHER_SUITES \ - "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384" - -static gpr_once cipher_suites_once = GPR_ONCE_INIT; -static const char* cipher_suites = nullptr; - -static void init_cipher_suites(void) { - char* overridden = gpr_getenv("GRPC_SSL_CIPHER_SUITES"); - cipher_suites = overridden != nullptr ? overridden : GRPC_SSL_CIPHER_SUITES; -} - -static const char* ssl_cipher_suites(void) { - gpr_once_init(&cipher_suites_once, init_cipher_suites); - return cipher_suites; -} - -/* -- Common methods. -- */ - -/* Returns the first property with that name. */ -const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer, - const char* name) { - size_t i; - if (peer == nullptr) return nullptr; - for (i = 0; i < peer->property_count; i++) { - const tsi_peer_property* property = &peer->properties[i]; - if (name == nullptr && property->name == nullptr) { - return property; - } - if (name != nullptr && property->name != nullptr && - strcmp(property->name, name) == 0) { - return property; - } - } - return nullptr; -} - -void grpc_channel_security_connector_add_handshakers( - grpc_channel_security_connector* connector, - grpc_handshake_manager* handshake_mgr) { - if (connector != nullptr) { - connector->add_handshakers(connector, handshake_mgr); - } -} - -void grpc_server_security_connector_add_handshakers( - grpc_server_security_connector* connector, - grpc_handshake_manager* handshake_mgr) { - if (connector != nullptr) { - connector->add_handshakers(connector, handshake_mgr); - } -} - -void grpc_security_connector_check_peer(grpc_security_connector* sc, - tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - if (sc == nullptr) { - GRPC_CLOSURE_SCHED(on_peer_checked, - GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "cannot check peer -- no security connector")); - tsi_peer_destruct(&peer); - } else { - sc->vtable->check_peer(sc, peer, auth_context, on_peer_checked); - } -} - -int grpc_security_connector_cmp(grpc_security_connector* sc, - grpc_security_connector* other) { - if (sc == nullptr || other == nullptr) return GPR_ICMP(sc, other); - int c = GPR_ICMP(sc->vtable, other->vtable); - if (c != 0) return c; - return sc->vtable->cmp(sc, other); -} - -int grpc_channel_security_connector_cmp(grpc_channel_security_connector* sc1, - grpc_channel_security_connector* sc2) { - GPR_ASSERT(sc1->channel_creds != nullptr); - GPR_ASSERT(sc2->channel_creds != nullptr); - int c = GPR_ICMP(sc1->channel_creds, sc2->channel_creds); - if (c != 0) return c; - c = GPR_ICMP(sc1->request_metadata_creds, sc2->request_metadata_creds); - if (c != 0) return c; - c = GPR_ICMP((void*)sc1->check_call_host, (void*)sc2->check_call_host); - if (c != 0) return c; - c = GPR_ICMP((void*)sc1->cancel_check_call_host, - (void*)sc2->cancel_check_call_host); - if (c != 0) return c; - return GPR_ICMP((void*)sc1->add_handshakers, (void*)sc2->add_handshakers); -} - -int grpc_server_security_connector_cmp(grpc_server_security_connector* sc1, - grpc_server_security_connector* sc2) { - GPR_ASSERT(sc1->server_creds != nullptr); - GPR_ASSERT(sc2->server_creds != nullptr); - int c = GPR_ICMP(sc1->server_creds, sc2->server_creds); - if (c != 0) return c; - return GPR_ICMP((void*)sc1->add_handshakers, (void*)sc2->add_handshakers); -} - -bool grpc_channel_security_connector_check_call_host( - grpc_channel_security_connector* sc, const char* host, - grpc_auth_context* auth_context, grpc_closure* on_call_host_checked, - grpc_error** error) { - if (sc == nullptr || sc->check_call_host == nullptr) { - *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "cannot check call host -- no security connector"); - return true; - } - return sc->check_call_host(sc, host, auth_context, on_call_host_checked, - error); -} - -void grpc_channel_security_connector_cancel_check_call_host( - grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, - grpc_error* error) { - if (sc == nullptr || sc->cancel_check_call_host == nullptr) { - GRPC_ERROR_UNREF(error); - return; - } - sc->cancel_check_call_host(sc, on_call_host_checked, error); -} - -#ifndef NDEBUG -grpc_security_connector* grpc_security_connector_ref( - grpc_security_connector* sc, const char* file, int line, - const char* reason) { - if (sc == nullptr) return nullptr; - if (grpc_trace_security_connector_refcount.enabled()) { - gpr_atm val = gpr_atm_no_barrier_load(&sc->refcount.count); - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "SECURITY_CONNECTOR:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", sc, - val, val + 1, reason); - } -#else -grpc_security_connector* grpc_security_connector_ref( - grpc_security_connector* sc) { - if (sc == nullptr) return nullptr; -#endif - gpr_ref(&sc->refcount); - return sc; -} - -#ifndef NDEBUG -void grpc_security_connector_unref(grpc_security_connector* sc, - const char* file, int line, - const char* reason) { - if (sc == nullptr) return; - if (grpc_trace_security_connector_refcount.enabled()) { - gpr_atm val = gpr_atm_no_barrier_load(&sc->refcount.count); - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "SECURITY_CONNECTOR:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", sc, - val, val - 1, reason); - } -#else -void grpc_security_connector_unref(grpc_security_connector* sc) { - if (sc == nullptr) return; -#endif - if (gpr_unref(&sc->refcount)) sc->vtable->destroy(sc); -} - -static void connector_arg_destroy(void* p) { - GRPC_SECURITY_CONNECTOR_UNREF((grpc_security_connector*)p, - "connector_arg_destroy"); -} - -static void* connector_arg_copy(void* p) { - return GRPC_SECURITY_CONNECTOR_REF((grpc_security_connector*)p, - "connector_arg_copy"); -} - -static int connector_cmp(void* a, void* b) { - return grpc_security_connector_cmp(static_cast(a), - static_cast(b)); -} - -static const grpc_arg_pointer_vtable connector_arg_vtable = { - connector_arg_copy, connector_arg_destroy, connector_cmp}; - -grpc_arg grpc_security_connector_to_arg(grpc_security_connector* sc) { - return grpc_channel_arg_pointer_create((char*)GRPC_ARG_SECURITY_CONNECTOR, sc, - &connector_arg_vtable); -} - -grpc_security_connector* grpc_security_connector_from_arg(const grpc_arg* arg) { - if (strcmp(arg->key, GRPC_ARG_SECURITY_CONNECTOR)) return nullptr; - if (arg->type != GRPC_ARG_POINTER) { - gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, - GRPC_ARG_SECURITY_CONNECTOR); - return nullptr; - } - return static_cast(arg->value.pointer.p); -} - -grpc_security_connector* grpc_security_connector_find_in_args( - const grpc_channel_args* args) { - size_t i; - if (args == nullptr) return nullptr; - for (i = 0; i < args->num_args; i++) { - grpc_security_connector* sc = - grpc_security_connector_from_arg(&args->args[i]); - if (sc != nullptr) return sc; - } - return nullptr; -} - -static tsi_client_certificate_request_type -get_tsi_client_certificate_request_type( - grpc_ssl_client_certificate_request_type grpc_request_type) { - switch (grpc_request_type) { - case GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE: - return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; - - case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - return TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; - - case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: - return TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY; - - case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; - - case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: - return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY; - - default: - return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; - } -} - -/* -- Fake implementation. -- */ - -typedef struct { - grpc_channel_security_connector base; - char* target; - char* expected_targets; - bool is_lb_channel; -} grpc_fake_channel_security_connector; - -static void fake_channel_destroy(grpc_security_connector* sc) { - grpc_fake_channel_security_connector* c = - reinterpret_cast(sc); - grpc_call_credentials_unref(c->base.request_metadata_creds); - gpr_free(c->target); - gpr_free(c->expected_targets); - gpr_free(c); -} - -static void fake_server_destroy(grpc_security_connector* sc) { gpr_free(sc); } - -static bool fake_check_target(const char* target_type, const char* target, - const char* set_str) { - GPR_ASSERT(target_type != nullptr); - GPR_ASSERT(target != nullptr); - char** set = nullptr; - size_t set_size = 0; - gpr_string_split(set_str, ",", &set, &set_size); - bool found = false; - for (size_t i = 0; i < set_size; ++i) { - if (set[i] != nullptr && strcmp(target, set[i]) == 0) found = true; - } - for (size_t i = 0; i < set_size; ++i) { - gpr_free(set[i]); - } - gpr_free(set); - return found; -} - -static void fake_secure_name_check(const char* target, - const char* expected_targets, - bool is_lb_channel) { - if (expected_targets == nullptr) return; - char** lbs_and_backends = nullptr; - size_t lbs_and_backends_size = 0; - bool success = false; - gpr_string_split(expected_targets, ";", &lbs_and_backends, - &lbs_and_backends_size); - if (lbs_and_backends_size > 2 || lbs_and_backends_size == 0) { - gpr_log(GPR_ERROR, "Invalid expected targets arg value: '%s'", - expected_targets); - goto done; - } - if (is_lb_channel) { - if (lbs_and_backends_size != 2) { - gpr_log(GPR_ERROR, - "Invalid expected targets arg value: '%s'. Expectations for LB " - "channels must be of the form 'be1,be2,be3,...;lb1,lb2,...", - expected_targets); - goto done; - } - if (!fake_check_target("LB", target, lbs_and_backends[1])) { - gpr_log(GPR_ERROR, "LB target '%s' not found in expected set '%s'", - target, lbs_and_backends[1]); - goto done; - } - success = true; - } else { - if (!fake_check_target("Backend", target, lbs_and_backends[0])) { - gpr_log(GPR_ERROR, "Backend target '%s' not found in expected set '%s'", - target, lbs_and_backends[0]); - goto done; - } - success = true; - } -done: - for (size_t i = 0; i < lbs_and_backends_size; ++i) { - gpr_free(lbs_and_backends[i]); - } - gpr_free(lbs_and_backends); - if (!success) abort(); -} - -static void fake_check_peer(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - const char* prop_name; - grpc_error* error = GRPC_ERROR_NONE; - *auth_context = nullptr; - if (peer.property_count != 1) { - error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Fake peers should only have 1 property."); - goto end; - } - prop_name = peer.properties[0].name; - if (prop_name == nullptr || - strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { - char* msg; - gpr_asprintf(&msg, "Unexpected property in fake peer: %s.", - prop_name == nullptr ? "" : prop_name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - goto end; - } - if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, - peer.properties[0].value.length)) { - error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Invalid value for cert type property."); - goto end; - } - *auth_context = grpc_auth_context_create(nullptr); - grpc_auth_context_add_cstring_property( - *auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, - GRPC_FAKE_TRANSPORT_SECURITY_TYPE); -end: - GRPC_CLOSURE_SCHED(on_peer_checked, error); - tsi_peer_destruct(&peer); -} - -static void fake_channel_check_peer(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - fake_check_peer(sc, peer, auth_context, on_peer_checked); - grpc_fake_channel_security_connector* c = - reinterpret_cast(sc); - fake_secure_name_check(c->target, c->expected_targets, c->is_lb_channel); -} - -static void fake_server_check_peer(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - fake_check_peer(sc, peer, auth_context, on_peer_checked); -} - -static int fake_channel_cmp(grpc_security_connector* sc1, - grpc_security_connector* sc2) { - grpc_fake_channel_security_connector* c1 = - reinterpret_cast(sc1); - grpc_fake_channel_security_connector* c2 = - reinterpret_cast(sc2); - int c = grpc_channel_security_connector_cmp(&c1->base, &c2->base); - if (c != 0) return c; - c = strcmp(c1->target, c2->target); - if (c != 0) return c; - if (c1->expected_targets == nullptr || c2->expected_targets == nullptr) { - c = GPR_ICMP(c1->expected_targets, c2->expected_targets); - } else { - c = strcmp(c1->expected_targets, c2->expected_targets); - } - if (c != 0) return c; - return GPR_ICMP(c1->is_lb_channel, c2->is_lb_channel); -} - -static int fake_server_cmp(grpc_security_connector* sc1, - grpc_security_connector* sc2) { - return grpc_server_security_connector_cmp( - reinterpret_cast(sc1), - reinterpret_cast(sc2)); -} - -static bool fake_channel_check_call_host(grpc_channel_security_connector* sc, - const char* host, - grpc_auth_context* auth_context, - grpc_closure* on_call_host_checked, - grpc_error** error) { - return true; -} - -static void fake_channel_cancel_check_call_host( - grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, - grpc_error* error) { - GRPC_ERROR_UNREF(error); -} - -static void fake_channel_add_handshakers( - grpc_channel_security_connector* sc, - grpc_handshake_manager* handshake_mgr) { - grpc_handshake_manager_add( - handshake_mgr, - grpc_security_handshaker_create( - tsi_create_fake_handshaker(true /* is_client */), &sc->base)); -} - -static void fake_server_add_handshakers(grpc_server_security_connector* sc, - grpc_handshake_manager* handshake_mgr) { - grpc_handshake_manager_add( - handshake_mgr, - grpc_security_handshaker_create( - tsi_create_fake_handshaker(false /* is_client */), &sc->base)); -} - -static grpc_security_connector_vtable fake_channel_vtable = { - fake_channel_destroy, fake_channel_check_peer, fake_channel_cmp}; - -static grpc_security_connector_vtable fake_server_vtable = { - fake_server_destroy, fake_server_check_peer, fake_server_cmp}; - -grpc_channel_security_connector* grpc_fake_channel_security_connector_create( - grpc_channel_credentials* channel_creds, - grpc_call_credentials* request_metadata_creds, const char* target, - const grpc_channel_args* args) { - grpc_fake_channel_security_connector* c = - static_cast( - gpr_zalloc(sizeof(*c))); - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->base.base.vtable = &fake_channel_vtable; - c->base.channel_creds = channel_creds; - c->base.request_metadata_creds = - grpc_call_credentials_ref(request_metadata_creds); - c->base.check_call_host = fake_channel_check_call_host; - c->base.cancel_check_call_host = fake_channel_cancel_check_call_host; - c->base.add_handshakers = fake_channel_add_handshakers; - c->target = gpr_strdup(target); - const char* expected_targets = grpc_fake_transport_get_expected_targets(args); - c->expected_targets = gpr_strdup(expected_targets); - c->is_lb_channel = (grpc_lb_targets_info_find_in_args(args) != nullptr); - return &c->base; -} - -grpc_server_security_connector* grpc_fake_server_security_connector_create( - grpc_server_credentials* server_creds) { - grpc_server_security_connector* c = - static_cast( - gpr_zalloc(sizeof(grpc_server_security_connector))); - gpr_ref_init(&c->base.refcount, 1); - c->base.vtable = &fake_server_vtable; - c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->server_creds = server_creds; - c->add_handshakers = fake_server_add_handshakers; - return c; -} - -/* --- Ssl implementation. --- */ - -typedef struct { - grpc_channel_security_connector base; - tsi_ssl_client_handshaker_factory* client_handshaker_factory; - char* target_name; - char* overridden_target_name; -} grpc_ssl_channel_security_connector; - -typedef struct { - grpc_server_security_connector base; - tsi_ssl_server_handshaker_factory* server_handshaker_factory; -} grpc_ssl_server_security_connector; - -static bool server_connector_has_cert_config_fetcher( - grpc_ssl_server_security_connector* c) { - GPR_ASSERT(c != nullptr); - grpc_ssl_server_credentials* server_creds = - reinterpret_cast(c->base.server_creds); - GPR_ASSERT(server_creds != nullptr); - return server_creds->certificate_config_fetcher.cb != nullptr; -} - -static void ssl_channel_destroy(grpc_security_connector* sc) { - grpc_ssl_channel_security_connector* c = - reinterpret_cast(sc); - grpc_channel_credentials_unref(c->base.channel_creds); - grpc_call_credentials_unref(c->base.request_metadata_creds); - tsi_ssl_client_handshaker_factory_unref(c->client_handshaker_factory); - c->client_handshaker_factory = nullptr; - if (c->target_name != nullptr) gpr_free(c->target_name); - if (c->overridden_target_name != nullptr) gpr_free(c->overridden_target_name); - gpr_free(sc); -} - -static void ssl_server_destroy(grpc_security_connector* sc) { - grpc_ssl_server_security_connector* c = - reinterpret_cast(sc); - grpc_server_credentials_unref(c->base.server_creds); - tsi_ssl_server_handshaker_factory_unref(c->server_handshaker_factory); - c->server_handshaker_factory = nullptr; - gpr_free(sc); -} - -static void ssl_channel_add_handshakers(grpc_channel_security_connector* sc, - grpc_handshake_manager* handshake_mgr) { - grpc_ssl_channel_security_connector* c = - reinterpret_cast(sc); - // Instantiate TSI handshaker. - tsi_handshaker* tsi_hs = nullptr; - tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker( - c->client_handshaker_factory, - c->overridden_target_name != nullptr ? c->overridden_target_name - : c->target_name, - &tsi_hs); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", - tsi_result_to_string(result)); - return; - } - // Create handshakers. - grpc_handshake_manager_add( - handshake_mgr, grpc_security_handshaker_create( - tsi_create_adapter_handshaker(tsi_hs), &sc->base)); -} - -static const char** fill_alpn_protocol_strings(size_t* num_alpn_protocols) { - GPR_ASSERT(num_alpn_protocols != nullptr); - *num_alpn_protocols = grpc_chttp2_num_alpn_versions(); - const char** alpn_protocol_strings = static_cast( - gpr_malloc(sizeof(const char*) * (*num_alpn_protocols))); - for (size_t i = 0; i < *num_alpn_protocols; i++) { - alpn_protocol_strings[i] = grpc_chttp2_get_alpn_version_index(i); - } - return alpn_protocol_strings; -} - -/* Attempts to replace the server_handshaker_factory with a new factory using - * the provided grpc_ssl_server_certificate_config. Should new factory creation - * fail, the existing factory will not be replaced. Returns true on success (new - * factory created). */ -static bool try_replace_server_handshaker_factory( - grpc_ssl_server_security_connector* sc, - const grpc_ssl_server_certificate_config* config) { - if (config == nullptr) { - gpr_log(GPR_ERROR, - "Server certificate config callback returned invalid (NULL) " - "config."); - return false; - } - gpr_log(GPR_DEBUG, "Using new server certificate config (%p).", config); - - size_t num_alpn_protocols = 0; - const char** alpn_protocol_strings = - fill_alpn_protocol_strings(&num_alpn_protocols); - tsi_ssl_pem_key_cert_pair* cert_pairs = grpc_convert_grpc_to_tsi_cert_pairs( - config->pem_key_cert_pairs, config->num_key_cert_pairs); - tsi_ssl_server_handshaker_factory* new_handshaker_factory = nullptr; - grpc_ssl_server_credentials* server_creds = - reinterpret_cast(sc->base.server_creds); - tsi_result result = tsi_create_ssl_server_handshaker_factory_ex( - cert_pairs, config->num_key_cert_pairs, config->pem_root_certs, - get_tsi_client_certificate_request_type( - server_creds->config.client_certificate_request), - ssl_cipher_suites(), alpn_protocol_strings, - static_cast(num_alpn_protocols), &new_handshaker_factory); - gpr_free(cert_pairs); - gpr_free((void*)alpn_protocol_strings); - - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - return false; - } - tsi_ssl_server_handshaker_factory_unref(sc->server_handshaker_factory); - sc->server_handshaker_factory = new_handshaker_factory; - return true; -} - -/* Attempts to fetch the server certificate config if a callback is available. - * Current certificate config will continue to be used if the callback returns - * an error. Returns true if new credentials were sucessfully loaded. */ -static bool try_fetch_ssl_server_credentials( - grpc_ssl_server_security_connector* sc) { - grpc_ssl_server_certificate_config* certificate_config = nullptr; - bool status; - - GPR_ASSERT(sc != nullptr); - if (!server_connector_has_cert_config_fetcher(sc)) return false; - - grpc_ssl_server_credentials* server_creds = - reinterpret_cast(sc->base.server_creds); - grpc_ssl_certificate_config_reload_status cb_result = - server_creds->certificate_config_fetcher.cb( - server_creds->certificate_config_fetcher.user_data, - &certificate_config); - if (cb_result == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED) { - gpr_log(GPR_DEBUG, "No change in SSL server credentials."); - status = false; - } else if (cb_result == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_NEW) { - status = try_replace_server_handshaker_factory(sc, certificate_config); - } else { - // Log error, continue using previously-loaded credentials. - gpr_log(GPR_ERROR, - "Failed fetching new server credentials, continuing to " - "use previously-loaded credentials."); - status = false; - } - - if (certificate_config != nullptr) { - grpc_ssl_server_certificate_config_destroy(certificate_config); - } - return status; -} - -static void ssl_server_add_handshakers(grpc_server_security_connector* sc, - grpc_handshake_manager* handshake_mgr) { - grpc_ssl_server_security_connector* c = - reinterpret_cast(sc); - // Instantiate TSI handshaker. - try_fetch_ssl_server_credentials(c); - tsi_handshaker* tsi_hs = nullptr; - tsi_result result = tsi_ssl_server_handshaker_factory_create_handshaker( - c->server_handshaker_factory, &tsi_hs); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", - tsi_result_to_string(result)); - return; - } - // Create handshakers. - grpc_handshake_manager_add( - handshake_mgr, grpc_security_handshaker_create( - tsi_create_adapter_handshaker(tsi_hs), &sc->base)); -} - -static int ssl_host_matches_name(const tsi_peer* peer, const char* peer_name) { - char* allocated_name = nullptr; - int r; - - if (strchr(peer_name, ':') != nullptr) { - char* ignored_port; - gpr_split_host_port(peer_name, &allocated_name, &ignored_port); - gpr_free(ignored_port); - peer_name = allocated_name; - if (!peer_name) return 0; - } - r = tsi_ssl_peer_matches_name(peer, peer_name); - gpr_free(allocated_name); - return r; -} - -grpc_auth_context* tsi_ssl_peer_to_auth_context(const tsi_peer* peer) { - size_t i; - grpc_auth_context* ctx = nullptr; - const char* peer_identity_property_name = nullptr; - - /* The caller has checked the certificate type property. */ - GPR_ASSERT(peer->property_count >= 1); - ctx = grpc_auth_context_create(nullptr); - grpc_auth_context_add_cstring_property( - ctx, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, - GRPC_SSL_TRANSPORT_SECURITY_TYPE); - for (i = 0; i < peer->property_count; i++) { - const tsi_peer_property* prop = &peer->properties[i]; - if (prop->name == nullptr) continue; - if (strcmp(prop->name, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY) == 0) { - /* If there is no subject alt name, have the CN as the identity. */ - if (peer_identity_property_name == nullptr) { - peer_identity_property_name = GRPC_X509_CN_PROPERTY_NAME; - } - grpc_auth_context_add_property(ctx, GRPC_X509_CN_PROPERTY_NAME, - prop->value.data, prop->value.length); - } else if (strcmp(prop->name, - TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) { - peer_identity_property_name = GRPC_X509_SAN_PROPERTY_NAME; - grpc_auth_context_add_property(ctx, GRPC_X509_SAN_PROPERTY_NAME, - prop->value.data, prop->value.length); - } else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) { - grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME, - prop->value.data, prop->value.length); - } - } - if (peer_identity_property_name != nullptr) { - GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name( - ctx, peer_identity_property_name) == 1); - } - return ctx; -} - -static grpc_error* ssl_check_peer(grpc_security_connector* sc, - const char* peer_name, const tsi_peer* peer, - grpc_auth_context** auth_context) { - /* Check the ALPN. */ - const tsi_peer_property* p = - tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); - if (p == nullptr) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Cannot check peer: missing selected ALPN property."); - } - if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Cannot check peer: invalid ALPN value."); - } - - /* Check the peer name if specified. */ - if (peer_name != nullptr && !ssl_host_matches_name(peer, peer_name)) { - char* msg; - gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; - } - *auth_context = tsi_ssl_peer_to_auth_context(peer); - return GRPC_ERROR_NONE; -} - -static void ssl_channel_check_peer(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - grpc_ssl_channel_security_connector* c = - reinterpret_cast(sc); - grpc_error* error = ssl_check_peer(sc, - c->overridden_target_name != nullptr - ? c->overridden_target_name - : c->target_name, - &peer, auth_context); - GRPC_CLOSURE_SCHED(on_peer_checked, error); - tsi_peer_destruct(&peer); -} - -static void ssl_server_check_peer(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked) { - grpc_error* error = ssl_check_peer(sc, nullptr, &peer, auth_context); - tsi_peer_destruct(&peer); - GRPC_CLOSURE_SCHED(on_peer_checked, error); -} - -static int ssl_channel_cmp(grpc_security_connector* sc1, - grpc_security_connector* sc2) { - grpc_ssl_channel_security_connector* c1 = - reinterpret_cast(sc1); - grpc_ssl_channel_security_connector* c2 = - reinterpret_cast(sc2); - int c = grpc_channel_security_connector_cmp(&c1->base, &c2->base); - if (c != 0) return c; - c = strcmp(c1->target_name, c2->target_name); - if (c != 0) return c; - return (c1->overridden_target_name == nullptr || - c2->overridden_target_name == nullptr) - ? GPR_ICMP(c1->overridden_target_name, c2->overridden_target_name) - : strcmp(c1->overridden_target_name, c2->overridden_target_name); -} - -static int ssl_server_cmp(grpc_security_connector* sc1, - grpc_security_connector* sc2) { - return grpc_server_security_connector_cmp( - reinterpret_cast(sc1), - reinterpret_cast(sc2)); -} - -static void add_shallow_auth_property_to_peer(tsi_peer* peer, - const grpc_auth_property* prop, - const char* tsi_prop_name) { - tsi_peer_property* tsi_prop = &peer->properties[peer->property_count++]; - tsi_prop->name = const_cast(tsi_prop_name); - tsi_prop->value.data = prop->value; - tsi_prop->value.length = prop->value_length; -} - -tsi_peer tsi_shallow_peer_from_ssl_auth_context( - const grpc_auth_context* auth_context) { - size_t max_num_props = 0; - grpc_auth_property_iterator it; - const grpc_auth_property* prop; - tsi_peer peer; - memset(&peer, 0, sizeof(peer)); - - it = grpc_auth_context_property_iterator(auth_context); - while (grpc_auth_property_iterator_next(&it) != nullptr) max_num_props++; - - if (max_num_props > 0) { - peer.properties = static_cast( - gpr_malloc(max_num_props * sizeof(tsi_peer_property))); - it = grpc_auth_context_property_iterator(auth_context); - while ((prop = grpc_auth_property_iterator_next(&it)) != nullptr) { - if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer( - &peer, prop, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY); - } else if (strcmp(prop->name, GRPC_X509_CN_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer( - &peer, prop, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); - } else if (strcmp(prop->name, GRPC_X509_PEM_CERT_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer(&peer, prop, - TSI_X509_PEM_CERT_PROPERTY); - } - } - } - return peer; -} - -void tsi_shallow_peer_destruct(tsi_peer* peer) { - if (peer->properties != nullptr) gpr_free(peer->properties); -} - -static bool ssl_channel_check_call_host(grpc_channel_security_connector* sc, - const char* host, - grpc_auth_context* auth_context, - grpc_closure* on_call_host_checked, - grpc_error** error) { - grpc_ssl_channel_security_connector* c = - reinterpret_cast(sc); - grpc_security_status status = GRPC_SECURITY_ERROR; - tsi_peer peer = tsi_shallow_peer_from_ssl_auth_context(auth_context); - if (ssl_host_matches_name(&peer, host)) status = GRPC_SECURITY_OK; - /* If the target name was overridden, then the original target_name was - 'checked' transitively during the previous peer check at the end of the - handshake. */ - if (c->overridden_target_name != nullptr && - strcmp(host, c->target_name) == 0) { - status = GRPC_SECURITY_OK; - } - if (status != GRPC_SECURITY_OK) { - *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "call host does not match SSL server name"); - } - tsi_shallow_peer_destruct(&peer); - return true; -} - -static void ssl_channel_cancel_check_call_host( - grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, - grpc_error* error) { - GRPC_ERROR_UNREF(error); -} - -static grpc_security_connector_vtable ssl_channel_vtable = { - ssl_channel_destroy, ssl_channel_check_peer, ssl_channel_cmp}; - -static grpc_security_connector_vtable ssl_server_vtable = { - ssl_server_destroy, ssl_server_check_peer, ssl_server_cmp}; - -/* returns a NULL terminated slice. */ -static grpc_slice compute_default_pem_root_certs_once(void) { - grpc_slice result = grpc_empty_slice(); - - /* First try to load the roots from the environment. */ - char* default_root_certs_path = - gpr_getenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR); - if (default_root_certs_path != nullptr) { - GRPC_LOG_IF_ERROR("load_file", - grpc_load_file(default_root_certs_path, 1, &result)); - gpr_free(default_root_certs_path); - } - - /* Try overridden roots if needed. */ - grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; - if (GRPC_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != nullptr) { - char* pem_root_certs = nullptr; - ovrd_res = ssl_roots_override_cb(&pem_root_certs); - if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { - GPR_ASSERT(pem_root_certs != nullptr); - result = grpc_slice_from_copied_buffer( - pem_root_certs, - strlen(pem_root_certs) + 1); // NULL terminator. - } - gpr_free(pem_root_certs); - } - - /* Fall back to installed certs if needed. */ - if (GRPC_SLICE_IS_EMPTY(result) && - ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { - GRPC_LOG_IF_ERROR("load_file", - grpc_load_file(installed_roots_path, 1, &result)); - } - return result; -} - -static grpc_slice default_pem_root_certs; - -static void init_default_pem_root_certs(void) { - default_pem_root_certs = compute_default_pem_root_certs_once(); -} - -grpc_slice grpc_get_default_ssl_roots_for_testing(void) { - return compute_default_pem_root_certs_once(); -} - -const char* grpc_get_default_ssl_roots(void) { - /* TODO(jboeuf@google.com): Maybe revisit the approach which consists in - loading all the roots once for the lifetime of the process. */ - static gpr_once once = GPR_ONCE_INIT; - gpr_once_init(&once, init_default_pem_root_certs); - return GRPC_SLICE_IS_EMPTY(default_pem_root_certs) - ? nullptr - : reinterpret_cast - GRPC_SLICE_START_PTR(default_pem_root_certs); -} - -grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_channel_credentials* channel_creds, - grpc_call_credentials* request_metadata_creds, - const grpc_ssl_config* config, const char* target_name, - const char* overridden_target_name, grpc_channel_security_connector** sc) { - size_t num_alpn_protocols = 0; - const char** alpn_protocol_strings = - fill_alpn_protocol_strings(&num_alpn_protocols); - tsi_result result = TSI_OK; - grpc_ssl_channel_security_connector* c; - const char* pem_root_certs; - char* port; - bool has_key_cert_pair; - - if (config == nullptr || target_name == nullptr) { - gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name."); - goto error; - } - if (config->pem_root_certs == nullptr) { - pem_root_certs = grpc_get_default_ssl_roots(); - if (pem_root_certs == nullptr) { - gpr_log(GPR_ERROR, "Could not get default pem root certs."); - goto error; - } - } else { - pem_root_certs = config->pem_root_certs; - } - - c = static_cast( - gpr_zalloc(sizeof(grpc_ssl_channel_security_connector))); - - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.vtable = &ssl_channel_vtable; - c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; - c->base.channel_creds = grpc_channel_credentials_ref(channel_creds); - c->base.request_metadata_creds = - grpc_call_credentials_ref(request_metadata_creds); - c->base.check_call_host = ssl_channel_check_call_host; - c->base.cancel_check_call_host = ssl_channel_cancel_check_call_host; - c->base.add_handshakers = ssl_channel_add_handshakers; - gpr_split_host_port(target_name, &c->target_name, &port); - gpr_free(port); - if (overridden_target_name != nullptr) { - c->overridden_target_name = gpr_strdup(overridden_target_name); - } - - has_key_cert_pair = config->pem_key_cert_pair != nullptr && - config->pem_key_cert_pair->private_key != nullptr && - config->pem_key_cert_pair->cert_chain != nullptr; - result = tsi_create_ssl_client_handshaker_factory( - has_key_cert_pair ? config->pem_key_cert_pair : nullptr, pem_root_certs, - ssl_cipher_suites(), alpn_protocol_strings, - static_cast(num_alpn_protocols), &c->client_handshaker_factory); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - ssl_channel_destroy(&c->base.base); - *sc = nullptr; - goto error; - } - *sc = &c->base; - gpr_free((void*)alpn_protocol_strings); - return GRPC_SECURITY_OK; - -error: - gpr_free((void*)alpn_protocol_strings); - return GRPC_SECURITY_ERROR; -} - -static grpc_ssl_server_security_connector* -grpc_ssl_server_security_connector_initialize( - grpc_server_credentials* server_creds) { - grpc_ssl_server_security_connector* c = - static_cast( - gpr_zalloc(sizeof(grpc_ssl_server_security_connector))); - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; - c->base.base.vtable = &ssl_server_vtable; - c->base.add_handshakers = ssl_server_add_handshakers; - c->base.server_creds = grpc_server_credentials_ref(server_creds); - return c; -} - -grpc_security_status grpc_ssl_server_security_connector_create( - grpc_server_credentials* gsc, grpc_server_security_connector** sc) { - tsi_result result = TSI_OK; - grpc_ssl_server_credentials* server_credentials = - reinterpret_cast(gsc); - grpc_security_status retval = GRPC_SECURITY_OK; - - GPR_ASSERT(server_credentials != nullptr); - GPR_ASSERT(sc != nullptr); - - grpc_ssl_server_security_connector* c = - grpc_ssl_server_security_connector_initialize(gsc); - if (server_connector_has_cert_config_fetcher(c)) { - // Load initial credentials from certificate_config_fetcher: - if (!try_fetch_ssl_server_credentials(c)) { - gpr_log(GPR_ERROR, "Failed loading SSL server credentials from fetcher."); - retval = GRPC_SECURITY_ERROR; - } - } else { - size_t num_alpn_protocols = 0; - const char** alpn_protocol_strings = - fill_alpn_protocol_strings(&num_alpn_protocols); - result = tsi_create_ssl_server_handshaker_factory_ex( - server_credentials->config.pem_key_cert_pairs, - server_credentials->config.num_key_cert_pairs, - server_credentials->config.pem_root_certs, - get_tsi_client_certificate_request_type( - server_credentials->config.client_certificate_request), - ssl_cipher_suites(), alpn_protocol_strings, - static_cast(num_alpn_protocols), - &c->server_handshaker_factory); - gpr_free((void*)alpn_protocol_strings); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - retval = GRPC_SECURITY_ERROR; - } - } - - if (retval == GRPC_SECURITY_OK) { - *sc = &c->base; - } else { - if (c != nullptr) ssl_server_destroy(&c->base.base); - if (sc != nullptr) *sc = nullptr; - } - return retval; -} diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h deleted file mode 100644 index 495821d247..0000000000 --- a/src/core/lib/security/transport/security_connector.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H -#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H - -#include - -#include - -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/tsi/ssl_transport_security.h" -#include "src/core/tsi/transport_security_interface.h" - -extern grpc_core::DebugOnlyTraceFlag grpc_trace_security_connector_refcount; - -/* --- status enum. --- */ - -typedef enum { GRPC_SECURITY_OK = 0, GRPC_SECURITY_ERROR } grpc_security_status; - -/* --- URL schemes. --- */ - -#define GRPC_SSL_URL_SCHEME "https" -#define GRPC_FAKE_SECURITY_URL_SCHEME "http+fake_security" - -/* --- security_connector object. --- - - A security connector object represents away to configure the underlying - transport security mechanism and check the resulting trusted peer. */ - -typedef struct grpc_security_connector grpc_security_connector; - -#define GRPC_ARG_SECURITY_CONNECTOR "grpc.security_connector" - -typedef struct { - void (*destroy)(grpc_security_connector* sc); - void (*check_peer)(grpc_security_connector* sc, tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked); - int (*cmp)(grpc_security_connector* sc, grpc_security_connector* other); -} grpc_security_connector_vtable; - -struct grpc_security_connector { - const grpc_security_connector_vtable* vtable; - gpr_refcount refcount; - const char* url_scheme; -}; - -/* Refcounting. */ -#ifndef NDEBUG -#define GRPC_SECURITY_CONNECTOR_REF(p, r) \ - grpc_security_connector_ref((p), __FILE__, __LINE__, (r)) -#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) \ - grpc_security_connector_unref((p), __FILE__, __LINE__, (r)) -grpc_security_connector* grpc_security_connector_ref( - grpc_security_connector* policy, const char* file, int line, - const char* reason); -void grpc_security_connector_unref(grpc_security_connector* policy, - const char* file, int line, - const char* reason); -#else -#define GRPC_SECURITY_CONNECTOR_REF(p, r) grpc_security_connector_ref((p)) -#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) grpc_security_connector_unref((p)) -grpc_security_connector* grpc_security_connector_ref( - grpc_security_connector* policy); -void grpc_security_connector_unref(grpc_security_connector* policy); -#endif - -/* Check the peer. Callee takes ownership of the peer object. - When done, sets *auth_context and invokes on_peer_checked. */ -void grpc_security_connector_check_peer(grpc_security_connector* sc, - tsi_peer peer, - grpc_auth_context** auth_context, - grpc_closure* on_peer_checked); - -/* Compares two security connectors. */ -int grpc_security_connector_cmp(grpc_security_connector* sc, - grpc_security_connector* other); - -/* Util to encapsulate the connector in a channel arg. */ -grpc_arg grpc_security_connector_to_arg(grpc_security_connector* sc); - -/* Util to get the connector from a channel arg. */ -grpc_security_connector* grpc_security_connector_from_arg(const grpc_arg* arg); - -/* Util to find the connector from channel args. */ -grpc_security_connector* grpc_security_connector_find_in_args( - const grpc_channel_args* args); - -/* --- channel_security_connector object. --- - - A channel security connector object represents a way to configure the - underlying transport security mechanism on the client side. */ - -typedef struct grpc_channel_security_connector grpc_channel_security_connector; - -struct grpc_channel_security_connector { - grpc_security_connector base; - grpc_channel_credentials* channel_creds; - grpc_call_credentials* request_metadata_creds; - bool (*check_call_host)(grpc_channel_security_connector* sc, const char* host, - grpc_auth_context* auth_context, - grpc_closure* on_call_host_checked, - grpc_error** error); - void (*cancel_check_call_host)(grpc_channel_security_connector* sc, - grpc_closure* on_call_host_checked, - grpc_error* error); - void (*add_handshakers)(grpc_channel_security_connector* sc, - grpc_handshake_manager* handshake_mgr); -}; - -/// A helper function for use in grpc_security_connector_cmp() implementations. -int grpc_channel_security_connector_cmp(grpc_channel_security_connector* sc1, - grpc_channel_security_connector* sc2); - -/// Checks that the host that will be set for a call is acceptable. -/// Returns true if completed synchronously, in which case \a error will -/// be set to indicate the result. Otherwise, \a on_call_host_checked -/// will be invoked when complete. -bool grpc_channel_security_connector_check_call_host( - grpc_channel_security_connector* sc, const char* host, - grpc_auth_context* auth_context, grpc_closure* on_call_host_checked, - grpc_error** error); - -/// Cancels a pending asychronous call to -/// grpc_channel_security_connector_check_call_host() with -/// \a on_call_host_checked as its callback. -void grpc_channel_security_connector_cancel_check_call_host( - grpc_channel_security_connector* sc, grpc_closure* on_call_host_checked, - grpc_error* error); - -/* Registers handshakers with \a handshake_mgr. */ -void grpc_channel_security_connector_add_handshakers( - grpc_channel_security_connector* connector, - grpc_handshake_manager* handshake_mgr); - -/* --- server_security_connector object. --- - - A server security connector object represents a way to configure the - underlying transport security mechanism on the server side. */ - -typedef struct grpc_server_security_connector grpc_server_security_connector; - -struct grpc_server_security_connector { - grpc_security_connector base; - grpc_server_credentials* server_creds; - void (*add_handshakers)(grpc_server_security_connector* sc, - grpc_handshake_manager* handshake_mgr); -}; - -/// A helper function for use in grpc_security_connector_cmp() implementations. -int grpc_server_security_connector_cmp(grpc_server_security_connector* sc1, - grpc_server_security_connector* sc2); - -void grpc_server_security_connector_add_handshakers( - grpc_server_security_connector* sc, grpc_handshake_manager* handshake_mgr); - -/* --- Creation security connectors. --- */ - -/* For TESTING ONLY! - Creates a fake connector that emulates real channel security. */ -grpc_channel_security_connector* grpc_fake_channel_security_connector_create( - grpc_channel_credentials* channel_creds, - grpc_call_credentials* request_metadata_creds, const char* target, - const grpc_channel_args* args); - -/* For TESTING ONLY! - Creates a fake connector that emulates real server security. */ -grpc_server_security_connector* grpc_fake_server_security_connector_create( - grpc_server_credentials* server_creds); - -/* Config for ssl clients. */ - -typedef struct { - tsi_ssl_pem_key_cert_pair* pem_key_cert_pair; - char* pem_root_certs; -} grpc_ssl_config; - -/* Creates an SSL channel_security_connector. - - request_metadata_creds is the credentials object which metadata - will be sent with each request. This parameter can be NULL. - - config is the SSL config to be used for the SSL channel establishment. - - is_client should be 0 for a server or a non-0 value for a client. - - secure_peer_name is the secure peer name that should be checked in - grpc_channel_security_connector_check_peer. This parameter may be NULL in - which case the peer name will not be checked. Note that if this parameter - is not NULL, then, pem_root_certs should not be NULL either. - - sc is a pointer on the connector to be created. - This function returns GRPC_SECURITY_OK in case of success or a - specific error code otherwise. -*/ -grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_channel_credentials* channel_creds, - grpc_call_credentials* request_metadata_creds, - const grpc_ssl_config* config, const char* target_name, - const char* overridden_target_name, grpc_channel_security_connector** sc); - -/* Gets the default ssl roots. Returns NULL if not found. */ -const char* grpc_get_default_ssl_roots(void); - -/* Exposed for TESTING ONLY!. */ -grpc_slice grpc_get_default_ssl_roots_for_testing(void); - -/* Config for ssl servers. */ -typedef struct { - tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs; - size_t num_key_cert_pairs; - char* pem_root_certs; - grpc_ssl_client_certificate_request_type client_certificate_request; -} grpc_ssl_server_config; - -/* Creates an SSL server_security_connector. - - config is the SSL config to be used for the SSL channel establishment. - - sc is a pointer on the connector to be created. - This function returns GRPC_SECURITY_OK in case of success or a - specific error code otherwise. -*/ -grpc_security_status grpc_ssl_server_security_connector_create( - grpc_server_credentials* server_credentials, - grpc_server_security_connector** sc); - -/* Util. */ -const tsi_peer_property* tsi_peer_get_property_by_name(const tsi_peer* peer, - const char* name); - -/* Exposed for testing only. */ -grpc_auth_context* tsi_ssl_peer_to_auth_context(const tsi_peer* peer); -tsi_peer tsi_shallow_peer_from_ssl_auth_context( - const grpc_auth_context* auth_context); -void tsi_shallow_peer_destruct(tsi_peer* peer); - -#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H */ diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h index 6cd6446b5a..f109a51996 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -21,7 +21,7 @@ #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" /// Creates a security handshaker using \a handshaker. grpc_handshaker* grpc_security_handshaker_create( diff --git a/src/core/lib/surface/init_secure.cc b/src/core/lib/surface/init_secure.cc index 75ed9faef0..78e983e0cd 100644 --- a/src/core/lib/surface/init_secure.cc +++ b/src/core/lib/surface/init_secure.cc @@ -27,9 +27,9 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/plugin/plugin_credentials.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/security/transport/secure_endpoint.h" -#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/security/transport/security_handshaker.h" #include "src/core/lib/surface/channel_init.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2da3c0bde8..479ed3aad8 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -234,10 +234,10 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc', 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', + 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', - 'src/core/lib/security/transport/security_connector.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', 'src/core/lib/security/transport/tsi_error.cc', diff --git a/test/core/security/security_connector_test.cc b/test/core/security/security_connector_test.cc index e4731fb039..ed3849bfc8 100644 --- a/test/core/security/security_connector_test.cc +++ b/test/core/security/security_connector_test.cc @@ -28,7 +28,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/tmpfile.h" #include "src/core/lib/security/context/security_context.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 6e30698562..cb74e3bae1 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -22,7 +22,7 @@ #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc index c10d6796a7..06962179a2 100644 --- a/test/core/surface/secure_channel_create_test.cc +++ b/test/core/surface/secure_channel_create_test.cc @@ -23,7 +23,7 @@ #include #include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/surface/channel.h" #include "test/core/util/test_config.h" diff --git a/test/core/tsi/fake_transport_security_test.cc b/test/core/tsi/fake_transport_security_test.cc index ea392d347d..bec81ed42f 100644 --- a/test/core/tsi/fake_transport_security_test.cc +++ b/test/core/tsi/fake_transport_security_test.cc @@ -20,7 +20,7 @@ #include #include -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/fake_transport_security.h" #include "test/core/tsi/transport_security_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index d7a4d747e1..8a9a92ff71 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -21,7 +21,7 @@ #include #include "src/core/lib/iomgr/load_file.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_adapter.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index c095b5bed9..201367e13b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1306,14 +1306,14 @@ src/core/lib/security/credentials/plugin/plugin_credentials.cc \ src/core/lib/security/credentials/plugin/plugin_credentials.h \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ src/core/lib/security/credentials/ssl/ssl_credentials.h \ +src/core/lib/security/security_connector/security_connector.cc \ +src/core/lib/security/security_connector/security_connector.h \ src/core/lib/security/transport/auth_filters.h \ src/core/lib/security/transport/client_auth_filter.cc \ src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/lb_targets_info.h \ src/core/lib/security/transport/secure_endpoint.cc \ src/core/lib/security/transport/secure_endpoint.h \ -src/core/lib/security/transport/security_connector.cc \ -src/core/lib/security/transport/security_connector.h \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/security_handshaker.h \ src/core/lib/security/transport/server_auth_filter.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 3efaa6e686..9aa737fa68 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9250,10 +9250,10 @@ "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/json_util.h" @@ -9290,14 +9290,14 @@ "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.cc", "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/security_connector/security_connector.cc", + "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", "src/core/lib/security/transport/client_auth_filter.cc", "src/core/lib/security/transport/lb_targets_info.cc", "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.cc", "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.cc", - "src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_handshaker.cc", "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/server_auth_filter.cc", -- cgit v1.2.3 From bd0f15119a3563d16869262d4c38a419264799ec Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 20 Feb 2018 10:28:22 -0800 Subject: Refactor code for generating balancer channel args. --- .../client_channel/lb_policy/grpclb/grpclb.cc | 115 ++++++++++-------- .../lb_policy/grpclb/grpclb_channel.cc | 52 +------- .../lb_policy/grpclb/grpclb_channel.h | 24 ++-- .../lb_policy/grpclb/grpclb_channel_secure.cc | 133 +++++++++++---------- test/cpp/end2end/grpclb_end2end_test.cc | 2 + 5 files changed, 146 insertions(+), 180 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 11163a56dc..e38211fbf4 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -918,34 +918,8 @@ void GrpcLb::BalancerCallState::OnBalancerStatusReceivedLocked( // helper code for creating balancer channel // -// Helper function to construct a target info entry. -grpc_slice_hash_table_entry BalancerEntryCreate(const char* address, - const char* balancer_name) { - grpc_slice_hash_table_entry entry; - entry.key = grpc_slice_from_copied_string(address); - entry.value = gpr_strdup(balancer_name); - return entry; -} - -// Comparison function used for slice_hash_table vtable. -int BalancerNameCmp(void* a, void* b) { - const char* a_str = static_cast(a); - const char* b_str = static_cast(b); - return strcmp(a_str, b_str); -} - -/* Returns the channel args for the LB channel, used to create a bidirectional - * stream for the reception of load balancing updates. - * - * Inputs: - * - \a addresses: corresponding to the balancers. - * - \a response_generator: in order to propagate updates from the resolver - * above the grpclb policy. - * - \a args: other args inherited from the grpclb policy. */ -grpc_channel_args* BuildBalancerChannelArgs( - const grpc_lb_addresses* addresses, - FakeResolverResponseGenerator* response_generator, - const grpc_channel_args* args) { +grpc_lb_addresses* ExtractBalancerAddresses( + const grpc_lb_addresses* addresses) { size_t num_grpclb_addrs = 0; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; @@ -955,9 +929,6 @@ grpc_channel_args* BuildBalancerChannelArgs( GPR_ASSERT(num_grpclb_addrs > 0); grpc_lb_addresses* lb_addresses = grpc_lb_addresses_create(num_grpclb_addrs, nullptr); - grpc_slice_hash_table_entry* targets_info_entries = - (grpc_slice_hash_table_entry*)gpr_zalloc(sizeof(*targets_info_entries) * - num_grpclb_addrs); size_t lb_addresses_idx = 0; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (!addresses->addresses[i].is_balancer) continue; @@ -965,32 +936,71 @@ grpc_channel_args* BuildBalancerChannelArgs( gpr_log(GPR_ERROR, "This LB policy doesn't support user data. It will be ignored"); } - char* addr_str; - GPR_ASSERT(grpc_sockaddr_to_string( - &addr_str, &addresses->addresses[i].address, true) > 0); - targets_info_entries[lb_addresses_idx] = - BalancerEntryCreate(addr_str, addresses->addresses[i].balancer_name); - gpr_free(addr_str); grpc_lb_addresses_set_address( lb_addresses, lb_addresses_idx++, addresses->addresses[i].address.addr, addresses->addresses[i].address.len, false /* is balancer */, addresses->addresses[i].balancer_name, nullptr /* user data */); } GPR_ASSERT(num_grpclb_addrs == lb_addresses_idx); - grpc_slice_hash_table* targets_info = grpc_slice_hash_table_create( - num_grpclb_addrs, targets_info_entries, gpr_free, BalancerNameCmp); - gpr_free(targets_info_entries); - grpc_channel_args* lb_channel_args = - grpc_lb_policy_grpclb_build_lb_channel_args(targets_info, - response_generator, args); - grpc_arg lb_channel_addresses_arg = - grpc_lb_addresses_create_channel_arg(lb_addresses); - grpc_channel_args* result = grpc_channel_args_copy_and_add( - lb_channel_args, &lb_channel_addresses_arg, 1); - grpc_slice_hash_table_unref(targets_info); - grpc_channel_args_destroy(lb_channel_args); + return lb_addresses; +} + +/* Returns the channel args for the LB channel, used to create a bidirectional + * stream for the reception of load balancing updates. + * + * Inputs: + * - \a addresses: corresponding to the balancers. + * - \a response_generator: in order to propagate updates from the resolver + * above the grpclb policy. + * - \a args: other args inherited from the grpclb policy. */ +grpc_channel_args* BuildBalancerChannelArgs( + const grpc_lb_addresses* addresses, + FakeResolverResponseGenerator* response_generator, + const grpc_channel_args* args) { + grpc_lb_addresses* lb_addresses = ExtractBalancerAddresses(addresses); + // Channel args to remove. + static const char* args_to_remove[] = { + // LB policy name, since we want to use the default (pick_first) in + // the LB channel. + GRPC_ARG_LB_POLICY_NAME, + // The channel arg for the server URI, since that will be different for + // the LB channel than for the parent channel. The client channel + // factory will re-add this arg with the right value. + GRPC_ARG_SERVER_URI, + // The resolved addresses, which will be generated by the name resolver + // used in the LB channel. Note that the LB channel will use the fake + // resolver, so this won't actually generate a query to DNS (or some + // other name service). However, the addresses returned by the fake + // resolver will have is_balancer=false, whereas our own addresses have + // is_balancer=true. We need the LB channel to return addresses with + // is_balancer=false so that it does not wind up recursively using the + // grpclb LB policy, as per the special case logic in client_channel.c. + GRPC_ARG_LB_ADDRESSES, + // The fake resolver response generator, because we are replacing it + // with the one from the grpclb policy, used to propagate updates to + // the LB channel. + GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, + }; + // Channel args to add. + const grpc_arg args_to_add[] = { + // New LB addresses. + // Note that we pass these in both when creating the LB channel + // and via the fake resolver. The latter is what actually gets used. + grpc_lb_addresses_create_channel_arg(lb_addresses), + // The fake resolver response generator, which we use to inject + // address updates into the LB channel. + grpc_core::FakeResolverResponseGenerator::MakeChannelArg( + response_generator), + }; + // Construct channel args. + grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove( + args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), args_to_add, + GPR_ARRAY_SIZE(args_to_add)); + // Make any necessary modifications for security. + new_args = grpc_lb_policy_grpclb_modify_lb_channel_args(new_args); + // Clean up. grpc_lb_addresses_destroy(lb_addresses); - return result; + return new_args; } // @@ -1292,8 +1302,9 @@ void GrpcLb::ProcessChannelArgsLocked(const grpc_channel_args& args) { if (lb_channel_ == nullptr) { char* uri_str; gpr_asprintf(&uri_str, "fake:///%s", server_name_); - lb_channel_ = grpc_lb_policy_grpclb_create_lb_channel( - uri_str, client_channel_factory(), lb_channel_args); + lb_channel_ = grpc_client_channel_factory_create_channel( + client_channel_factory(), uri_str, + GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, lb_channel_args); GPR_ASSERT(lb_channel_ != nullptr); gpr_free(uri_str); } diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc index 013fb12aea..ebbe597d29 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc @@ -16,57 +16,9 @@ * */ -#include -#include - -#include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/iomgr/sockaddr_utils.h" -grpc_channel* grpc_lb_policy_grpclb_create_lb_channel( - const char* lb_service_target_addresses, - grpc_client_channel_factory* client_channel_factory, +grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( grpc_channel_args* args) { - grpc_channel* lb_channel = grpc_client_channel_factory_create_channel( - client_channel_factory, lb_service_target_addresses, - GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, args); - return lb_channel; -} - -grpc_channel_args* grpc_lb_policy_grpclb_build_lb_channel_args( - grpc_slice_hash_table* targets_info, - grpc_core::FakeResolverResponseGenerator* response_generator, - const grpc_channel_args* args) { - const grpc_arg to_add[] = { - grpc_core::FakeResolverResponseGenerator::MakeChannelArg( - response_generator)}; - /* We remove: - * - * - The channel arg for the LB policy name, since we want to use the default - * (pick_first) in this case. - * - * - The channel arg for the resolved addresses, since that will be generated - * by the name resolver used in the LB channel. Note that the LB channel - * will use the fake resolver, so this won't actually generate a query - * to DNS (or some other name service). However, the addresses returned by - * the fake resolver will have is_balancer=false, whereas our own - * addresses have is_balancer=true. We need the LB channel to return - * addresses with is_balancer=false so that it does not wind up recursively - * using the grpclb LB policy, as per the special case logic in - * client_channel.c. - * - * - The channel arg for the server URI, since that will be different for the - * LB channel than for the parent channel (the client channel factory will - * re-add this arg with the right value). - * - * - The fake resolver generator, because we are replacing it with the one - * from the grpclb policy, used to propagate updates to the LB channel. */ - static const char* keys_to_remove[] = { - GRPC_ARG_LB_POLICY_NAME, GRPC_ARG_LB_ADDRESSES, GRPC_ARG_SERVER_URI, - GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR}; - return grpc_channel_args_copy_and_add_and_remove( - args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), to_add, - GPR_ARRAY_SIZE(to_add)); + return args; } diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h index 2e34e3cab5..6635010434 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h @@ -20,25 +20,15 @@ #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H #include "src/core/ext/filters/client_channel/lb_policy_factory.h" -#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" -#include "src/core/lib/slice/slice_hash_table.h" -/** Create the channel used for communicating with an LB service. - * Note that an LB *service* may be comprised of several LB *servers*. - * - * \a lb_service_target_addresses is the target URI containing the addresses - * from resolving the LB service's name (eg, ipv4:10.0.0.1:1234,10.2.3.4:9876). - * \a client_channel_factory will be used for the creation of the LB channel, - * alongside the channel args passed in \a args. */ -grpc_channel* grpc_lb_policy_grpclb_create_lb_channel( - const char* lb_service_target_addresses, - grpc_client_channel_factory* client_channel_factory, +/// Makes any necessary modifications to \a args for use in the grpclb +/// balancer channel. +/// +/// Takes ownership of \a args. +/// +/// Caller takes ownership of the returned args. +grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( grpc_channel_args* args); -grpc_channel_args* grpc_lb_policy_grpclb_build_lb_channel_args( - grpc_slice_hash_table* targets_info, - grpc_core::FakeResolverResponseGenerator* response_generator, - const grpc_channel_args* args); - #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H \ */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc index 5e615addbf..254a5dfd16 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc @@ -16,11 +16,14 @@ * */ +#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" + +#include + #include #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -28,73 +31,81 @@ #include "src/core/lib/security/transport/lb_targets_info.h" #include "src/core/lib/slice/slice_internal.h" -grpc_channel* grpc_lb_policy_grpclb_create_lb_channel( - const char* lb_service_target_addresses, - grpc_client_channel_factory* client_channel_factory, +static void destroy_balancer_name(void* balancer_name) { + gpr_free(balancer_name); +} + +static grpc_slice_hash_table_entry targets_info_entry_create( + const char* address, const char* balancer_name) { + grpc_slice_hash_table_entry entry; + entry.key = grpc_slice_from_copied_string(address); + entry.value = gpr_strdup(balancer_name); + return entry; +} + +static int balancer_name_cmp_fn(void* a, void* b) { + const char* a_str = static_cast(a); + const char* b_str = static_cast(b); + return strcmp(a_str, b_str); +} + +static grpc_slice_hash_table* build_targets_info_table( + grpc_lb_addresses* addresses) { + grpc_slice_hash_table_entry* targets_info_entries = + static_cast( + gpr_zalloc(sizeof(*targets_info_entries) * addresses->num_addresses)); + for (size_t i = 0; i < addresses->num_addresses; ++i) { + char* addr_str; + GPR_ASSERT(grpc_sockaddr_to_string( + &addr_str, &addresses->addresses[i].address, true) > 0); + targets_info_entries[i] = targets_info_entry_create( + addr_str, addresses->addresses[i].balancer_name); + gpr_free(addr_str); + } + grpc_slice_hash_table* targets_info = grpc_slice_hash_table_create( + addresses->num_addresses, targets_info_entries, destroy_balancer_name, + balancer_name_cmp_fn); + gpr_free(targets_info_entries); + return targets_info; +} + +grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( grpc_channel_args* args) { - grpc_channel_args* new_args = args; + const char* args_to_remove[1]; + size_t num_args_to_remove = 0; + grpc_arg args_to_add[2]; + size_t num_args_to_add = 0; + // Add arg for targets info table. + const grpc_arg* arg = grpc_channel_args_find(args, GRPC_ARG_LB_ADDRESSES); + GPR_ASSERT(arg != nullptr); + GPR_ASSERT(arg->type == GRPC_ARG_POINTER); + grpc_lb_addresses* addresses = + static_cast(arg->value.pointer.p); + grpc_slice_hash_table* targets_info = build_targets_info_table(addresses); + args_to_add[num_args_to_add++] = + grpc_lb_targets_info_create_channel_arg(targets_info); + // Substitute the channel credentials with a version without call + // credentials: the load balancer is not necessarily trusted to handle + // bearer token credentials. grpc_channel_credentials* channel_credentials = grpc_channel_credentials_find_in_args(args); + grpc_channel_credentials* creds_sans_call_creds = nullptr; if (channel_credentials != nullptr) { - /* Substitute the channel credentials with a version without call - * credentials: the load balancer is not necessarily trusted to handle - * bearer token credentials */ - static const char* keys_to_remove[] = {GRPC_ARG_CHANNEL_CREDENTIALS}; - grpc_channel_credentials* creds_sans_call_creds = + creds_sans_call_creds = grpc_channel_credentials_duplicate_without_call_credentials( channel_credentials); GPR_ASSERT(creds_sans_call_creds != nullptr); - grpc_arg args_to_add[] = { - grpc_channel_credentials_to_arg(creds_sans_call_creds)}; - /* Create the new set of channel args */ - new_args = grpc_channel_args_copy_and_add_and_remove( - args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), args_to_add, - GPR_ARRAY_SIZE(args_to_add)); - grpc_channel_credentials_unref(creds_sans_call_creds); + args_to_remove[num_args_to_remove++] = GRPC_ARG_CHANNEL_CREDENTIALS; + args_to_add[num_args_to_add++] = + grpc_channel_credentials_to_arg(creds_sans_call_creds); } - grpc_channel* lb_channel = grpc_client_channel_factory_create_channel( - client_channel_factory, lb_service_target_addresses, - GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, new_args); - if (channel_credentials != nullptr) { - grpc_channel_args_destroy(new_args); + grpc_channel_args* result = grpc_channel_args_copy_and_add_and_remove( + args, args_to_remove, num_args_to_remove, args_to_add, num_args_to_add); + // Clean up. + grpc_channel_args_destroy(args); + grpc_slice_hash_table_unref(targets_info); + if (creds_sans_call_creds != nullptr) { + grpc_channel_credentials_unref(creds_sans_call_creds); } - return lb_channel; -} - -grpc_channel_args* grpc_lb_policy_grpclb_build_lb_channel_args( - grpc_slice_hash_table* targets_info, - grpc_core::FakeResolverResponseGenerator* response_generator, - const grpc_channel_args* args) { - const grpc_arg to_add[] = { - grpc_lb_targets_info_create_channel_arg(targets_info), - grpc_core::FakeResolverResponseGenerator::MakeChannelArg( - response_generator)}; - /* We remove: - * - * - The channel arg for the LB policy name, since we want to use the default - * (pick_first) in this case. - * - * - The channel arg for the resolved addresses, since that will be generated - * by the name resolver used in the LB channel. Note that the LB channel - * will use the fake resolver, so this won't actually generate a query - * to DNS (or some other name service). However, the addresses returned by - * the fake resolver will have is_balancer=false, whereas our own - * addresses have is_balancer=true. We need the LB channel to return - * addresses with is_balancer=false so that it does not wind up recursively - * using the grpclb LB policy, as per the special case logic in - * client_channel.c. - * - * - The channel arg for the server URI, since that will be different for the - * LB channel than for the parent channel (the client channel factory will - * re-add this arg with the right value). - * - * - The fake resolver generator, because we are replacing it with the one - * from the grpclb policy, used to propagate updates to the LB channel. */ - static const char* keys_to_remove[] = { - GRPC_ARG_LB_POLICY_NAME, GRPC_ARG_LB_ADDRESSES, GRPC_ARG_SERVER_URI, - GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR}; - /* Add the targets info table to be used for secure naming */ - return grpc_channel_args_copy_and_add_and_remove( - args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), to_add, - GPR_ARRAY_SIZE(to_add)); + return result; } diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 96bd93682e..25e108e1a1 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -58,6 +58,8 @@ // - Test handling of creation of faulty RR instance by having the LB return a // serverlist with non-existent backends after having initially returned a // valid one. +// - test using secure credentials and make sure we don't send call +// credentials to the balancer // // Findings from end to end testing to be covered here: // - Handling of LB servers restart, including reconnection after backing-off -- cgit v1.2.3 From 3ef4af2eae875abc0305ddfc553946d4f4c686b1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 21 Feb 2018 07:53:26 -0800 Subject: Fix crash when failing to create an LB policy. --- src/core/ext/filters/client_channel/client_channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 174a15b447..9a8f25b630 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -446,7 +446,6 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { chand->lb_policy->UpdateLocked(*chand->resolver_result); } else { // Instantiate new LB policy. - lb_policy_created = true; grpc_core::LoadBalancingPolicy::Args lb_policy_args; lb_policy_args.combiner = chand->combiner; lb_policy_args.client_channel_factory = chand->client_channel_factory; @@ -458,6 +457,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { gpr_log(GPR_ERROR, "could not create LB policy \"%s\"", lb_policy_name); } else { + lb_policy_created = true; reresolution_request_args* args = static_cast( gpr_zalloc(sizeof(*args))); -- cgit v1.2.3 From 09bd5c0b1b9d5748b8a272e8495ecd0c9fd1602c Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 21 Feb 2018 15:18:07 -0800 Subject: convert cronet headers to metadata in one function --- .../transport/cronet/transport/cronet_transport.cc | 63 ++++++++++------------ 1 file changed, 28 insertions(+), 35 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 9dce5c99ca..6c73c80eda 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -415,6 +415,29 @@ static void execute_from_storage(stream_obj* s) { gpr_mu_unlock(&s->mu); } +static void convert_cronet_array_to_metadata( + const bidirectional_stream_header_array* header_array, + grpc_chttp2_incoming_metadata_buffer* mds) { + for (size_t i = 0; i < header_array->count; i++) { + CRONET_LOG(GPR_DEBUG, "header key=%s, value=%s", + header_array->headers[i].key, header_array->headers[i].value); + grpc_slice key = grpc_slice_intern( + grpc_slice_from_static_string(header_array->headers[i].key)); + grpc_slice value; + if (grpc_is_binary_header(key)) { + value = grpc_slice_from_static_string(header_array->headers[i].value); + value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( + value, infer_length_after_decode(value))); + } else { + value = grpc_slice_intern( + grpc_slice_from_static_string(header_array->headers[i].value)); + } + GRPC_LOG_IF_ERROR("convert_cronet_array_to_metadata", + grpc_chttp2_incoming_metadata_buffer_add( + mds, grpc_mdelem_from_slices(key, value))); + } +} + /* Cronet callback */ @@ -539,23 +562,7 @@ static void on_response_headers_received( sizeof(s->state.rs.initial_metadata)); grpc_chttp2_incoming_metadata_buffer_init(&s->state.rs.initial_metadata, s->arena); - for (size_t i = 0; i < headers->count; i++) { - grpc_slice key = grpc_slice_intern( - grpc_slice_from_static_string(headers->headers[i].key)); - grpc_slice value; - if (grpc_is_binary_header(key)) { - value = grpc_slice_from_static_string(headers->headers[i].value); - value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( - value, infer_length_after_decode(value))); - } else { - value = grpc_slice_intern( - grpc_slice_from_static_string(headers->headers[i].value)); - } - GRPC_LOG_IF_ERROR("on_response_headers_received", - grpc_chttp2_incoming_metadata_buffer_add( - &s->state.rs.initial_metadata, - grpc_mdelem_from_slices(key, value))); - } + convert_cronet_array_to_metadata(headers, &s->state.rs.initial_metadata); s->state.state_callback_received[OP_RECV_INITIAL_METADATA] = true; if (!(s->state.state_op_done[OP_CANCEL_ERROR] || s->state.state_callback_received[OP_FAILED])) { @@ -650,25 +657,11 @@ static void on_response_trailers_received( s->state.rs.trailing_metadata_valid = false; grpc_chttp2_incoming_metadata_buffer_init(&s->state.rs.trailing_metadata, s->arena); - for (size_t i = 0; i < trailers->count; i++) { - CRONET_LOG(GPR_DEBUG, "trailer key=%s, value=%s", trailers->headers[i].key, - trailers->headers[i].value); - grpc_slice key = grpc_slice_intern( - grpc_slice_from_static_string(trailers->headers[i].key)); - grpc_slice value; - if (grpc_is_binary_header(key)) { - value = grpc_slice_from_static_string(trailers->headers[i].value); - value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( - value, infer_length_after_decode(value))); - } else { - value = grpc_slice_intern( - grpc_slice_from_static_string(trailers->headers[i].value)); - } - GRPC_LOG_IF_ERROR("on_response_trailers_received", - grpc_chttp2_incoming_metadata_buffer_add( - &s->state.rs.trailing_metadata, - grpc_mdelem_from_slices(key, value))); + convert_cronet_array_to_metadata(trailers, &s->state.rs.trailing_metadata); + if (trailers->count > 0) { s->state.rs.trailing_metadata_valid = true; + } + for (size_t i = 0; i < trailers->count; i++) { if (0 == strcmp(trailers->headers[i].key, "grpc-status") && 0 != strcmp(trailers->headers[i].value, "0")) { s->state.fail_state = true; -- cgit v1.2.3 From 9ef1f359ca1dec335300067e6d4e3ce4da24b584 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 21 Feb 2018 15:26:54 -0800 Subject: Put infer_length_after_decode in bin_decoder --- .../ext/transport/chttp2/transport/bin_decoder.cc | 18 ++++++++++++++++++ .../ext/transport/chttp2/transport/bin_decoder.h | 3 +++ .../transport/cronet/transport/cronet_transport.cc | 22 +--------------------- 3 files changed, 22 insertions(+), 21 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.cc b/src/core/ext/transport/chttp2/transport/bin_decoder.cc index 91980e6974..53b8622259 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -75,6 +75,24 @@ static bool input_is_valid(uint8_t* input_ptr, size_t length) { #define COMPOSE_OUTPUT_BYTE_2(input_ptr) \ (uint8_t)((decode_table[input_ptr[2]] << 6) | decode_table[input_ptr[3]]) +size_t grpc_base64_infer_length_after_decode(const grpc_slice& slice) { + size_t len = GRPC_SLICE_LENGTH(slice); + const uint8_t* bytes = GRPC_SLICE_START_PTR(slice); + while (len > 0 && bytes[len - 1] == '=') { + len--; + } + size_t tuples = len / 4; + size_t tail_case = len % 4; + if (tail_case == 1) { + gpr_log(GPR_ERROR, + "Base64 decoding failed. Input has a length of %zu (without" + " padding), which is invalid.\n", + len); + tail_case = 0; + } + return tuples * 3 + tail_xtra[tail_case]; +} + bool grpc_base64_decode_partial(struct grpc_base64_decode_context* ctx) { size_t input_tail; diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index 9cb75ccd81..b5acb3fa91 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -48,4 +48,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input); grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length); +/* Infer the length of decoded data from encoded data. */ +size_t grpc_base64_infer_length_after_decode(const grpc_slice& slice); + #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 6c73c80eda..627082427d 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -216,26 +216,6 @@ void grpc_cronet_stream_unref(stream_obj* s) { grpc_stream_unref(s->refcount); } static enum e_op_result execute_stream_op(struct op_and_state* oas); -static const size_t tail_xtra[4] = {0, 0, 1, 2}; - -static size_t infer_length_after_decode(const grpc_slice& slice) { - size_t len = GRPC_SLICE_LENGTH(slice); - const uint8_t* bytes = GRPC_SLICE_START_PTR(slice); - while (len > 0 && bytes[len - 1] == '=') { - len--; - } - size_t tuples = len / 4; - size_t tail_case = len % 4; - if (tail_case == 1) { - gpr_log(GPR_ERROR, - "Base64 decoding failed. Input has a length of %zu (without" - " padding), which is invalid.\n", - len); - tail_case = 0; - } - return tuples * 3 + tail_xtra[tail_case]; -} - /* Utility function to translate enum into string for printing */ @@ -427,7 +407,7 @@ static void convert_cronet_array_to_metadata( if (grpc_is_binary_header(key)) { value = grpc_slice_from_static_string(header_array->headers[i].value); value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( - value, infer_length_after_decode(value))); + value, grpc_base64_infer_length_after_decode(value))); } else { value = grpc_slice_intern( grpc_slice_from_static_string(header_array->headers[i].value)); -- cgit v1.2.3 From 6c9a87c174189a767eca3bc387f36f4d5880cde3 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 21 Feb 2018 16:06:25 -0800 Subject: Polish infer_length_after_decode and add test cases --- .../ext/transport/chttp2/transport/bin_decoder.cc | 12 +++++++-- .../ext/transport/chttp2/transport/bin_decoder.h | 2 +- test/core/transport/chttp2/bin_decoder_test.cc | 30 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.cc b/src/core/ext/transport/chttp2/transport/bin_decoder.cc index 53b8622259..831a36961e 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -75,12 +75,20 @@ static bool input_is_valid(uint8_t* input_ptr, size_t length) { #define COMPOSE_OUTPUT_BYTE_2(input_ptr) \ (uint8_t)((decode_table[input_ptr[2]] << 6) | decode_table[input_ptr[3]]) -size_t grpc_base64_infer_length_after_decode(const grpc_slice& slice) { +// By RFC 4648, if the length of the encoded string without padding is 4n+r, +// the length of decoded string is: 1) 3n if r = 0, 2) 3n + 1 if r = 2, 3, or +// 3) invalid if r = 1. +size_t grpc_chttp2_base64_infer_length_after_decode(const grpc_slice& slice) { size_t len = GRPC_SLICE_LENGTH(slice); const uint8_t* bytes = GRPC_SLICE_START_PTR(slice); while (len > 0 && bytes[len - 1] == '=') { len--; } + if (GRPC_SLICE_LENGTH(slice) - len > 2) { + gpr_log(GPR_ERROR, + "Base64 decoding failed. Input has more than 2 paddings."); + return 0; + } size_t tuples = len / 4; size_t tail_case = len % 4; if (tail_case == 1) { @@ -88,7 +96,7 @@ size_t grpc_base64_infer_length_after_decode(const grpc_slice& slice) { "Base64 decoding failed. Input has a length of %zu (without" " padding), which is invalid.\n", len); - tail_case = 0; + return 0; } return tuples * 3 + tail_xtra[tail_case]; } diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index b5acb3fa91..a0d74fb20d 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -49,6 +49,6 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length); /* Infer the length of decoded data from encoded data. */ -size_t grpc_base64_infer_length_after_decode(const grpc_slice& slice); +size_t grpc_chttp2_base64_infer_length_after_decode(const grpc_slice& slice); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc index 283eebbacf..751dd90c8c 100644 --- a/test/core/transport/chttp2/bin_decoder_test.cc +++ b/test/core/transport/chttp2/bin_decoder_test.cc @@ -67,6 +67,16 @@ static grpc_slice base64_decode_with_length(const char* s, return out; } +static size_t base64_infer_length(const char* s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + size_t out = grpc_chttp2_base64_infer_length_after_decode(ss); + grpc_slice_unref_internal(ss); + return out; +} + +#define EXPECT_DECODED_LENGTH(s, expected) \ + GPR_ASSERT((expected) == base64_infer_length((s))); + #define EXPECT_SLICE_EQ(expected, slice) \ expect_slice_eq( \ grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ @@ -131,6 +141,26 @@ int main(int argc, char** argv) { // Test illegal charactors in grpc_chttp2_base64_decode_with_length EXPECT_SLICE_EQ("", base64_decode_with_length("Zm:v", 3)); EXPECT_SLICE_EQ("", base64_decode_with_length("Zm=v", 3)); + + EXPECT_DECODED_LENGTH("", 0); + EXPECT_DECODED_LENGTH("ab", 1); + EXPECT_DECODED_LENGTH("abc", 2); + EXPECT_DECODED_LENGTH("abcd", 3); + EXPECT_DECODED_LENGTH("abcdef", 4); + EXPECT_DECODED_LENGTH("abcdefg", 5); + EXPECT_DECODED_LENGTH("abcdefgh", 6); + + EXPECT_DECODED_LENGTH("ab==", 1); + EXPECT_DECODED_LENGTH("abc=", 2); + EXPECT_DECODED_LENGTH("abcd", 3); + EXPECT_DECODED_LENGTH("abcdef==", 4); + EXPECT_DECODED_LENGTH("abcdefg=", 5); + EXPECT_DECODED_LENGTH("abcdefgh", 6); + + EXPECT_DECODED_LENGTH("a", 0); + EXPECT_DECODED_LENGTH("a===", 0); + EXPECT_DECODED_LENGTH("abcde", 0); + EXPECT_DECODED_LENGTH("abcde===", 0); } grpc_shutdown(); return all_ok ? 0 : 1; -- cgit v1.2.3 From 48396479c04d3ba40ad46be768bdf79840a65cbc Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 21 Feb 2018 17:52:39 -0800 Subject: Build typo fix --- src/core/ext/transport/cronet/transport/cronet_transport.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ext') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 627082427d..c367f9c465 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -407,7 +407,7 @@ static void convert_cronet_array_to_metadata( if (grpc_is_binary_header(key)) { value = grpc_slice_from_static_string(header_array->headers[i].value); value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( - value, grpc_base64_infer_length_after_decode(value))); + value, grpc_chttp2_base64_infer_length_after_decode(value))); } else { value = grpc_slice_intern( grpc_slice_from_static_string(header_array->headers[i].value)); -- cgit v1.2.3 From db3e898a981ea0ae49823415efab78edd09a90ab Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 21 Feb 2018 16:59:24 -0800 Subject: Add a sanity check for inclusion of port_platform.h --- include/grpc/byte_buffer.h | 2 + include/grpc/byte_buffer_reader.h | 2 + include/grpc/census.h | 2 + include/grpc/fork.h | 2 + include/grpc/grpc.h | 2 + include/grpc/grpc_cronet.h | 2 + include/grpc/grpc_posix.h | 3 +- include/grpc/grpc_security.h | 2 + include/grpc/impl/codegen/byte_buffer.h | 2 + include/grpc/impl/codegen/sync.h | 1 + include/grpc/impl/codegen/sync_custom.h | 2 + include/grpc/impl/codegen/sync_generic.h | 2 + include/grpc/impl/codegen/sync_posix.h | 2 + include/grpc/impl/codegen/sync_windows.h | 2 + include/grpc/slice.h | 2 + include/grpc/slice_buffer.h | 2 + include/grpc/status.h | 2 + include/grpc/support/alloc.h | 4 +- include/grpc/support/atm.h | 2 + include/grpc/support/atm_gcc_atomic.h | 2 + include/grpc/support/atm_gcc_sync.h | 2 + include/grpc/support/atm_windows.h | 2 + include/grpc/support/log.h | 1 + include/grpc/support/sync.h | 2 + include/grpc/support/sync_custom.h | 2 + include/grpc/support/sync_generic.h | 2 + include/grpc/support/sync_posix.h | 2 + include/grpc/support/sync_windows.h | 2 + include/grpc/support/time.h | 2 + src/core/ext/census/grpc_context.cc | 2 + .../ext/filters/client_channel/backup_poller.cc | 2 + .../ext/filters/client_channel/backup_poller.h | 2 + .../filters/client_channel/channel_connectivity.cc | 2 + .../ext/filters/client_channel/client_channel.h | 2 + .../client_channel/client_channel_factory.cc | 2 + .../client_channel/client_channel_factory.h | 2 + src/core/ext/filters/client_channel/connector.cc | 2 + src/core/ext/filters/client_channel/connector.h | 2 + .../client_channel/http_connect_handshaker.cc | 2 + src/core/ext/filters/client_channel/http_proxy.cc | 2 + src/core/ext/filters/client_channel/lb_policy.cc | 2 + src/core/ext/filters/client_channel/lb_policy.h | 2 + .../grpclb/client_load_reporting_filter.cc | 2 + .../grpclb/client_load_reporting_filter.h | 2 + .../client_channel/lb_policy/grpclb/grpclb.cc | 2 + .../lb_policy/grpclb/grpclb_channel.cc | 2 + .../lb_policy/grpclb/grpclb_channel.h | 2 + .../lb_policy/grpclb/grpclb_channel_secure.cc | 2 + .../lb_policy/grpclb/grpclb_client_stats.cc | 2 + .../lb_policy/grpclb/grpclb_client_stats.h | 2 + .../lb_policy/grpclb/load_balancer_api.cc | 2 + .../lb_policy/grpclb/load_balancer_api.h | 2 + .../lb_policy/pick_first/pick_first.cc | 2 + .../lb_policy/round_robin/round_robin.cc | 2 + .../client_channel/lb_policy/subchannel_list.cc | 2 + .../client_channel/lb_policy/subchannel_list.h | 2 + .../filters/client_channel/lb_policy_factory.cc | 2 + .../ext/filters/client_channel/lb_policy_factory.h | 2 + .../filters/client_channel/lb_policy_registry.cc | 2 + .../filters/client_channel/lb_policy_registry.h | 2 + .../ext/filters/client_channel/parse_address.cc | 2 + .../ext/filters/client_channel/parse_address.h | 2 + .../ext/filters/client_channel/proxy_mapper.cc | 2 + src/core/ext/filters/client_channel/proxy_mapper.h | 2 + .../client_channel/proxy_mapper_registry.cc | 2 + .../filters/client_channel/proxy_mapper_registry.h | 2 + src/core/ext/filters/client_channel/resolver.cc | 2 + src/core/ext/filters/client_channel/resolver.h | 2 + .../resolver/dns/c_ares/dns_resolver_ares.cc | 1 + .../resolver/dns/c_ares/grpc_ares_ev_driver.h | 2 + .../dns/c_ares/grpc_ares_ev_driver_posix.cc | 1 + .../resolver/dns/c_ares/grpc_ares_wrapper.cc | 1 + .../resolver/dns/c_ares/grpc_ares_wrapper.h | 2 + .../dns/c_ares/grpc_ares_wrapper_fallback.cc | 1 + .../client_channel/resolver/fake/fake_resolver.cc | 3 +- .../client_channel/resolver/fake/fake_resolver.h | 2 + .../resolver/sockaddr/sockaddr_resolver.cc | 3 +- .../ext/filters/client_channel/resolver_factory.h | 2 + .../filters/client_channel/resolver_registry.cc | 2 + .../ext/filters/client_channel/resolver_registry.h | 2 + .../ext/filters/client_channel/retry_throttle.cc | 2 + .../ext/filters/client_channel/retry_throttle.h | 2 + src/core/ext/filters/client_channel/subchannel.cc | 2 + src/core/ext/filters/client_channel/subchannel.h | 2 + .../ext/filters/client_channel/subchannel_index.cc | 2 + .../ext/filters/client_channel/subchannel_index.h | 2 + src/core/ext/filters/client_channel/uri_parser.cc | 3 +- src/core/ext/filters/client_channel/uri_parser.h | 2 + src/core/ext/filters/deadline/deadline_filter.cc | 2 + src/core/ext/filters/deadline/deadline_filter.h | 2 + .../ext/filters/http/client/http_client_filter.cc | 4 +- .../ext/filters/http/client/http_client_filter.h | 2 + src/core/ext/filters/http/http_filters_plugin.cc | 2 + .../message_compress/message_compress_filter.cc | 2 + .../message_compress/message_compress_filter.h | 2 + .../ext/filters/http/server/http_server_filter.cc | 2 + .../ext/filters/http/server/http_server_filter.h | 2 + .../load_reporting/server_load_reporting_filter.cc | 2 + .../load_reporting/server_load_reporting_filter.h | 2 + .../load_reporting/server_load_reporting_plugin.h | 2 + src/core/ext/filters/max_age/max_age_filter.cc | 2 + src/core/ext/filters/max_age/max_age_filter.h | 2 + .../filters/message_size/message_size_filter.cc | 2 + .../ext/filters/message_size/message_size_filter.h | 2 + .../workaround_cronet_compression_filter.cc | 2 + .../workaround_cronet_compression_filter.h | 2 + .../ext/filters/workarounds/workaround_utils.cc | 2 + .../ext/filters/workarounds/workaround_utils.h | 2 + src/core/ext/transport/chttp2/alpn/alpn.cc | 4 +- src/core/ext/transport/chttp2/alpn/alpn.h | 2 + .../transport/chttp2/client/chttp2_connector.cc | 2 + .../ext/transport/chttp2/client/chttp2_connector.h | 2 + .../chttp2/client/insecure/channel_create.cc | 2 + .../chttp2/client/insecure/channel_create_posix.cc | 3 +- .../chttp2/client/secure/secure_channel_create.cc | 2 + .../ext/transport/chttp2/server/chttp2_server.cc | 2 + .../ext/transport/chttp2/server/chttp2_server.h | 2 + .../chttp2/server/insecure/server_chttp2.cc | 2 + .../chttp2/server/insecure/server_chttp2_posix.cc | 3 +- .../chttp2/server/secure/server_secure_chttp2.cc | 2 + .../ext/transport/chttp2/transport/bin_decoder.cc | 4 +- .../ext/transport/chttp2/transport/bin_decoder.h | 2 + .../ext/transport/chttp2/transport/bin_encoder.cc | 2 + .../ext/transport/chttp2/transport/bin_encoder.h | 2 + .../transport/chttp2/transport/chttp2_plugin.cc | 2 + .../transport/chttp2/transport/chttp2_transport.cc | 4 +- .../transport/chttp2/transport/chttp2_transport.h | 2 + .../ext/transport/chttp2/transport/flow_control.cc | 2 + .../ext/transport/chttp2/transport/flow_control.h | 1 + src/core/ext/transport/chttp2/transport/frame.h | 3 +- .../ext/transport/chttp2/transport/frame_data.cc | 2 + .../ext/transport/chttp2/transport/frame_data.h | 2 + .../ext/transport/chttp2/transport/frame_goaway.cc | 2 + .../ext/transport/chttp2/transport/frame_goaway.h | 3 +- .../ext/transport/chttp2/transport/frame_ping.cc | 2 + .../ext/transport/chttp2/transport/frame_ping.h | 2 + .../transport/chttp2/transport/frame_rst_stream.cc | 2 + .../transport/chttp2/transport/frame_rst_stream.h | 2 + .../transport/chttp2/transport/frame_settings.cc | 2 + .../transport/chttp2/transport/frame_settings.h | 3 +- .../chttp2/transport/frame_window_update.cc | 2 + .../chttp2/transport/frame_window_update.h | 2 + .../transport/chttp2/transport/hpack_encoder.cc | 2 + .../ext/transport/chttp2/transport/hpack_encoder.h | 3 +- .../ext/transport/chttp2/transport/hpack_parser.cc | 3 +- .../ext/transport/chttp2/transport/hpack_parser.h | 3 +- .../ext/transport/chttp2/transport/hpack_table.cc | 2 + .../ext/transport/chttp2/transport/hpack_table.h | 3 +- .../transport/chttp2/transport/http2_settings.cc | 2 + .../transport/chttp2/transport/http2_settings.h | 2 + .../ext/transport/chttp2/transport/huffsyms.cc | 2 + .../chttp2/transport/incoming_metadata.cc | 2 + .../transport/chttp2/transport/incoming_metadata.h | 2 + src/core/ext/transport/chttp2/transport/internal.h | 2 + src/core/ext/transport/chttp2/transport/parsing.cc | 2 + .../ext/transport/chttp2/transport/stream_lists.cc | 2 + .../ext/transport/chttp2/transport/stream_map.cc | 2 + src/core/ext/transport/chttp2/transport/varint.cc | 2 + src/core/ext/transport/chttp2/transport/writing.cc | 2 + .../transport/cronet/transport/cronet_api_dummy.cc | 2 + .../transport/cronet/transport/cronet_transport.cc | 3 +- .../transport/cronet/transport/cronet_transport.h | 2 + src/core/ext/transport/inproc/inproc_plugin.cc | 2 + src/core/ext/transport/inproc/inproc_transport.cc | 4 +- src/core/ext/transport/inproc/inproc_transport.h | 2 + src/core/lib/avl/avl.cc | 2 + src/core/lib/avl/avl.h | 2 + src/core/lib/backoff/backoff.cc | 2 + src/core/lib/backoff/backoff.h | 2 + src/core/lib/channel/channel_args.h | 2 + src/core/lib/channel/channel_stack.cc | 4 +- src/core/lib/channel/channel_stack.h | 2 + src/core/lib/channel/channel_stack_builder.cc | 2 + src/core/lib/channel/channel_stack_builder.h | 2 + src/core/lib/channel/connected_channel.cc | 2 + src/core/lib/channel/connected_channel.h | 2 + src/core/lib/channel/handshaker.cc | 2 + src/core/lib/channel/handshaker.h | 2 + src/core/lib/channel/handshaker_factory.cc | 2 + src/core/lib/channel/handshaker_factory.h | 2 + src/core/lib/channel/handshaker_registry.cc | 2 + src/core/lib/channel/handshaker_registry.h | 2 + src/core/lib/compression/algorithm_metadata.h | 2 + src/core/lib/compression/compression.cc | 2 + src/core/lib/compression/compression_internal.cc | 2 + src/core/lib/compression/compression_internal.h | 2 + src/core/lib/compression/message_compress.cc | 2 + src/core/lib/compression/message_compress.h | 2 + src/core/lib/compression/stream_compression.cc | 2 + src/core/lib/compression/stream_compression.h | 2 + .../lib/compression/stream_compression_gzip.cc | 2 + src/core/lib/compression/stream_compression_gzip.h | 2 + .../lib/compression/stream_compression_identity.cc | 2 + .../lib/compression/stream_compression_identity.h | 2 + src/core/lib/debug/stats.cc | 2 + src/core/lib/debug/stats.h | 2 + src/core/lib/debug/stats_data.cc | 4 +- src/core/lib/debug/stats_data.h | 2 + src/core/lib/debug/trace.cc | 2 + src/core/lib/debug/trace.h | 3 +- src/core/lib/gpr/alloc.cc | 3 +- src/core/lib/gpr/arena.cc | 2 + src/core/lib/gpr/arena.h | 2 + src/core/lib/gpr/atm.cc | 2 + src/core/lib/gpr/env.h | 2 + src/core/lib/gpr/fork.cc | 2 + src/core/lib/gpr/host_port.cc | 2 + src/core/lib/gpr/log.cc | 3 +- src/core/lib/gpr/mpscq.cc | 2 + src/core/lib/gpr/mpscq.h | 2 + src/core/lib/gpr/murmur_hash.cc | 2 + src/core/lib/gpr/spinlock.h | 2 + src/core/lib/gpr/string.cc | 3 +- src/core/lib/gpr/string.h | 4 +- src/core/lib/gpr/sync.cc | 2 + src/core/lib/gpr/thd.cc | 2 + src/core/lib/gpr/thd.h | 1 + src/core/lib/gpr/time.cc | 2 + src/core/lib/gpr/time_posix.cc | 1 + src/core/lib/gpr/time_precise.cc | 2 + src/core/lib/gpr/time_precise.h | 2 + src/core/lib/gpr/tls_gcc.h | 2 + src/core/lib/gpr/tls_msvc.h | 2 + src/core/lib/gpr/tls_pthread.h | 2 + src/core/lib/gpr/tmpfile.h | 2 + src/core/lib/gprpp/atomic_with_atm.h | 2 + src/core/lib/gprpp/atomic_with_std.h | 2 + src/core/lib/gprpp/inlined_vector.h | 2 + src/core/lib/gprpp/manual_constructor.h | 2 + src/core/lib/gprpp/memory.h | 2 + src/core/lib/gprpp/orphanable.h | 2 + src/core/lib/gprpp/ref_counted.h | 2 + src/core/lib/gprpp/ref_counted_ptr.h | 2 + src/core/lib/http/format_request.cc | 2 + src/core/lib/http/format_request.h | 2 + src/core/lib/http/httpcli.cc | 2 + src/core/lib/http/httpcli.h | 2 + src/core/lib/http/httpcli_security_connector.cc | 2 + src/core/lib/http/parser.cc | 2 + src/core/lib/http/parser.h | 3 +- src/core/lib/iomgr/call_combiner.cc | 2 + src/core/lib/iomgr/call_combiner.h | 2 + src/core/lib/iomgr/combiner.cc | 2 + src/core/lib/iomgr/combiner.h | 2 + src/core/lib/iomgr/endpoint.cc | 2 + src/core/lib/iomgr/endpoint.h | 2 + src/core/lib/iomgr/endpoint_pair.h | 2 + src/core/lib/iomgr/endpoint_pair_posix.cc | 2 + src/core/lib/iomgr/endpoint_pair_uv.cc | 2 + src/core/lib/iomgr/endpoint_pair_windows.cc | 2 + src/core/lib/iomgr/error.h | 2 + src/core/lib/iomgr/error_internal.h | 2 + src/core/lib/iomgr/ev_epoll1_linux.cc | 2 + src/core/lib/iomgr/ev_epoll1_linux.h | 2 + src/core/lib/iomgr/ev_epollex_linux.cc | 2 + src/core/lib/iomgr/ev_epollex_linux.h | 2 + src/core/lib/iomgr/ev_epollsig_linux.cc | 2 + src/core/lib/iomgr/ev_epollsig_linux.h | 2 + src/core/lib/iomgr/ev_poll_posix.cc | 2 + src/core/lib/iomgr/ev_poll_posix.h | 2 + src/core/lib/iomgr/ev_posix.cc | 2 + src/core/lib/iomgr/ev_posix.h | 2 + src/core/lib/iomgr/ev_windows.cc | 2 + src/core/lib/iomgr/exec_ctx.cc | 2 + src/core/lib/iomgr/exec_ctx.h | 2 + src/core/lib/iomgr/executor.cc | 2 + src/core/lib/iomgr/executor.h | 2 + src/core/lib/iomgr/fork_posix.cc | 2 + src/core/lib/iomgr/fork_windows.cc | 2 + src/core/lib/iomgr/gethostname_fallback.cc | 2 + src/core/lib/iomgr/gethostname_host_name_max.cc | 2 + src/core/lib/iomgr/gethostname_sysconf.cc | 2 + src/core/lib/iomgr/iocp_windows.cc | 2 + src/core/lib/iomgr/iocp_windows.h | 2 + src/core/lib/iomgr/iomgr.h | 2 + src/core/lib/iomgr/iomgr_internal.h | 2 + src/core/lib/iomgr/iomgr_posix.cc | 2 + src/core/lib/iomgr/iomgr_posix.h | 2 + src/core/lib/iomgr/iomgr_uv.cc | 2 + src/core/lib/iomgr/iomgr_uv.h | 2 + src/core/lib/iomgr/iomgr_windows.cc | 2 + src/core/lib/iomgr/is_epollexclusive_available.cc | 2 + src/core/lib/iomgr/is_epollexclusive_available.h | 2 + src/core/lib/iomgr/load_file.cc | 2 + src/core/lib/iomgr/load_file.h | 2 + src/core/lib/iomgr/lockfree_event.cc | 2 + src/core/lib/iomgr/lockfree_event.h | 2 + src/core/lib/iomgr/nameser.h | 2 + src/core/lib/iomgr/network_status_tracker.cc | 4 +- src/core/lib/iomgr/network_status_tracker.h | 2 + src/core/lib/iomgr/polling_entity.cc | 2 + src/core/lib/iomgr/polling_entity.h | 2 + src/core/lib/iomgr/pollset.h | 1 + src/core/lib/iomgr/pollset_set.h | 2 + src/core/lib/iomgr/pollset_set_uv.cc | 2 + src/core/lib/iomgr/pollset_set_windows.cc | 2 + src/core/lib/iomgr/pollset_set_windows.h | 2 + src/core/lib/iomgr/pollset_uv.cc | 2 + src/core/lib/iomgr/pollset_windows.cc | 2 + src/core/lib/iomgr/pollset_windows.h | 2 + src/core/lib/iomgr/resolve_address.h | 2 + src/core/lib/iomgr/resolve_address_posix.cc | 2 + src/core/lib/iomgr/resolve_address_uv.cc | 2 + src/core/lib/iomgr/resolve_address_windows.cc | 2 + src/core/lib/iomgr/resource_quota.cc | 2 + src/core/lib/iomgr/resource_quota.h | 2 + src/core/lib/iomgr/sockaddr.h | 2 + src/core/lib/iomgr/sockaddr_posix.h | 2 + src/core/lib/iomgr/sockaddr_utils.cc | 3 +- src/core/lib/iomgr/sockaddr_utils.h | 2 + src/core/lib/iomgr/sockaddr_windows.h | 2 + src/core/lib/iomgr/socket_factory_posix.cc | 2 + src/core/lib/iomgr/socket_factory_posix.h | 2 + src/core/lib/iomgr/socket_mutator.cc | 2 + src/core/lib/iomgr/socket_mutator.h | 2 + src/core/lib/iomgr/socket_utils.h | 2 + src/core/lib/iomgr/socket_utils_common_posix.cc | 3 +- src/core/lib/iomgr/socket_utils_linux.cc | 2 + src/core/lib/iomgr/socket_utils_posix.cc | 2 + src/core/lib/iomgr/socket_utils_posix.h | 2 + src/core/lib/iomgr/socket_utils_uv.cc | 2 + src/core/lib/iomgr/socket_utils_windows.cc | 2 + src/core/lib/iomgr/socket_windows.cc | 2 + src/core/lib/iomgr/socket_windows.h | 1 + src/core/lib/iomgr/sys_epoll_wrapper.h | 2 + src/core/lib/iomgr/tcp_client.h | 2 + src/core/lib/iomgr/tcp_client_posix.cc | 2 + src/core/lib/iomgr/tcp_client_posix.h | 2 + src/core/lib/iomgr/tcp_client_uv.cc | 2 + src/core/lib/iomgr/tcp_client_windows.cc | 2 + src/core/lib/iomgr/tcp_posix.cc | 2 + src/core/lib/iomgr/tcp_posix.h | 2 + src/core/lib/iomgr/tcp_server.h | 2 + src/core/lib/iomgr/tcp_server_posix.cc | 2 + src/core/lib/iomgr/tcp_server_utils_posix.h | 2 + .../lib/iomgr/tcp_server_utils_posix_common.cc | 2 + .../lib/iomgr/tcp_server_utils_posix_ifaddrs.cc | 2 + .../lib/iomgr/tcp_server_utils_posix_noifaddrs.cc | 2 + src/core/lib/iomgr/tcp_server_uv.cc | 2 + src/core/lib/iomgr/tcp_server_windows.cc | 2 + src/core/lib/iomgr/tcp_uv.cc | 2 + src/core/lib/iomgr/tcp_uv.h | 2 + src/core/lib/iomgr/tcp_windows.cc | 2 + src/core/lib/iomgr/tcp_windows.h | 2 + src/core/lib/iomgr/time_averaged_stats.cc | 2 + src/core/lib/iomgr/timer.h | 3 +- src/core/lib/iomgr/timer_generic.cc | 2 + src/core/lib/iomgr/timer_generic.h | 2 + src/core/lib/iomgr/timer_heap.cc | 2 + src/core/lib/iomgr/timer_heap.h | 2 + src/core/lib/iomgr/timer_manager.cc | 3 +- src/core/lib/iomgr/timer_manager.h | 2 + src/core/lib/iomgr/timer_uv.cc | 2 + src/core/lib/iomgr/timer_uv.h | 2 + src/core/lib/iomgr/udp_server.cc | 2 + src/core/lib/iomgr/udp_server.h | 2 + src/core/lib/iomgr/unix_sockets_posix.cc | 2 + src/core/lib/iomgr/unix_sockets_posix.h | 2 + src/core/lib/iomgr/unix_sockets_posix_noop.cc | 2 + src/core/lib/iomgr/wakeup_fd_cv.cc | 2 + src/core/lib/iomgr/wakeup_fd_cv.h | 2 + src/core/lib/iomgr/wakeup_fd_eventfd.cc | 2 + src/core/lib/iomgr/wakeup_fd_nospecial.cc | 2 + src/core/lib/iomgr/wakeup_fd_pipe.cc | 2 + src/core/lib/iomgr/wakeup_fd_pipe.h | 2 + src/core/lib/iomgr/wakeup_fd_posix.cc | 2 + src/core/lib/iomgr/wakeup_fd_posix.h | 2 + src/core/lib/json/json.cc | 2 + src/core/lib/json/json.h | 2 + src/core/lib/json/json_reader.cc | 4 +- src/core/lib/json/json_reader.h | 1 + src/core/lib/json/json_string.cc | 2 + src/core/lib/json/json_writer.cc | 4 +- src/core/lib/json/json_writer.h | 2 + src/core/lib/security/context/security_context.cc | 2 + src/core/lib/security/context/security_context.h | 2 + .../credentials/composite/composite_credentials.cc | 2 + .../credentials/composite/composite_credentials.h | 2 + src/core/lib/security/credentials/credentials.cc | 2 + src/core/lib/security/credentials/credentials.h | 2 + .../security/credentials/credentials_metadata.cc | 2 + .../security/credentials/fake/fake_credentials.cc | 2 + .../security/credentials/fake/fake_credentials.h | 2 + .../google_default/credentials_generic.cc | 2 + .../google_default/google_default_credentials.cc | 2 + .../security/credentials/iam/iam_credentials.cc | 2 + .../lib/security/credentials/iam/iam_credentials.h | 2 + .../lib/security/credentials/jwt/json_token.cc | 2 + src/core/lib/security/credentials/jwt/json_token.h | 2 + .../lib/security/credentials/jwt/jwt_credentials.h | 2 + .../lib/security/credentials/jwt/jwt_verifier.cc | 2 + .../lib/security/credentials/jwt/jwt_verifier.h | 2 + .../credentials/oauth2/oauth2_credentials.cc | 2 + .../credentials/oauth2/oauth2_credentials.h | 2 + .../credentials/plugin/plugin_credentials.cc | 2 + .../credentials/plugin/plugin_credentials.h | 2 + .../security/credentials/ssl/ssl_credentials.cc | 2 + .../lib/security/credentials/ssl/ssl_credentials.h | 2 + .../security_connector/security_connector.cc | 2 + .../security_connector/security_connector.h | 2 + src/core/lib/security/transport/auth_filters.h | 2 + .../lib/security/transport/client_auth_filter.cc | 2 + src/core/lib/security/transport/lb_targets_info.cc | 2 + src/core/lib/security/transport/lb_targets_info.h | 2 + src/core/lib/security/transport/secure_endpoint.cc | 2 + src/core/lib/security/transport/secure_endpoint.h | 2 + .../lib/security/transport/security_handshaker.cc | 2 + .../lib/security/transport/security_handshaker.h | 2 + .../lib/security/transport/server_auth_filter.cc | 2 + src/core/lib/security/transport/tsi_error.cc | 2 + src/core/lib/security/transport/tsi_error.h | 2 + src/core/lib/security/util/json_util.cc | 2 + src/core/lib/security/util/json_util.h | 2 + src/core/lib/slice/b64.cc | 2 + src/core/lib/slice/b64.h | 2 + src/core/lib/slice/percent_encoding.cc | 2 + src/core/lib/slice/percent_encoding.h | 2 + src/core/lib/slice/slice.cc | 2 + src/core/lib/slice/slice_buffer.cc | 3 +- src/core/lib/slice/slice_hash_table.cc | 2 + src/core/lib/slice/slice_hash_table.h | 2 + src/core/lib/slice/slice_intern.cc | 2 + src/core/lib/slice/slice_internal.h | 2 + src/core/lib/slice/slice_string_helpers.cc | 2 + src/core/lib/slice/slice_string_helpers.h | 3 +- src/core/lib/slice/slice_traits.h | 2 + src/core/lib/surface/api_trace.cc | 4 +- src/core/lib/surface/api_trace.h | 2 + src/core/lib/surface/byte_buffer.cc | 2 + src/core/lib/surface/byte_buffer_reader.cc | 2 + src/core/lib/surface/call.cc | 2 + src/core/lib/surface/call.h | 2 + src/core/lib/surface/call_details.cc | 2 + src/core/lib/surface/call_log_batch.cc | 2 + src/core/lib/surface/call_test_only.h | 2 + src/core/lib/surface/channel.cc | 2 + src/core/lib/surface/channel.h | 2 + src/core/lib/surface/channel_init.cc | 2 + src/core/lib/surface/channel_init.h | 2 + src/core/lib/surface/channel_ping.cc | 2 + src/core/lib/surface/channel_stack_type.cc | 5 +- src/core/lib/surface/channel_stack_type.h | 2 + src/core/lib/surface/completion_queue.h | 2 + src/core/lib/surface/completion_queue_factory.cc | 4 +- src/core/lib/surface/completion_queue_factory.h | 2 + src/core/lib/surface/event_string.cc | 2 + src/core/lib/surface/event_string.h | 2 + src/core/lib/surface/init_unsecure.cc | 2 + src/core/lib/surface/lame_client.cc | 2 + src/core/lib/surface/lame_client.h | 2 + src/core/lib/surface/metadata_array.cc | 2 + src/core/lib/surface/server.cc | 2 + src/core/lib/surface/server.h | 2 + src/core/lib/surface/validate_metadata.cc | 3 +- src/core/lib/surface/validate_metadata.h | 2 + src/core/lib/surface/version.cc | 2 + src/core/lib/transport/bdp_estimator.cc | 2 + src/core/lib/transport/byte_stream.cc | 2 + src/core/lib/transport/byte_stream.h | 2 + src/core/lib/transport/connectivity_state.cc | 2 + src/core/lib/transport/connectivity_state.h | 2 + src/core/lib/transport/error_utils.cc | 2 + src/core/lib/transport/error_utils.h | 2 + src/core/lib/transport/metadata.cc | 2 + src/core/lib/transport/metadata.h | 2 + src/core/lib/transport/metadata_batch.cc | 2 + src/core/lib/transport/metadata_batch.h | 3 +- src/core/lib/transport/pid_controller.cc | 2 + src/core/lib/transport/pid_controller.h | 2 + src/core/lib/transport/service_config.cc | 2 + src/core/lib/transport/service_config.h | 2 + src/core/lib/transport/static_metadata.cc | 2 + src/core/lib/transport/static_metadata.h | 2 + src/core/lib/transport/status_conversion.cc | 2 + src/core/lib/transport/status_conversion.h | 2 + src/core/lib/transport/timeout_encoding.cc | 3 +- src/core/lib/transport/timeout_encoding.h | 2 + src/core/lib/transport/transport.cc | 2 + src/core/lib/transport/transport.h | 2 + src/core/lib/transport/transport_impl.h | 2 + .../plugin_registry/grpc_cronet_plugin_registry.cc | 2 + src/core/plugin_registry/grpc_plugin_registry.cc | 2 + .../grpc_unsecure_plugin_registry.cc | 2 + src/core/tsi/alts_transport_security.cc | 2 + src/core/tsi/alts_transport_security.h | 2 + src/core/tsi/fake_transport_security.cc | 3 +- src/core/tsi/fake_transport_security.h | 2 + src/core/tsi/ssl_transport_security.cc | 4 +- src/core/tsi/ssl_transport_security.h | 2 + src/core/tsi/ssl_types.h | 2 + src/core/tsi/transport_security.cc | 2 + src/core/tsi/transport_security.h | 2 + src/core/tsi/transport_security_adapter.cc | 2 + src/core/tsi/transport_security_adapter.h | 2 + src/core/tsi/transport_security_grpc.cc | 2 + src/core/tsi/transport_security_grpc.h | 2 + src/core/tsi/transport_security_interface.h | 2 + templates/src/core/lib/surface/version.cc.template | 2 + templates/src/core/plugin_registry.template | 2 + tools/run_tests/sanity/check_port_platform.py | 64 ++++++++++++++++++++++ tools/run_tests/sanity/sanity_tests.yaml | 1 + 501 files changed, 1061 insertions(+), 52 deletions(-) create mode 100755 tools/run_tests/sanity/check_port_platform.py (limited to 'src/core/ext') diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 7669582af2..ee740f4794 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -19,6 +19,8 @@ #ifndef GRPC_BYTE_BUFFER_H #define GRPC_BYTE_BUFFER_H +#include + #include #include diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index 6bd0784788..15e06cad7c 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -19,6 +19,8 @@ #ifndef GRPC_BYTE_BUFFER_READER_H #define GRPC_BYTE_BUFFER_READER_H +#include + #include #endif /* GRPC_BYTE_BUFFER_READER_H */ diff --git a/include/grpc/census.h b/include/grpc/census.h index 2258af8898..4894f1c096 100644 --- a/include/grpc/census.h +++ b/include/grpc/census.h @@ -19,6 +19,8 @@ #ifndef GRPC_CENSUS_H #define GRPC_CENSUS_H +#include + #include #ifdef __cplusplus diff --git a/include/grpc/fork.h b/include/grpc/fork.h index ca45e1139c..26f9df9871 100644 --- a/include/grpc/fork.h +++ b/include/grpc/fork.h @@ -19,6 +19,8 @@ #ifndef GRPC_FORK_H #define GRPC_FORK_H +#include + #include #endif /* GRPC_FORK_H */ diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index aec78be31b..c129a66949 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -19,6 +19,8 @@ #ifndef GRPC_GRPC_H #define GRPC_GRPC_H +#include + #include #include diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h index 127d5d038d..289cfcda67 100644 --- a/include/grpc/grpc_cronet.h +++ b/include/grpc/grpc_cronet.h @@ -19,6 +19,8 @@ #ifndef GRPC_GRPC_CRONET_H #define GRPC_GRPC_CRONET_H +#include + #include #ifdef __cplusplus diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index fa7ebced3f..5f1ada5aaf 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -19,9 +19,10 @@ #ifndef GRPC_GRPC_POSIX_H #define GRPC_GRPC_POSIX_H -#include #include +#include + #include #ifdef __cplusplus diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 08776337cc..abc591fd75 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -19,6 +19,8 @@ #ifndef GRPC_GRPC_SECURITY_H #define GRPC_GRPC_SECURITY_H +#include + #include #include #include diff --git a/include/grpc/impl/codegen/byte_buffer.h b/include/grpc/impl/codegen/byte_buffer.h index f8dfbd1d7d..774655ed66 100644 --- a/include/grpc/impl/codegen/byte_buffer.h +++ b/include/grpc/impl/codegen/byte_buffer.h @@ -19,6 +19,8 @@ #ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H #define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H +#include + #include #ifdef __cplusplus diff --git a/include/grpc/impl/codegen/sync.h b/include/grpc/impl/codegen/sync.h index 6cdb0c5153..3df68c644f 100644 --- a/include/grpc/impl/codegen/sync.h +++ b/include/grpc/impl/codegen/sync.h @@ -43,6 +43,7 @@ extern "C" { /* Platform-specific type declarations of gpr_mu and gpr_cv. */ #include + #include #if defined(GPR_POSIX_SYNC) diff --git a/include/grpc/impl/codegen/sync_custom.h b/include/grpc/impl/codegen/sync_custom.h index 0840ad26bf..69b1bf6cd1 100644 --- a/include/grpc/impl/codegen/sync_custom.h +++ b/include/grpc/impl/codegen/sync_custom.h @@ -19,6 +19,8 @@ #ifndef GRPC_IMPL_CODEGEN_SYNC_CUSTOM_H #define GRPC_IMPL_CODEGEN_SYNC_CUSTOM_H +#include + #include /* Users defining GPR_CUSTOM_SYNC need to define the following macros. */ diff --git a/include/grpc/impl/codegen/sync_generic.h b/include/grpc/impl/codegen/sync_generic.h index 83f905e120..d64db58a84 100644 --- a/include/grpc/impl/codegen/sync_generic.h +++ b/include/grpc/impl/codegen/sync_generic.h @@ -20,6 +20,8 @@ #define GRPC_IMPL_CODEGEN_SYNC_GENERIC_H /* Generic type defintions for gpr_sync. */ +#include + #include /* gpr_event */ diff --git a/include/grpc/impl/codegen/sync_posix.h b/include/grpc/impl/codegen/sync_posix.h index 6a3aed92c1..d927046c53 100644 --- a/include/grpc/impl/codegen/sync_posix.h +++ b/include/grpc/impl/codegen/sync_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_IMPL_CODEGEN_SYNC_POSIX_H #define GRPC_IMPL_CODEGEN_SYNC_POSIX_H +#include + #include #include diff --git a/include/grpc/impl/codegen/sync_windows.h b/include/grpc/impl/codegen/sync_windows.h index 39b127603d..ba5d5aede0 100644 --- a/include/grpc/impl/codegen/sync_windows.h +++ b/include/grpc/impl/codegen/sync_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H #define GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H +#include + #include typedef struct { diff --git a/include/grpc/slice.h b/include/grpc/slice.h index 10b6a624b3..ce482922af 100644 --- a/include/grpc/slice.h +++ b/include/grpc/slice.h @@ -19,6 +19,8 @@ #ifndef GRPC_SLICE_H #define GRPC_SLICE_H +#include + #include #include diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index 30833d02db..3260019ca7 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -19,6 +19,8 @@ #ifndef GRPC_SLICE_BUFFER_H #define GRPC_SLICE_BUFFER_H +#include + #include #ifdef __cplusplus diff --git a/include/grpc/status.h b/include/grpc/status.h index 9d8f50bc02..ecb9668bbb 100644 --- a/include/grpc/status.h +++ b/include/grpc/status.h @@ -19,6 +19,8 @@ #ifndef GRPC_STATUS_H #define GRPC_STATUS_H +#include + #include #endif /* GRPC_STATUS_H */ diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h index 577d4f0069..8bd940bec4 100644 --- a/include/grpc/support/alloc.h +++ b/include/grpc/support/alloc.h @@ -19,9 +19,9 @@ #ifndef GRPC_SUPPORT_ALLOC_H #define GRPC_SUPPORT_ALLOC_H -#include +#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/support/atm.h b/include/grpc/support/atm.h index b3afa520a0..073b0a6fcf 100644 --- a/include/grpc/support/atm.h +++ b/include/grpc/support/atm.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_ATM_H #define GRPC_SUPPORT_ATM_H +#include + #include #endif /* GRPC_SUPPORT_ATM_H */ diff --git a/include/grpc/support/atm_gcc_atomic.h b/include/grpc/support/atm_gcc_atomic.h index e7b5ec402f..ae603db497 100644 --- a/include/grpc/support/atm_gcc_atomic.h +++ b/include/grpc/support/atm_gcc_atomic.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H #define GRPC_SUPPORT_ATM_GCC_ATOMIC_H +#include + #include #endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */ diff --git a/include/grpc/support/atm_gcc_sync.h b/include/grpc/support/atm_gcc_sync.h index 7284897706..6f51fdb1aa 100644 --- a/include/grpc/support/atm_gcc_sync.h +++ b/include/grpc/support/atm_gcc_sync.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_ATM_GCC_SYNC_H #define GRPC_SUPPORT_ATM_GCC_SYNC_H +#include + #include #endif /* GRPC_SUPPORT_ATM_GCC_SYNC_H */ diff --git a/include/grpc/support/atm_windows.h b/include/grpc/support/atm_windows.h index 554c59a830..36955e4dae 100644 --- a/include/grpc/support/atm_windows.h +++ b/include/grpc/support/atm_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_ATM_WINDOWS_H #define GRPC_SUPPORT_ATM_WINDOWS_H +#include + #include #endif /* GRPC_SUPPORT_ATM_WINDOWS_H */ diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 658e251545..ccb4b304cc 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -20,6 +20,7 @@ #define GRPC_SUPPORT_LOG_H #include + #include #include #include /* for abort() */ diff --git a/include/grpc/support/sync.h b/include/grpc/support/sync.h index 75192673a6..91d1fa79b5 100644 --- a/include/grpc/support/sync.h +++ b/include/grpc/support/sync.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_SYNC_H #define GRPC_SUPPORT_SYNC_H +#include + #include /* for gpr_timespec */ #include diff --git a/include/grpc/support/sync_custom.h b/include/grpc/support/sync_custom.h index b575f5e002..27cf0e0578 100644 --- a/include/grpc/support/sync_custom.h +++ b/include/grpc/support/sync_custom.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_SYNC_CUSTOM_H #define GRPC_SUPPORT_SYNC_CUSTOM_H +#include + #include #endif /* GRPC_SUPPORT_SYNC_CUSTOM_H */ diff --git a/include/grpc/support/sync_generic.h b/include/grpc/support/sync_generic.h index 970b7a5d9f..93028c4af0 100644 --- a/include/grpc/support/sync_generic.h +++ b/include/grpc/support/sync_generic.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_SYNC_GENERIC_H #define GRPC_SUPPORT_SYNC_GENERIC_H +#include + #include #endif /* GRPC_SUPPORT_SYNC_GENERIC_H */ diff --git a/include/grpc/support/sync_posix.h b/include/grpc/support/sync_posix.h index 482a6004ee..3dce7ee48c 100644 --- a/include/grpc/support/sync_posix.h +++ b/include/grpc/support/sync_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_SYNC_POSIX_H #define GRPC_SUPPORT_SYNC_POSIX_H +#include + #include #endif /* GRPC_SUPPORT_SYNC_POSIX_H */ diff --git a/include/grpc/support/sync_windows.h b/include/grpc/support/sync_windows.h index 90ce8b7765..a493c86422 100644 --- a/include/grpc/support/sync_windows.h +++ b/include/grpc/support/sync_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_SYNC_WINDOWS_H #define GRPC_SUPPORT_SYNC_WINDOWS_H +#include + #include #endif /* GRPC_SUPPORT_SYNC_WINDOWS_H */ diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h index 62d354aafe..550ffc2c20 100644 --- a/include/grpc/support/time.h +++ b/include/grpc/support/time.h @@ -19,6 +19,8 @@ #ifndef GRPC_SUPPORT_TIME_H #define GRPC_SUPPORT_TIME_H +#include + #include #include diff --git a/src/core/ext/census/grpc_context.cc b/src/core/ext/census/grpc_context.cc index 069e8f1486..599a798dda 100644 --- a/src/core/ext/census/grpc_context.cc +++ b/src/core/ext/census/grpc_context.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/ext/filters/client_channel/backup_poller.cc b/src/core/ext/filters/client_channel/backup_poller.cc index ee90b499eb..e7d72d1fde 100644 --- a/src/core/ext/filters/client_channel/backup_poller.cc +++ b/src/core/ext/filters/client_channel/backup_poller.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/backup_poller.h" #include diff --git a/src/core/ext/filters/client_channel/backup_poller.h b/src/core/ext/filters/client_channel/backup_poller.h index 551e0331dc..45bdf10d6c 100644 --- a/src/core/ext/filters/client_channel/backup_poller.h +++ b/src/core/ext/filters/client_channel/backup_poller.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKUP_POLLER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKUP_POLLER_H +#include + #include #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/filters/client_channel/channel_connectivity.cc b/src/core/ext/filters/client_channel/channel_connectivity.cc index 31a5c31124..37860e82e3 100644 --- a/src/core/ext/filters/client_channel/channel_connectivity.cc +++ b/src/core/ext/filters/client_channel/channel_connectivity.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/channel.h" #include diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h index 9670405cbe..a21e5623a7 100644 --- a/src/core/ext/filters/client_channel/client_channel.h +++ b/src/core/ext/filters/client_channel/client_channel.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H +#include + #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/client_channel/client_channel_factory.cc b/src/core/ext/filters/client_channel/client_channel_factory.cc index 3baf5b31ab..172e9f03c7 100644 --- a/src/core/ext/filters/client_channel/client_channel_factory.cc +++ b/src/core/ext/filters/client_channel/client_channel_factory.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/filters/client_channel/client_channel_factory.h b/src/core/ext/filters/client_channel/client_channel_factory.h index 766ebb9389..601ec46b2a 100644 --- a/src/core/ext/filters/client_channel/client_channel_factory.h +++ b/src/core/ext/filters/client_channel/client_channel_factory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H +#include + #include #include "src/core/ext/filters/client_channel/subchannel.h" diff --git a/src/core/ext/filters/client_channel/connector.cc b/src/core/ext/filters/client_channel/connector.cc index c8bf2f3e1c..5e04b3b453 100644 --- a/src/core/ext/filters/client_channel/connector.cc +++ b/src/core/ext/filters/client_channel/connector.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/connector.h" grpc_connector* grpc_connector_ref(grpc_connector* connector) { diff --git a/src/core/ext/filters/client_channel/connector.h b/src/core/ext/filters/client_channel/connector.h index d657658d67..556594929c 100644 --- a/src/core/ext/filters/client_channel/connector.h +++ b/src/core/ext/filters/client_channel/connector.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 248a6347d5..fb29fa788d 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" #include diff --git a/src/core/ext/filters/client_channel/http_proxy.cc b/src/core/ext/filters/client_channel/http_proxy.cc index d42376413d..29a6c0e367 100644 --- a/src/core/ext/filters/client_channel/http_proxy.cc +++ b/src/core/ext/filters/client_channel/http_proxy.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/http_proxy.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc index 59f4cdafb3..fa63dd75b5 100644 --- a/src/core/ext/filters/client_channel/lb_policy.cc +++ b/src/core/ext/filters/client_channel/lb_policy.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy.h" #include "src/core/lib/iomgr/combiner.h" diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 6de652747e..c3e43e5ef6 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H +#include + #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/lib/gprpp/abstract.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc index 1a3a1f029c..18ef1f6ff5 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h index 04de7a04df..838e2ef1ca 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_client_load_reporting_filter; diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index e38211fbf4..7c0e33ff0a 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -58,6 +58,8 @@ // using that endpoint. Because of various transitive includes in uv.h, // including windows.h on Windows, uv.h must be included before other system // headers. Therefore, sockaddr.h must always be included first. +#include + #include "src/core/lib/iomgr/sockaddr.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc index ebbe597d29..fd873f096d 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h index 6635010434..825065a9c3 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H +#include + #include "src/core/ext/filters/client_channel/lb_policy_factory.h" /// Makes any necessary modifications to \a args for use in the grpclb diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc index 254a5dfd16..7abd7f37f9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc index 0b5a798be3..dfbaead7d5 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h index d4b9d06848..c971e56883 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H +#include + #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc index c388b6ba77..7ef3bcf24f 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" #include "third_party/nanopb/pb_decode.h" #include "third_party/nanopb/pb_encode.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h index ccb0212643..d4270f2536 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H +#include + #include #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index f1878a594e..818b93c882 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index 178e299b61..7ef7b0f6fc 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -24,6 +24,8 @@ * updates. Note however that updates will start picking from the beginning of * the updated list. */ +#include + #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc index f1580e8b91..79cb64c6c6 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 7a8f5f1029..6889d596ac 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_SUBCHANNEL_LIST_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_SUBCHANNEL_LIST_H +#include + #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.cc b/src/core/ext/filters/client_channel/lb_policy_factory.cc index 2018aabb91..80646a10cc 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.cc +++ b/src/core/ext/filters/client_channel/lb_policy_factory.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index e0e7d8bf5c..b8bbd32072 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H +#include + #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.cc b/src/core/ext/filters/client_channel/lb_policy_registry.cc index f495cdb3c2..d651b1120d 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.cc +++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h index 14c21dfe63..2283d848bd 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.h +++ b/src/core/ext/filters/client_channel/lb_policy_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H +#include + #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" diff --git a/src/core/ext/filters/client_channel/parse_address.cc b/src/core/ext/filters/client_channel/parse_address.cc index 473c7542df..e78dc99e0b 100644 --- a/src/core/ext/filters/client_channel/parse_address.cc +++ b/src/core/ext/filters/client_channel/parse_address.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h index ca0a0d18f0..9a88b66edc 100644 --- a/src/core/ext/filters/client_channel/parse_address.h +++ b/src/core/ext/filters/client_channel/parse_address.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H +#include + #include #include "src/core/ext/filters/client_channel/uri_parser.h" diff --git a/src/core/ext/filters/client_channel/proxy_mapper.cc b/src/core/ext/filters/client_channel/proxy_mapper.cc index be85cfcced..c4da06778d 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper.cc +++ b/src/core/ext/filters/client_channel/proxy_mapper.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/proxy_mapper.h" void grpc_proxy_mapper_init(const grpc_proxy_mapper_vtable* vtable, diff --git a/src/core/ext/filters/client_channel/proxy_mapper.h b/src/core/ext/filters/client_channel/proxy_mapper.h index ce3e65ee46..634b0ed7bf 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper.h +++ b/src/core/ext/filters/client_channel/proxy_mapper.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H +#include + #include #include diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.cc b/src/core/ext/filters/client_channel/proxy_mapper_registry.cc index b42597e363..a02a5f5e2c 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.h b/src/core/ext/filters/client_channel/proxy_mapper_registry.h index 2ad6c04e1d..326b582b99 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper_registry.h +++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H +#include + #include "src/core/ext/filters/client_channel/proxy_mapper.h" void grpc_proxy_mapper_registry_init(); diff --git a/src/core/ext/filters/client_channel/resolver.cc b/src/core/ext/filters/client_channel/resolver.cc index 860c2eea1e..cd11eeb9e4 100644 --- a/src/core/ext/filters/client_channel/resolver.cc +++ b/src/core/ext/filters/client_channel/resolver.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/lib/iomgr/combiner.h" diff --git a/src/core/ext/filters/client_channel/resolver.h b/src/core/ext/filters/client_channel/resolver.h index 62fcb49a41..1685a6c803 100644 --- a/src/core/ext/filters/client_channel/resolver.h +++ b/src/core/ext/filters/client_channel/resolver.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H +#include + #include #include "src/core/lib/gprpp/abstract.h" diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc index 0442b1e496..a24e8ff352 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -17,6 +17,7 @@ */ #include + #if GRPC_ARES == 1 && !defined(GRPC_UV) #include diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h index ba7dad63cf..0bc13e35f4 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc index 10bc8f6074..b604f2bf14 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc @@ -16,6 +16,7 @@ * */ #include + #include "src/core/lib/iomgr/port.h" #if GRPC_ARES == 1 && defined(GRPC_POSIX_SOCKET) diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc index 82b5545601..71b06eb87e 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc @@ -17,6 +17,7 @@ */ #include + #if GRPC_ARES == 1 && !defined(GRPC_UV) #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 86d870e0a6..bda9cd1729 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H +#include + #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc index a184cf2d57..5096e480bc 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc @@ -17,6 +17,7 @@ */ #include + #if GRPC_ARES != 1 || defined(GRPC_UV) #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc index b01e608c3f..4d8958f519 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc @@ -17,6 +17,8 @@ // This is similar to the sockaddr resolver, except that it supports a // bunch of query args that are useful for dependency injection in tests. +#include + #include #include #include @@ -24,7 +26,6 @@ #include #include -#include #include #include "src/core/ext/filters/client_channel/lb_policy_factory.h" diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h index d42811d913..858f35851d 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FAKE_FAKE_RESOLVER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FAKE_FAKE_RESOLVER_H +#include + #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc index 966b9fd3f2..f74ac5aebe 100644 --- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc @@ -16,13 +16,14 @@ * */ +#include + #include #include #include #include #include -#include #include #include "src/core/ext/filters/client_channel/lb_policy_factory.h" diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h index f9b9501236..ee3cfeeb9b 100644 --- a/src/core/ext/filters/client_channel/resolver_factory.h +++ b/src/core/ext/filters/client_channel/resolver_factory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H +#include + #include #include "src/core/ext/filters/client_channel/resolver.h" diff --git a/src/core/ext/filters/client_channel/resolver_registry.cc b/src/core/ext/filters/client_channel/resolver_registry.cc index 036e81d0ae..91c0267f95 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.cc +++ b/src/core/ext/filters/client_channel/resolver_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/resolver_registry.h" #include diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/ext/filters/client_channel/resolver_registry.h index 260336de83..d6ec6811bd 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.h +++ b/src/core/ext/filters/client_channel/resolver_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H +#include + #include "src/core/ext/filters/client_channel/resolver_factory.h" #include "src/core/lib/gprpp/inlined_vector.h" #include "src/core/lib/gprpp/memory.h" diff --git a/src/core/ext/filters/client_channel/retry_throttle.cc b/src/core/ext/filters/client_channel/retry_throttle.cc index a98e27860a..450a332342 100644 --- a/src/core/ext/filters/client_channel/retry_throttle.cc +++ b/src/core/ext/filters/client_channel/retry_throttle.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/retry_throttle.h" #include diff --git a/src/core/ext/filters/client_channel/retry_throttle.h b/src/core/ext/filters/client_channel/retry_throttle.h index bf99297e98..0505fc27f2 100644 --- a/src/core/ext/filters/client_channel/retry_throttle.h +++ b/src/core/ext/filters/client_channel/retry_throttle.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H +#include + #include /// Tracks retry throttling data for an individual server name. diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index fbe07c58f7..1304b4a6ad 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/subchannel.h" #include diff --git a/src/core/ext/filters/client_channel/subchannel.h b/src/core/ext/filters/client_channel/subchannel.h index d2b45ae9c8..7f997d9924 100644 --- a/src/core/ext/filters/client_channel/subchannel.h +++ b/src/core/ext/filters/client_channel/subchannel.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_H +#include + #include "src/core/ext/filters/client_channel/connector.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/gpr/arena.h" diff --git a/src/core/ext/filters/client_channel/subchannel_index.cc b/src/core/ext/filters/client_channel/subchannel_index.cc index d1dc5ee970..cb02b1a748 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.cc +++ b/src/core/ext/filters/client_channel/subchannel_index.cc @@ -16,6 +16,8 @@ // // +#include + #include "src/core/ext/filters/client_channel/subchannel_index.h" #include diff --git a/src/core/ext/filters/client_channel/subchannel_index.h b/src/core/ext/filters/client_channel/subchannel_index.h index bd160a3b13..a7dae9d47d 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.h +++ b/src/core/ext/filters/client_channel/subchannel_index.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H +#include + #include "src/core/ext/filters/client_channel/subchannel.h" /** \file Provides an index of active subchannels so that they can be diff --git a/src/core/ext/filters/client_channel/uri_parser.cc b/src/core/ext/filters/client_channel/uri_parser.cc index cd07a6fbf5..0572034a9c 100644 --- a/src/core/ext/filters/client_channel/uri_parser.cc +++ b/src/core/ext/filters/client_channel/uri_parser.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/client_channel/uri_parser.h" #include @@ -23,7 +25,6 @@ #include #include #include -#include #include #include "src/core/lib/gpr/string.h" diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/ext/filters/client_channel/uri_parser.h index 24ff06c0b5..1966da932b 100644 --- a/src/core/ext/filters/client_channel/uri_parser.h +++ b/src/core/ext/filters/client_channel/uri_parser.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/filters/deadline/deadline_filter.cc b/src/core/ext/filters/deadline/deadline_filter.cc index 76c1204090..dda3b61108 100644 --- a/src/core/ext/filters/deadline/deadline_filter.cc +++ b/src/core/ext/filters/deadline/deadline_filter.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/ext/filters/deadline/deadline_filter.h" #include diff --git a/src/core/ext/filters/deadline/deadline_filter.h b/src/core/ext/filters/deadline/deadline_filter.h index 4de817ef54..13207cbd6f 100644 --- a/src/core/ext/filters/deadline/deadline_filter.h +++ b/src/core/ext/filters/deadline/deadline_filter.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H #define GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/timer.h" diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc index 80643f8584..58aefd17c7 100644 --- a/src/core/ext/filters/http/client/http_client_filter.cc +++ b/src/core/ext/filters/http/client/http_client_filter.cc @@ -15,11 +15,13 @@ * */ -#include "src/core/ext/filters/http/client/http_client_filter.h" +#include + #include #include #include #include +#include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/b64.h" diff --git a/src/core/ext/filters/http/client/http_client_filter.h b/src/core/ext/filters/http/client/http_client_filter.h index ec8177c436..b7cef33f5c 100644 --- a/src/core/ext/filters/http/client/http_client_filter.h +++ b/src/core/ext/filters/http/client/http_client_filter.h @@ -18,6 +18,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_HTTP_CLIENT_HTTP_CLIENT_FILTER_H #define GRPC_CORE_EXT_FILTERS_HTTP_CLIENT_HTTP_CLIENT_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" /* Processes metadata on the client side for HTTP2 transports */ diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index 56fe1e5c24..f03fa0141d 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/ext/filters/http/client/http_client_filter.h" diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.cc b/src/core/ext/filters/http/message_compress/message_compress_filter.cc index 73220a0ea1..efe0085c5b 100644 --- a/src/core/ext/filters/http/message_compress/message_compress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_compress_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.h b/src/core/ext/filters/http/message_compress/message_compress_filter.h index 62207911c7..e163e3cf98 100644 --- a/src/core/ext/filters/http/message_compress/message_compress_filter.h +++ b/src/core/ext/filters/http/message_compress/message_compress_filter.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H #define GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H +#include + #include #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index aeb0c39df9..57ec8dce34 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/http/server/http_server_filter.h" #include diff --git a/src/core/ext/filters/http/server/http_server_filter.h b/src/core/ext/filters/http/server/http_server_filter.h index c0f678a329..4eb130b1fd 100644 --- a/src/core/ext/filters/http/server/http_server_filter.h +++ b/src/core/ext/filters/http/server/http_server_filter.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_HTTP_SERVER_HTTP_SERVER_FILTER_H #define GRPC_CORE_EXT_FILTERS_HTTP_SERVER_HTTP_SERVER_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" /* Processes metadata on the client side for HTTP2 transports */ diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 79b144a6eb..0d349e2a89 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h index 1baee5e7cd..b459a8ec5f 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_FILTER_H #define GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_FILTER_H +#include + #include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h index 4b694d336d..c20aaa744f 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h +++ b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_PLUGIN_H #define GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_PLUGIN_H +#include + #include #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/max_age/max_age_filter.cc b/src/core/ext/filters/max_age/max_age_filter.cc index abb9d69036..acb1d66fa8 100644 --- a/src/core/ext/filters/max_age/max_age_filter.cc +++ b/src/core/ext/filters/max_age/max_age_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/filters/max_age/max_age_filter.h" #include diff --git a/src/core/ext/filters/max_age/max_age_filter.h b/src/core/ext/filters/max_age/max_age_filter.h index 68fb4a4ca5..989322244f 100644 --- a/src/core/ext/filters/max_age/max_age_filter.h +++ b/src/core/ext/filters/max_age/max_age_filter.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_MAX_AGE_MAX_AGE_FILTER_H #define GRPC_CORE_EXT_FILTERS_MAX_AGE_MAX_AGE_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_max_age_filter; diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 0fb3935609..63a9e566d3 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/ext/filters/message_size/message_size_filter.h" #include diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index d3667f7003..f66636e583 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H #define GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_message_size_filter; diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc index 3092ed2056..bed1004c57 100644 --- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h" #include diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h index 9dae4f0734..94d20f0c4a 100644 --- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h +++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H #define GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H +#include + #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_workaround_cronet_compression_filter; diff --git a/src/core/ext/filters/workarounds/workaround_utils.cc b/src/core/ext/filters/workarounds/workaround_utils.cc index 850ed75ec9..4dabe896d3 100644 --- a/src/core/ext/filters/workarounds/workaround_utils.cc +++ b/src/core/ext/filters/workarounds/workaround_utils.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/ext/filters/workarounds/workaround_utils.h" #include diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h index d6ef5e84fa..f172ccc078 100644 --- a/src/core/ext/filters/workarounds/workaround_utils.h +++ b/src/core/ext/filters/workarounds/workaround_utils.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H #define GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H +#include + #include #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/chttp2/alpn/alpn.cc b/src/core/ext/transport/chttp2/alpn/alpn.cc index 5c4bfd03fa..1fdab76dbf 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.cc +++ b/src/core/ext/transport/chttp2/alpn/alpn.cc @@ -16,8 +16,10 @@ * */ -#include "src/core/ext/transport/chttp2/alpn/alpn.h" +#include + #include +#include "src/core/ext/transport/chttp2/alpn/alpn.h" #include "src/core/lib/gpr/useful.h" diff --git a/src/core/ext/transport/chttp2/alpn/alpn.h b/src/core/ext/transport/chttp2/alpn/alpn.h index fd7513c665..0042eafd95 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.h +++ b/src/core/ext/transport/chttp2/alpn/alpn.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H +#include + #include /* Retuns 1 if the version is supported, 0 otherwise. */ diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc index 7eb9ebc27e..e7522ffba8 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index e258892cfc..04da441309 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H +#include + #include "src/core/ext/filters/client_channel/connector.h" grpc_connector* grpc_chttp2_connector_create(); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc index ef1d3fb53b..60800365b8 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc index 0cdea5a94e..479f0da572 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc @@ -16,10 +16,11 @@ * */ +#include + #include #include #include -#include #ifdef GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index f3cc16d8cc..dcfcd243a9 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 90b2ee1af9..687cc483f6 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/server/chttp2_server.h" #include diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index 7de859da42..7b41972160 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc index 52c42d056c..822236dd2d 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc index dafd4af6ce..371e463814 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -16,10 +16,11 @@ * */ +#include + #include #include #include -#include #ifdef GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc index 723af97ff0..6689a17da6 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.cc b/src/core/ext/transport/chttp2/transport/bin_decoder.cc index 831a36961e..f0f32da028 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -16,9 +16,11 @@ * */ -#include "src/core/ext/transport/chttp2/transport/bin_decoder.h" +#include + #include #include +#include "src/core/ext/transport/chttp2/transport/bin_decoder.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index a0d74fb20d..8a4d4a7179 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H +#include + #include #include diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.cc b/src/core/ext/transport/chttp2/transport/bin_encoder.cc index e3b8adbe73..bad29e3421 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 93ad0dfdea..1b7bb1574a 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H +#include + #include /* base64 encode a slice. Returns a new slice, does not take ownership of the diff --git a/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc index a69908116a..531ea73e9e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/gpr/env.h" diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 2fc3c4fa41..89115b66ed 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -16,10 +16,10 @@ * */ -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" - #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" + #include #include #include diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index 34519ceec9..9d55b3f4b0 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H +#include + #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc index 45b6f97b05..e89c363200 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.cc +++ b/src/core/ext/transport/chttp2/transport/flow_control.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index b58027790d..120fefc8b7 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -20,6 +20,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FLOW_CONTROL_H #include + #include #include "src/core/ext/transport/chttp2/transport/http2_settings.h" diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index dba4c004ec..083c0076e7 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -19,9 +19,10 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H -#include #include +#include + #include "src/core/lib/iomgr/error.h" /* defined in internal.h */ diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc index 721f0a55a1..0d37a494a2 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.cc +++ b/src/core/ext/transport/chttp2/transport/frame_data.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_data.h" #include diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index 964cc59b1b..3efbbf9f76 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -21,6 +21,8 @@ /* Parser for GRPC streams embedded in DATA frames */ +#include + #include #include #include "src/core/ext/transport/chttp2/transport/frame.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.cc b/src/core/ext/transport/chttp2/transport/frame_goaway.cc index 70931ed22d..2a1dd3c316 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.cc +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 064d39ac59..e17ed8d563 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -19,9 +19,10 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H +#include + #include #include -#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.cc b/src/core/ext/transport/chttp2/transport/frame_ping.cc index 6229459397..205826b779 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.cc +++ b/src/core/ext/transport/chttp2/transport/frame_ping.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_ping.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 75bacfb1d4..8718d6a097 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H +#include + #include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc index 79528762e0..4bdd4309a4 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index e76a3ca841..bb2d34f918 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H +#include + #include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.cc b/src/core/ext/transport/chttp2/transport/frame_settings.cc index 737a9382e0..9ea27dcd47 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.cc +++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_settings.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index ce65402815..df19627194 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -19,8 +19,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H -#include #include + +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/src/core/ext/transport/chttp2/transport/frame_window_update.cc index 95be5b42d2..4b586dc3e7 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.cc +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/frame_window_update.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index a32f1a9d11..30667c77e1 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H +#include + #include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index 4855455130..e4f3c1b81e 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index a26514cab0..b370932131 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -19,9 +19,10 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H +#include + #include #include -#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index 26a38e3f87..fc96a8b3e4 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/ext/transport/chttp2/transport/internal.h" @@ -25,7 +27,6 @@ #include #include -#include #include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index 060bc5ce9d..b3b8018b98 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -19,9 +19,10 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H +#include + #include -#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/hpack_table.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.cc b/src/core/ext/transport/chttp2/transport/hpack_table.cc index d7cabbde04..f050f502f5 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/hpack_table.h" #include diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index 189ad1c697..98026a4ba4 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -19,8 +19,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H -#include #include + +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.cc b/src/core/ext/transport/chttp2/transport/http2_settings.cc index 745b1656f9..294ee8e4aa 100644 --- a/src/core/ext/transport/chttp2/transport/http2_settings.cc +++ b/src/core/ext/transport/chttp2/transport/http2_settings.cc @@ -18,6 +18,8 @@ * Automatically generated by tools/codegen/core/gen_settings_ids.py */ +#include + #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/lib/gpr/useful.h" diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.h b/src/core/ext/transport/chttp2/transport/http2_settings.h index fd15b6977b..07ce0621b2 100644 --- a/src/core/ext/transport/chttp2/transport/http2_settings.h +++ b/src/core/ext/transport/chttp2/transport/http2_settings.h @@ -21,6 +21,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H +#include + #include #include diff --git a/src/core/ext/transport/chttp2/transport/huffsyms.cc b/src/core/ext/transport/chttp2/transport/huffsyms.cc index f28d8cc30a..813e4c91b1 100644 --- a/src/core/ext/transport/chttp2/transport/huffsyms.cc +++ b/src/core/ext/transport/chttp2/transport/huffsyms.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/huffsyms.h" /* Constants pulled from the HPACK spec, and converted to C using the vim diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.cc b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc index 18d89f06d8..58d77b932f 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h index b84cd484c4..d029cf00d4 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.h +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H +#include + #include "src/core/lib/transport/transport.h" typedef struct { diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 6b6c0b28e2..b9431cd311 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H +#include + #include #include diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index 9357fedb5c..988380b76c 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.cc b/src/core/ext/transport/chttp2/transport/stream_lists.cc index 3aad8c5823..5d3ec4b53b 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.cc +++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/stream_map.cc b/src/core/ext/transport/chttp2/transport/stream_map.cc index a40eaffd5f..f300e2356c 100644 --- a/src/core/ext/transport/chttp2/transport/stream_map.cc +++ b/src/core/ext/transport/chttp2/transport/stream_map.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/stream_map.h" #include diff --git a/src/core/ext/transport/chttp2/transport/varint.cc b/src/core/ext/transport/chttp2/transport/varint.cc index 621a8100c7..d4b01788b9 100644 --- a/src/core/ext/transport/chttp2/transport/varint.cc +++ b/src/core/ext/transport/chttp2/transport/varint.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/varint.h" uint32_t grpc_chttp2_hpack_varint_length(uint32_t tail_value) { diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 42cba9ae60..7471d88aa1 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc b/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc index 578cbb8ac6..1a6bded6af 100644 --- a/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc +++ b/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc @@ -19,6 +19,8 @@ /* This file has empty implementation of all the functions exposed by the cronet library, so we can build it in all environments */ +#include + #include #include diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index c367f9c465..ff1c1aad62 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -16,9 +16,10 @@ * */ +#include + #include -#include #include #include #include diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.h b/src/core/ext/transport/cronet/transport/cronet_transport.h index d9ff913326..fb7e149f10 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.h +++ b/src/core/ext/transport/cronet/transport/cronet_transport.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CRONET_TRANSPORT_CRONET_TRANSPORT_H #define GRPC_CORE_EXT_TRANSPORT_CRONET_TRANSPORT_CRONET_TRANSPORT_H +#include + #include "src/core/lib/transport/transport.h" grpc_transport* grpc_create_cronet_transport(void* engine, const char* target, diff --git a/src/core/ext/transport/inproc/inproc_plugin.cc b/src/core/ext/transport/inproc/inproc_plugin.cc index 83a7d8d52f..8e251fa2d8 100644 --- a/src/core/ext/transport/inproc/inproc_plugin.cc +++ b/src/core/ext/transport/inproc/inproc_plugin.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index e1d4843785..5f898bbf25 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -16,12 +16,14 @@ * */ -#include "src/core/ext/transport/inproc/inproc_transport.h" +#include + #include #include #include #include #include +#include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/ext/transport/inproc/inproc_transport.h b/src/core/ext/transport/inproc/inproc_transport.h index 7c0453e7ce..049d1402af 100644 --- a/src/core/ext/transport/inproc/inproc_transport.h +++ b/src/core/ext/transport/inproc/inproc_transport.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_INPROC_INPROC_TRANSPORT_H #define GRPC_CORE_EXT_TRANSPORT_INPROC_INPROC_TRANSPORT_H +#include + #include "src/core/lib/transport/transport_impl.h" grpc_channel* grpc_inproc_channel_create(grpc_server* server, diff --git a/src/core/lib/avl/avl.cc b/src/core/lib/avl/avl.cc index c674d9be28..ec106ddb1d 100644 --- a/src/core/lib/avl/avl.cc +++ b/src/core/lib/avl/avl.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/avl/avl.h" #include diff --git a/src/core/lib/avl/avl.h b/src/core/lib/avl/avl.h index df5d2e89ec..15a9d56947 100644 --- a/src/core/lib/avl/avl.h +++ b/src/core/lib/avl/avl.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_AVL_AVL_H #define GRPC_CORE_LIB_AVL_AVL_H +#include + #include /** internal node of an AVL tree */ diff --git a/src/core/lib/backoff/backoff.cc b/src/core/lib/backoff/backoff.cc index 4b74afc244..e536abde0a 100644 --- a/src/core/lib/backoff/backoff.cc +++ b/src/core/lib/backoff/backoff.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/backoff/backoff.h" #include diff --git a/src/core/lib/backoff/backoff.h b/src/core/lib/backoff/backoff.h index de30e5268b..e769d150ef 100644 --- a/src/core/lib/backoff/backoff.h +++ b/src/core/lib/backoff/backoff.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_BACKOFF_BACKOFF_H #define GRPC_CORE_LIB_BACKOFF_BACKOFF_H +#include + #include "src/core/lib/iomgr/exec_ctx.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index c59bd0c7e7..c0d6a17356 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H #define GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H +#include + #include #include #include "src/core/lib/iomgr/socket_mutator.h" diff --git a/src/core/lib/channel/channel_stack.cc b/src/core/lib/channel/channel_stack.cc index 737d828e4b..a9459b150d 100644 --- a/src/core/lib/channel/channel_stack.cc +++ b/src/core/lib/channel/channel_stack.cc @@ -16,9 +16,11 @@ * */ -#include "src/core/lib/channel/channel_stack.h" +#include + #include #include +#include "src/core/lib/channel/channel_stack.h" #include #include diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index b9f9748001..4bf8218664 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -33,6 +33,8 @@ Call stacks are created by channel stacks and represent the per-call data for that stack. */ +#include + #include #include diff --git a/src/core/lib/channel/channel_stack_builder.cc b/src/core/lib/channel/channel_stack_builder.cc index cae862ec0e..8a72449034 100644 --- a/src/core/lib/channel/channel_stack_builder.cc +++ b/src/core/lib/channel/channel_stack_builder.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/channel/channel_stack_builder.h" #include diff --git a/src/core/lib/channel/channel_stack_builder.h b/src/core/lib/channel/channel_stack_builder.h index d00ddc698c..c9a170bc88 100644 --- a/src/core/lib/channel/channel_stack_builder.h +++ b/src/core/lib/channel/channel_stack_builder.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H #define GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H +#include + #include #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/channel/connected_channel.cc b/src/core/lib/channel/connected_channel.cc index a16e89ce00..ddd3029402 100644 --- a/src/core/lib/channel/connected_channel.cc +++ b/src/core/lib/channel/connected_channel.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/channel/connected_channel.h" #include diff --git a/src/core/lib/channel/connected_channel.h b/src/core/lib/channel/connected_channel.h index 91de8022db..faa1c73a21 100644 --- a/src/core/lib/channel/connected_channel.h +++ b/src/core/lib/channel/connected_channel.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H #define GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H +#include + #include "src/core/lib/channel/channel_stack_builder.h" extern const grpc_channel_filter grpc_connected_filter; diff --git a/src/core/lib/channel/handshaker.cc b/src/core/lib/channel/handshaker.cc index 518e880c15..9b1af8d6cb 100644 --- a/src/core/lib/channel/handshaker.cc +++ b/src/core/lib/channel/handshaker.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index 68e5463123..dfecd81004 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H #define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H +#include + #include #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/channel/handshaker_factory.cc b/src/core/lib/channel/handshaker_factory.cc index 2380d98300..4fd43635b6 100644 --- a/src/core/lib/channel/handshaker_factory.cc +++ b/src/core/lib/channel/handshaker_factory.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/channel/handshaker_factory.h" #include diff --git a/src/core/lib/channel/handshaker_factory.h b/src/core/lib/channel/handshaker_factory.h index 8a7c0157e8..9e36443958 100644 --- a/src/core/lib/channel/handshaker_factory.h +++ b/src/core/lib/channel/handshaker_factory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H #define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H +#include + #include #include "src/core/lib/channel/handshaker.h" diff --git a/src/core/lib/channel/handshaker_registry.cc b/src/core/lib/channel/handshaker_registry.cc index 5464cc42f4..eec3e1b352 100644 --- a/src/core/lib/channel/handshaker_registry.cc +++ b/src/core/lib/channel/handshaker_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/channel/handshaker_registry.h" #include diff --git a/src/core/lib/channel/handshaker_registry.h b/src/core/lib/channel/handshaker_registry.h index 0b05531b7e..b42d61ff43 100644 --- a/src/core/lib/channel/handshaker_registry.h +++ b/src/core/lib/channel/handshaker_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H #define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H +#include + #include #include "src/core/lib/channel/handshaker_factory.h" diff --git a/src/core/lib/compression/algorithm_metadata.h b/src/core/lib/compression/algorithm_metadata.h index 7db771ea74..1be79e59c0 100644 --- a/src/core/lib/compression/algorithm_metadata.h +++ b/src/core/lib/compression/algorithm_metadata.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H #define GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H +#include + #include #include "src/core/lib/compression/compression_internal.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/lib/compression/compression.cc b/src/core/lib/compression/compression.cc index 69d70ea941..48717541a7 100644 --- a/src/core/lib/compression/compression.cc +++ b/src/core/lib/compression/compression.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/compression/compression_internal.cc b/src/core/lib/compression/compression_internal.cc index 36829c8adf..538514caf3 100644 --- a/src/core/lib/compression/compression_internal.cc +++ b/src/core/lib/compression/compression_internal.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/compression/compression_internal.h b/src/core/lib/compression/compression_internal.h index 72f01dd1b7..da007368b0 100644 --- a/src/core/lib/compression/compression_internal.h +++ b/src/core/lib/compression/compression_internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H #define GRPC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H +#include + #include #ifdef __cplusplus diff --git a/src/core/lib/compression/message_compress.cc b/src/core/lib/compression/message_compress.cc index 2e44551935..e06454f871 100644 --- a/src/core/lib/compression/message_compress.cc +++ b/src/core/lib/compression/message_compress.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/compression/message_compress.h" #include diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h index ed9e5bfa39..91654e47e3 100644 --- a/src/core/lib/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H #define GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H +#include + #include #include "src/core/lib/compression/compression_internal.h" diff --git a/src/core/lib/compression/stream_compression.cc b/src/core/lib/compression/stream_compression.cc index b4b3e524d0..46cb3daf4c 100644 --- a/src/core/lib/compression/stream_compression.cc +++ b/src/core/lib/compression/stream_compression.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/lib/compression/stream_compression.h" diff --git a/src/core/lib/compression/stream_compression.h b/src/core/lib/compression/stream_compression.h index 8322835c4f..c80f2f8692 100644 --- a/src/core/lib/compression/stream_compression.h +++ b/src/core/lib/compression/stream_compression.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_H #define GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_H +#include + #include #include diff --git a/src/core/lib/compression/stream_compression_gzip.cc b/src/core/lib/compression/stream_compression_gzip.cc index 48fe99b69f..682f712843 100644 --- a/src/core/lib/compression/stream_compression_gzip.cc +++ b/src/core/lib/compression/stream_compression_gzip.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/compression/stream_compression_gzip.h b/src/core/lib/compression/stream_compression_gzip.h index 7cf49a0de9..740f09734a 100644 --- a/src/core/lib/compression/stream_compression_gzip.h +++ b/src/core/lib/compression/stream_compression_gzip.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_GZIP_H #define GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_GZIP_H +#include + #include "src/core/lib/compression/stream_compression.h" extern const grpc_stream_compression_vtable grpc_stream_compression_gzip_vtable; diff --git a/src/core/lib/compression/stream_compression_identity.cc b/src/core/lib/compression/stream_compression_identity.cc index 933d24b3a1..52a6236621 100644 --- a/src/core/lib/compression/stream_compression_identity.cc +++ b/src/core/lib/compression/stream_compression_identity.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/compression/stream_compression_identity.h b/src/core/lib/compression/stream_compression_identity.h index 41926e949e..cc77b63ecd 100644 --- a/src/core/lib/compression/stream_compression_identity.h +++ b/src/core/lib/compression/stream_compression_identity.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_IDENTITY_H #define GRPC_CORE_LIB_COMPRESSION_STREAM_COMPRESSION_IDENTITY_H +#include + #include "src/core/lib/compression/stream_compression.h" extern const grpc_stream_compression_vtable diff --git a/src/core/lib/debug/stats.cc b/src/core/lib/debug/stats.cc index 09a86287e4..d8ddf03ac1 100644 --- a/src/core/lib/debug/stats.cc +++ b/src/core/lib/debug/stats.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/debug/stats.h" #include diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h index 02eed5e844..749665262a 100644 --- a/src/core/lib/debug/stats.h +++ b/src/core/lib/debug/stats.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_DEBUG_STATS_H #define GRPC_CORE_LIB_DEBUG_STATS_H +#include + #include #include "src/core/lib/debug/stats_data.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/debug/stats_data.cc b/src/core/lib/debug/stats_data.cc index e2d3a6d073..309ece94bb 100644 --- a/src/core/lib/debug/stats_data.cc +++ b/src/core/lib/debug/stats_data.cc @@ -18,8 +18,10 @@ * Automatically generated by tools/codegen/core/gen_stats_data.py */ -#include "src/core/lib/debug/stats_data.h" +#include + #include "src/core/lib/debug/stats.h" +#include "src/core/lib/debug/stats_data.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h index 4504be33e7..da1266ad73 100644 --- a/src/core/lib/debug/stats_data.h +++ b/src/core/lib/debug/stats_data.h @@ -21,6 +21,8 @@ #ifndef GRPC_CORE_LIB_DEBUG_STATS_DATA_H #define GRPC_CORE_LIB_DEBUG_STATS_DATA_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/debug/trace.cc b/src/core/lib/debug/trace.cc index c0cefd0639..b0e0f2ba7c 100644 --- a/src/core/lib/debug/trace.cc +++ b/src/core/lib/debug/trace.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/debug/trace.h" #include diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h index 69ddd80222..bfec92c529 100644 --- a/src/core/lib/debug/trace.h +++ b/src/core/lib/debug/trace.h @@ -19,8 +19,9 @@ #ifndef GRPC_CORE_LIB_DEBUG_TRACE_H #define GRPC_CORE_LIB_DEBUG_TRACE_H -#include #include + +#include #include void grpc_tracer_init(const char* env_var_name); diff --git a/src/core/lib/gpr/alloc.cc b/src/core/lib/gpr/alloc.cc index e0d25963ed..611e4cceee 100644 --- a/src/core/lib/gpr/alloc.cc +++ b/src/core/lib/gpr/alloc.cc @@ -16,10 +16,11 @@ * */ +#include + #include #include -#include #include #include #include "src/core/lib/profiling/timers.h" diff --git a/src/core/lib/gpr/arena.cc b/src/core/lib/gpr/arena.cc index 2d514df68b..444bb3d719 100644 --- a/src/core/lib/gpr/arena.cc +++ b/src/core/lib/gpr/arena.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/arena.h" #include diff --git a/src/core/lib/gpr/arena.h b/src/core/lib/gpr/arena.h index 339771c0e3..6d2a073dd5 100644 --- a/src/core/lib/gpr/arena.h +++ b/src/core/lib/gpr/arena.h @@ -25,6 +25,8 @@ #ifndef GRPC_CORE_LIB_GPR_ARENA_H #define GRPC_CORE_LIB_GPR_ARENA_H +#include + #include typedef struct gpr_arena gpr_arena; diff --git a/src/core/lib/gpr/atm.cc b/src/core/lib/gpr/atm.cc index 3d0b430348..649d400d38 100644 --- a/src/core/lib/gpr/atm.cc +++ b/src/core/lib/gpr/atm.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/lib/gpr/useful.h" diff --git a/src/core/lib/gpr/env.h b/src/core/lib/gpr/env.h index b31e20b7d2..aec8a3166b 100644 --- a/src/core/lib/gpr/env.h +++ b/src/core/lib/gpr/env.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_ENV_H #define GRPC_CORE_LIB_GPR_ENV_H +#include + #include /* Env utility functions */ diff --git a/src/core/lib/gpr/fork.cc b/src/core/lib/gpr/fork.cc index 4651d22595..812522b058 100644 --- a/src/core/lib/gpr/fork.cc +++ b/src/core/lib/gpr/fork.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/fork.h" #include diff --git a/src/core/lib/gpr/host_port.cc b/src/core/lib/gpr/host_port.cc index 5a03a16296..a34e01cb51 100644 --- a/src/core/lib/gpr/host_port.cc +++ b/src/core/lib/gpr/host_port.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/host_port.h" #include diff --git a/src/core/lib/gpr/log.cc b/src/core/lib/gpr/log.cc index 410096c0f7..72787ab724 100644 --- a/src/core/lib/gpr/log.cc +++ b/src/core/lib/gpr/log.cc @@ -16,10 +16,11 @@ * */ +#include + #include #include #include -#include #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" diff --git a/src/core/lib/gpr/mpscq.cc b/src/core/lib/gpr/mpscq.cc index d7718273a6..076a6bb033 100644 --- a/src/core/lib/gpr/mpscq.cc +++ b/src/core/lib/gpr/mpscq.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/mpscq.h" #include diff --git a/src/core/lib/gpr/mpscq.h b/src/core/lib/gpr/mpscq.h index 4409c5c9f5..6b67880d1b 100644 --- a/src/core/lib/gpr/mpscq.h +++ b/src/core/lib/gpr/mpscq.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_MPSCQ_H #define GRPC_CORE_LIB_GPR_MPSCQ_H +#include + #include #include #include diff --git a/src/core/lib/gpr/murmur_hash.cc b/src/core/lib/gpr/murmur_hash.cc index 01a7290c67..cf25abf40d 100644 --- a/src/core/lib/gpr/murmur_hash.cc +++ b/src/core/lib/gpr/murmur_hash.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/murmur_hash.h" #include diff --git a/src/core/lib/gpr/spinlock.h b/src/core/lib/gpr/spinlock.h index f03be1d791..9f35530a86 100644 --- a/src/core/lib/gpr/spinlock.h +++ b/src/core/lib/gpr/spinlock.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_SPINLOCK_H #define GRPC_CORE_LIB_GPR_SPINLOCK_H +#include + #include /* Simple spinlock. No backoff strategy, gpr_spinlock_lock is almost always diff --git a/src/core/lib/gpr/string.cc b/src/core/lib/gpr/string.cc index 5a16377e49..ef2a6900b4 100644 --- a/src/core/lib/gpr/string.cc +++ b/src/core/lib/gpr/string.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/gpr/string.h" #include @@ -26,7 +28,6 @@ #include #include -#include #include #include "src/core/lib/gpr/useful.h" diff --git a/src/core/lib/gpr/string.h b/src/core/lib/gpr/string.h index ef3a8c6086..2e8a4898d9 100644 --- a/src/core/lib/gpr/string.h +++ b/src/core/lib/gpr/string.h @@ -19,11 +19,11 @@ #ifndef GRPC_CORE_LIB_GPR_STRING_H #define GRPC_CORE_LIB_GPR_STRING_H +#include + #include #include -#include - /* String utility functions */ /* Flags for gpr_dump function. */ diff --git a/src/core/lib/gpr/sync.cc b/src/core/lib/gpr/sync.cc index 347ffcd00e..2f18fc5ecb 100644 --- a/src/core/lib/gpr/sync.cc +++ b/src/core/lib/gpr/sync.cc @@ -18,6 +18,8 @@ /* Generic implementation of synchronization primitives. */ +#include + #include #include #include diff --git a/src/core/lib/gpr/thd.cc b/src/core/lib/gpr/thd.cc index 11391418b1..b5341c41b4 100644 --- a/src/core/lib/gpr/thd.cc +++ b/src/core/lib/gpr/thd.cc @@ -18,6 +18,8 @@ /* Platform-independent features for gpr threads. */ +#include + #include "src/core/lib/gpr/thd.h" #include diff --git a/src/core/lib/gpr/thd.h b/src/core/lib/gpr/thd.h index 58ce0d0088..920b336708 100644 --- a/src/core/lib/gpr/thd.h +++ b/src/core/lib/gpr/thd.h @@ -25,6 +25,7 @@ */ #include + #include #include diff --git a/src/core/lib/gpr/time.cc b/src/core/lib/gpr/time.cc index 39ebeb4339..64c1c98f56 100644 --- a/src/core/lib/gpr/time.cc +++ b/src/core/lib/gpr/time.cc @@ -18,6 +18,8 @@ /* Generic implementation of time calls. */ +#include + #include #include #include diff --git a/src/core/lib/gpr/time_posix.cc b/src/core/lib/gpr/time_posix.cc index 09171c9c48..28836bfa54 100644 --- a/src/core/lib/gpr/time_posix.cc +++ b/src/core/lib/gpr/time_posix.cc @@ -17,6 +17,7 @@ */ #include + #include "src/core/lib/gpr/time_precise.h" #ifdef GPR_POSIX_TIME diff --git a/src/core/lib/gpr/time_precise.cc b/src/core/lib/gpr/time_precise.cc index 3c7aaabc40..1b34fd7eb1 100644 --- a/src/core/lib/gpr/time_precise.cc +++ b/src/core/lib/gpr/time_precise.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include diff --git a/src/core/lib/gpr/time_precise.h b/src/core/lib/gpr/time_precise.h index acc4ee3d1b..a63ea9dc68 100644 --- a/src/core/lib/gpr/time_precise.h +++ b/src/core/lib/gpr/time_precise.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_TIME_PRECISE_H #define GRPC_CORE_LIB_GPR_TIME_PRECISE_H +#include + #include void gpr_precise_clock_init(void); diff --git a/src/core/lib/gpr/tls_gcc.h b/src/core/lib/gpr/tls_gcc.h index 14c59eca55..72b360b021 100644 --- a/src/core/lib/gpr/tls_gcc.h +++ b/src/core/lib/gpr/tls_gcc.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_TLS_GCC_H #define GRPC_CORE_LIB_GPR_TLS_GCC_H +#include + #include #include diff --git a/src/core/lib/gpr/tls_msvc.h b/src/core/lib/gpr/tls_msvc.h index a6cc4174be..f4b3f0f50f 100644 --- a/src/core/lib/gpr/tls_msvc.h +++ b/src/core/lib/gpr/tls_msvc.h @@ -20,6 +20,8 @@ #define GRPC_CORE_LIB_GPR_TLS_MSVC_H /** Thread local storage based on ms visual c compiler primitives. +#include + #include tls.h to use this - and see that file for documentation */ struct gpr_msvc_thread_local { diff --git a/src/core/lib/gpr/tls_pthread.h b/src/core/lib/gpr/tls_pthread.h index 9202653dcb..a15f2f3389 100644 --- a/src/core/lib/gpr/tls_pthread.h +++ b/src/core/lib/gpr/tls_pthread.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_TLS_PTHREAD_H #define GRPC_CORE_LIB_GPR_TLS_PTHREAD_H +#include + #include /* for GPR_ASSERT */ #include diff --git a/src/core/lib/gpr/tmpfile.h b/src/core/lib/gpr/tmpfile.h index f47ec7aa63..3ce3ff5e5d 100644 --- a/src/core/lib/gpr/tmpfile.h +++ b/src/core/lib/gpr/tmpfile.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPR_TMPFILE_H #define GRPC_CORE_LIB_GPR_TMPFILE_H +#include + #include /* Creates a temporary file from a prefix. diff --git a/src/core/lib/gprpp/atomic_with_atm.h b/src/core/lib/gprpp/atomic_with_atm.h index 6abf0bc38d..3d0021bb1c 100644 --- a/src/core/lib/gprpp/atomic_with_atm.h +++ b/src/core/lib/gprpp/atomic_with_atm.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_ATOMIC_WITH_ATM_H #define GRPC_CORE_LIB_GPRPP_ATOMIC_WITH_ATM_H +#include + #include namespace grpc_core { diff --git a/src/core/lib/gprpp/atomic_with_std.h b/src/core/lib/gprpp/atomic_with_std.h index 83322b81c1..a4ad16e5cf 100644 --- a/src/core/lib/gprpp/atomic_with_std.h +++ b/src/core/lib/gprpp/atomic_with_std.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_ATOMIC_WITH_STD_H #define GRPC_CORE_LIB_GPRPP_ATOMIC_WITH_STD_H +#include + #include namespace grpc_core { diff --git a/src/core/lib/gprpp/inlined_vector.h b/src/core/lib/gprpp/inlined_vector.h index 2ced3d74b8..ca95aecddc 100644 --- a/src/core/lib/gprpp/inlined_vector.h +++ b/src/core/lib/gprpp/inlined_vector.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_INLINED_VECTOR_H #define GRPC_CORE_LIB_GPRPP_INLINED_VECTOR_H +#include + #include #include "src/core/lib/gprpp/memory.h" diff --git a/src/core/lib/gprpp/manual_constructor.h b/src/core/lib/gprpp/manual_constructor.h index cee38abc1b..a177048605 100644 --- a/src/core/lib/gprpp/manual_constructor.h +++ b/src/core/lib/gprpp/manual_constructor.h @@ -21,6 +21,8 @@ // manually construct a region of memory with some type +#include + #include #include #include diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h index f7cd6424af..f84e20eeea 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/lib/gprpp/memory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_MEMORY_H #define GRPC_CORE_LIB_GPRPP_MEMORY_H +#include + #include #include diff --git a/src/core/lib/gprpp/orphanable.h b/src/core/lib/gprpp/orphanable.h index 78d1b01ff8..9e9e7f015f 100644 --- a/src/core/lib/gprpp/orphanable.h +++ b/src/core/lib/gprpp/orphanable.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_ORPHANABLE_H #define GRPC_CORE_LIB_GPRPP_ORPHANABLE_H +#include + #include #include diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/lib/gprpp/ref_counted.h index ab589fc01a..02b115a40e 100644 --- a/src/core/lib/gprpp/ref_counted.h +++ b/src/core/lib/gprpp/ref_counted.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_REF_COUNTED_H #define GRPC_CORE_LIB_GPRPP_REF_COUNTED_H +#include + #include #include diff --git a/src/core/lib/gprpp/ref_counted_ptr.h b/src/core/lib/gprpp/ref_counted_ptr.h index f82ba50da3..72088e76ef 100644 --- a/src/core/lib/gprpp/ref_counted_ptr.h +++ b/src/core/lib/gprpp/ref_counted_ptr.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H #define GRPC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H +#include + #include #include "src/core/lib/gprpp/memory.h" diff --git a/src/core/lib/http/format_request.cc b/src/core/lib/http/format_request.cc index 6581bef7cd..1712344648 100644 --- a/src/core/lib/http/format_request.cc +++ b/src/core/lib/http/format_request.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/http/format_request.h" #include diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index c1919651f9..bcc332fe6e 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H #define GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#include + #include #include "src/core/lib/http/httpcli.h" diff --git a/src/core/lib/http/httpcli.cc b/src/core/lib/http/httpcli.cc index 2cdca48487..12060074c5 100644 --- a/src/core/lib/http/httpcli.cc +++ b/src/core/lib/http/httpcli.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/http/httpcli.h" #include diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 72d20cc7a3..b0735081f2 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_HTTP_HTTPCLI_H #define GRPC_CORE_LIB_HTTP_HTTPCLI_H +#include + #include #include diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc index d754558060..180912383f 100644 --- a/src/core/lib/http/httpcli_security_connector.cc +++ b/src/core/lib/http/httpcli_security_connector.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/http/httpcli.h" #include diff --git a/src/core/lib/http/parser.cc b/src/core/lib/http/parser.cc index 724b6d1885..a37fdda8ea 100644 --- a/src/core/lib/http/parser.cc +++ b/src/core/lib/http/parser.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/http/parser.h" #include diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 5fef448019..1d2e13e831 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -19,8 +19,9 @@ #ifndef GRPC_CORE_LIB_HTTP_PARSER_H #define GRPC_CORE_LIB_HTTP_PARSER_H -#include #include + +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/iomgr/call_combiner.cc b/src/core/lib/iomgr/call_combiner.cc index 3b11e0266d..24e11b687b 100644 --- a/src/core/lib/iomgr/call_combiner.cc +++ b/src/core/lib/iomgr/call_combiner.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/call_combiner.h" #include diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h index 4814dbf8d2..16829e5707 100644 --- a/src/core/lib/iomgr/call_combiner.h +++ b/src/core/lib/iomgr/call_combiner.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_CALL_COMBINER_H #define GRPC_CORE_LIB_IOMGR_CALL_COMBINER_H +#include + #include #include diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc index a7edf17e9b..e66df03182 100644 --- a/src/core/lib/iomgr/combiner.cc +++ b/src/core/lib/iomgr/combiner.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/combiner.h" #include diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h index c62d21a051..0d63e468df 100644 --- a/src/core/lib/iomgr/combiner.h +++ b/src/core/lib/iomgr/combiner.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_COMBINER_H #define GRPC_CORE_LIB_IOMGR_COMBINER_H +#include + #include #include diff --git a/src/core/lib/iomgr/endpoint.cc b/src/core/lib/iomgr/endpoint.cc index 9d4b102822..e22c21e4bd 100644 --- a/src/core/lib/iomgr/endpoint.cc +++ b/src/core/lib/iomgr/endpoint.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/endpoint.h" void grpc_endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* slices, diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index cd53099334..15db1649fa 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_H #define GRPC_CORE_LIB_IOMGR_ENDPOINT_H +#include + #include #include #include diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h index 506ffc88b4..08f9e3cabc 100644 --- a/src/core/lib/iomgr/endpoint_pair.h +++ b/src/core/lib/iomgr/endpoint_pair.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H #define GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H +#include + #include "src/core/lib/iomgr/endpoint.h" typedef struct { diff --git a/src/core/lib/iomgr/endpoint_pair_posix.cc b/src/core/lib/iomgr/endpoint_pair_posix.cc index 3ad6b47756..49850ab3a1 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.cc +++ b/src/core/lib/iomgr/endpoint_pair_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/endpoint_pair_uv.cc b/src/core/lib/iomgr/endpoint_pair_uv.cc index 128a947d1b..b99d178cb6 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.cc +++ b/src/core/lib/iomgr/endpoint_pair_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/endpoint_pair_windows.cc b/src/core/lib/iomgr/endpoint_pair_windows.cc index cc07ac0708..416c9d88a1 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.cc +++ b/src/core/lib/iomgr/endpoint_pair_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 8c72a439f6..f8cae4da82 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ERROR_H #define GRPC_CORE_LIB_IOMGR_ERROR_H +#include + #include #include diff --git a/src/core/lib/iomgr/error_internal.h b/src/core/lib/iomgr/error_internal.h index 6cb09c2cdb..7fde347abd 100644 --- a/src/core/lib/iomgr/error_internal.h +++ b/src/core/lib/iomgr/error_internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H #define GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H +#include + #include #include // TODO, do we need this? diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index f84f3f8205..3ebaf181c1 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/ev_epoll1_linux.h b/src/core/lib/iomgr/ev_epoll1_linux.h index 9a1b96bd45..ca0db7250f 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.h +++ b/src/core/lib/iomgr/ev_epoll1_linux.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H #define GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H +#include + #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index bb7622c4cc..d3cbaf9d0a 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/ev_epollex_linux.h b/src/core/lib/iomgr/ev_epollex_linux.h index ffa7fc7f32..e70ba72a7d 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.h +++ b/src/core/lib/iomgr/ev_epollex_linux.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H #define GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H +#include + #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc index 5c99c72aa5..1e30f6637b 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.cc +++ b/src/core/lib/iomgr/ev_epollsig_linux.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/ev_epollsig_linux.h b/src/core/lib/iomgr/ev_epollsig_linux.h index 48178d3713..2ba2f0a63b 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.h +++ b/src/core/lib/iomgr/ev_epollsig_linux.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H #define GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H +#include + #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index e630ddf8e0..e979ff7eb5 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h index f6bc624d4f..ab3cd9029e 100644 --- a/src/core/lib/iomgr/ev_poll_posix.h +++ b/src/core/lib/iomgr/ev_poll_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H #define GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H +#include + #include "src/core/lib/iomgr/ev_posix.h" const grpc_event_engine_vtable* grpc_init_poll_posix(bool explicit_request); diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc index 4280794428..39ce459f1e 100644 --- a/src/core/lib/iomgr/ev_posix.cc +++ b/src/core/lib/iomgr/ev_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 62f1162a23..6a5129a74d 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_POSIX_H #define GRPC_CORE_LIB_IOMGR_EV_POSIX_H +#include + #include #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/iomgr/ev_windows.cc b/src/core/lib/iomgr/ev_windows.cc index 697697d0b0..32c62b7a76 100644 --- a/src/core/lib/iomgr/ev_windows.cc +++ b/src/core/lib/iomgr/ev_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/exec_ctx.cc b/src/core/lib/iomgr/exec_ctx.cc index 1a2284f474..132fe87870 100644 --- a/src/core/lib/iomgr/exec_ctx.cc +++ b/src/core/lib/iomgr/exec_ctx.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/exec_ctx.h" #include diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 3d9a157627..de97164f02 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EXEC_CTX_H #define GRPC_CORE_LIB_IOMGR_EXEC_CTX_H +#include + #include #include #include diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc index d2a050919e..e7f412a562 100644 --- a/src/core/lib/iomgr/executor.cc +++ b/src/core/lib/iomgr/executor.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/executor.h" #include diff --git a/src/core/lib/iomgr/executor.h b/src/core/lib/iomgr/executor.h index e16f11aa21..68d540af55 100644 --- a/src/core/lib/iomgr/executor.h +++ b/src/core/lib/iomgr/executor.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EXECUTOR_H #define GRPC_CORE_LIB_IOMGR_EXECUTOR_H +#include + #include "src/core/lib/iomgr/closure.h" typedef enum { diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc index c9a65c5702..d32fbc4588 100644 --- a/src/core/lib/iomgr/fork_posix.cc +++ b/src/core/lib/iomgr/fork_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_FORK diff --git a/src/core/lib/iomgr/fork_windows.cc b/src/core/lib/iomgr/fork_windows.cc index f9986f33c7..798f671bdf 100644 --- a/src/core/lib/iomgr/fork_windows.cc +++ b/src/core/lib/iomgr/fork_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifndef GRPC_POSIX_FORK diff --git a/src/core/lib/iomgr/gethostname_fallback.cc b/src/core/lib/iomgr/gethostname_fallback.cc index 81e2c7aeec..65ae818723 100644 --- a/src/core/lib/iomgr/gethostname_fallback.cc +++ b/src/core/lib/iomgr/gethostname_fallback.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/gethostname_host_name_max.cc b/src/core/lib/iomgr/gethostname_host_name_max.cc index ae95788a1e..79f5daa8f3 100644 --- a/src/core/lib/iomgr/gethostname_host_name_max.cc +++ b/src/core/lib/iomgr/gethostname_host_name_max.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/gethostname_sysconf.cc b/src/core/lib/iomgr/gethostname_sysconf.cc index 3d74e03338..92c5de3338 100644 --- a/src/core/lib/iomgr/gethostname_sysconf.cc +++ b/src/core/lib/iomgr/gethostname_sysconf.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc index 4716872ce4..5285734719 100644 --- a/src/core/lib/iomgr/iocp_windows.cc +++ b/src/core/lib/iomgr/iocp_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/iocp_windows.h b/src/core/lib/iomgr/iocp_windows.h index 75b0ff4a92..5079ea5d84 100644 --- a/src/core/lib/iomgr/iocp_windows.h +++ b/src/core/lib/iomgr/iocp_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H #define GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H +#include + #include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h index c7cde7ea59..e6d66e545c 100644 --- a/src/core/lib/iomgr/iomgr.h +++ b/src/core/lib/iomgr/iomgr.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_H #define GRPC_CORE_LIB_IOMGR_IOMGR_H +#include + #include "src/core/lib/iomgr/port.h" /** Initializes the iomgr. */ diff --git a/src/core/lib/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h index 20b3cb70d0..644219fb4d 100644 --- a/src/core/lib/iomgr/iomgr_internal.h +++ b/src/core/lib/iomgr/iomgr_internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H #define GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H +#include + #include #include "src/core/lib/iomgr/iomgr.h" diff --git a/src/core/lib/iomgr/iomgr_posix.cc b/src/core/lib/iomgr/iomgr_posix.cc index f8f6fe2353..35b8adf01e 100644 --- a/src/core/lib/iomgr/iomgr_posix.cc +++ b/src/core/lib/iomgr/iomgr_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/iomgr_posix.h b/src/core/lib/iomgr/iomgr_posix.h index f7a4af6a89..54ec46e1bb 100644 --- a/src/core/lib/iomgr/iomgr_posix.h +++ b/src/core/lib/iomgr/iomgr_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H #define GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H +#include + #include "src/core/lib/iomgr/iomgr_internal.h" #endif /* GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H */ diff --git a/src/core/lib/iomgr/iomgr_uv.cc b/src/core/lib/iomgr/iomgr_uv.cc index c11bc28ad7..c11c37ca20 100644 --- a/src/core/lib/iomgr/iomgr_uv.cc +++ b/src/core/lib/iomgr/iomgr_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/iomgr_uv.h b/src/core/lib/iomgr/iomgr_uv.h index a382f0a5ae..4d62f00ad6 100644 --- a/src/core/lib/iomgr/iomgr_uv.h +++ b/src/core/lib/iomgr/iomgr_uv.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_UV_H #define GRPC_CORE_LIB_IOMGR_IOMGR_UV_H +#include + #include "src/core/lib/iomgr/iomgr_internal.h" #include diff --git a/src/core/lib/iomgr/iomgr_windows.cc b/src/core/lib/iomgr/iomgr_windows.cc index 630370166d..8c4888ca97 100644 --- a/src/core/lib/iomgr/iomgr_windows.cc +++ b/src/core/lib/iomgr/iomgr_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/is_epollexclusive_available.cc b/src/core/lib/iomgr/is_epollexclusive_available.cc index c46674c1dd..036b77866f 100644 --- a/src/core/lib/iomgr/is_epollexclusive_available.cc +++ b/src/core/lib/iomgr/is_epollexclusive_available.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/is_epollexclusive_available.h" diff --git a/src/core/lib/iomgr/is_epollexclusive_available.h b/src/core/lib/iomgr/is_epollexclusive_available.h index 9ae9c5c191..8a44113c3f 100644 --- a/src/core/lib/iomgr/is_epollexclusive_available.h +++ b/src/core/lib/iomgr/is_epollexclusive_available.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H #define GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H +#include + #include #ifdef __cplusplus diff --git a/src/core/lib/iomgr/load_file.cc b/src/core/lib/iomgr/load_file.cc index 7f5f642c98..f6431d0f1c 100644 --- a/src/core/lib/iomgr/load_file.cc +++ b/src/core/lib/iomgr/load_file.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/load_file.h" #include diff --git a/src/core/lib/iomgr/load_file.h b/src/core/lib/iomgr/load_file.h index a7336527ce..1cb2b5de73 100644 --- a/src/core/lib/iomgr/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_LOAD_FILE_H #define GRPC_CORE_LIB_IOMGR_LOAD_FILE_H +#include + #include #include diff --git a/src/core/lib/iomgr/lockfree_event.cc b/src/core/lib/iomgr/lockfree_event.cc index 7b194e3db5..5b6b79fa91 100644 --- a/src/core/lib/iomgr/lockfree_event.cc +++ b/src/core/lib/iomgr/lockfree_event.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/lockfree_event.h" #include diff --git a/src/core/lib/iomgr/lockfree_event.h b/src/core/lib/iomgr/lockfree_event.h index 3bd3fd72f1..83de656f5f 100644 --- a/src/core/lib/iomgr/lockfree_event.h +++ b/src/core/lib/iomgr/lockfree_event.h @@ -21,6 +21,8 @@ /* Lock free event notification for file descriptors */ +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/nameser.h b/src/core/lib/iomgr/nameser.h index daed6de518..22a00cdab8 100644 --- a/src/core/lib/iomgr/nameser.h +++ b/src/core/lib/iomgr/nameser.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_NAMESER_H #define GRPC_CORE_LIB_IOMGR_NAMESER_H +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_HAVE_ARPA_NAMESER diff --git a/src/core/lib/iomgr/network_status_tracker.cc b/src/core/lib/iomgr/network_status_tracker.cc index 73f8fbf9fb..d4b7f4a57d 100644 --- a/src/core/lib/iomgr/network_status_tracker.cc +++ b/src/core/lib/iomgr/network_status_tracker.cc @@ -16,8 +16,10 @@ * */ -#include "src/core/lib/iomgr/network_status_tracker.h" +#include + #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/network_status_tracker.h" void grpc_network_status_shutdown(void) {} diff --git a/src/core/lib/iomgr/network_status_tracker.h b/src/core/lib/iomgr/network_status_tracker.h index 32244d9b77..198877f60f 100644 --- a/src/core/lib/iomgr/network_status_tracker.h +++ b/src/core/lib/iomgr/network_status_tracker.h @@ -18,6 +18,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H #define GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H +#include + #include "src/core/lib/iomgr/endpoint.h" void grpc_network_status_init(void); diff --git a/src/core/lib/iomgr/polling_entity.cc b/src/core/lib/iomgr/polling_entity.cc index 126f6f45d6..9f164f65b0 100644 --- a/src/core/lib/iomgr/polling_entity.cc +++ b/src/core/lib/iomgr/polling_entity.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h index 0102d32c11..a95e08524c 100644 --- a/src/core/lib/iomgr/polling_entity.h +++ b/src/core/lib/iomgr/polling_entity.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H #define GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H +#include + #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/iomgr/pollset.h b/src/core/lib/iomgr/pollset.h index 6bb3cd3e0c..9cc3e4c7fa 100644 --- a/src/core/lib/iomgr/pollset.h +++ b/src/core/lib/iomgr/pollset.h @@ -20,6 +20,7 @@ #define GRPC_CORE_LIB_IOMGR_POLLSET_H #include + #include #include diff --git a/src/core/lib/iomgr/pollset_set.h b/src/core/lib/iomgr/pollset_set.h index a94d0afe75..18f30aa94e 100644 --- a/src/core/lib/iomgr/pollset_set.h +++ b/src/core/lib/iomgr/pollset_set.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_H #define GRPC_CORE_LIB_IOMGR_POLLSET_SET_H +#include + #include "src/core/lib/iomgr/pollset.h" /* A grpc_pollset_set is a set of pollsets that are interested in an diff --git a/src/core/lib/iomgr/pollset_set_uv.cc b/src/core/lib/iomgr/pollset_set_uv.cc index ac5dade8a5..50814c1f0a 100644 --- a/src/core/lib/iomgr/pollset_set_uv.cc +++ b/src/core/lib/iomgr/pollset_set_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/pollset_set_windows.cc b/src/core/lib/iomgr/pollset_set_windows.cc index 85edc9dee1..ff3f6a944e 100644 --- a/src/core/lib/iomgr/pollset_set_windows.cc +++ b/src/core/lib/iomgr/pollset_set_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/pollset_set_windows.h b/src/core/lib/iomgr/pollset_set_windows.h index 1173f760a0..5ac9d1823b 100644 --- a/src/core/lib/iomgr/pollset_set_windows.h +++ b/src/core/lib/iomgr/pollset_set_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H #define GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H +#include + #include "src/core/lib/iomgr/pollset_set.h" #endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H */ diff --git a/src/core/lib/iomgr/pollset_uv.cc b/src/core/lib/iomgr/pollset_uv.cc index d9e5ad81be..c6a2f43bf1 100644 --- a/src/core/lib/iomgr/pollset_uv.cc +++ b/src/core/lib/iomgr/pollset_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc index 240a24dee1..62ab760875 100644 --- a/src/core/lib/iomgr/pollset_windows.cc +++ b/src/core/lib/iomgr/pollset_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/pollset_windows.h b/src/core/lib/iomgr/pollset_windows.h index 93fe7d669b..e89758c694 100644 --- a/src/core/lib/iomgr/pollset_windows.h +++ b/src/core/lib/iomgr/pollset_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H #define GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H +#include + #include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index 12fc2ed088..10a7822654 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H #define GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc index 3dc1d871a1..9307f19bcf 100644 --- a/src/core/lib/iomgr/resolve_address_posix.cc +++ b/src/core/lib/iomgr/resolve_address_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/resolve_address_uv.cc b/src/core/lib/iomgr/resolve_address_uv.cc index 6eb6fe3af5..4d8ea596f3 100644 --- a/src/core/lib/iomgr/resolve_address_uv.cc +++ b/src/core/lib/iomgr/resolve_address_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc index 8f4fd04402..4e1dcaabaf 100644 --- a/src/core/lib/iomgr/resolve_address_windows.cc +++ b/src/core/lib/iomgr/resolve_address_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc index c4763f3229..8c42dd78cf 100644 --- a/src/core/lib/iomgr/resource_quota.cc +++ b/src/core/lib/iomgr/resource_quota.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/resource_quota.h" #include diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index 39e3aabf18..4e1c651278 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H #define GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H +#include + #include #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 206d596ccd..3b30da8a7d 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -23,6 +23,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h index 22d57ca6bb..83981e0aa5 100644 --- a/src/core/lib/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H +#include + #include #include #include diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc index 69be87168e..88f9b2ffd9 100644 --- a/src/core/lib/iomgr/sockaddr_utils.cc +++ b/src/core/lib/iomgr/sockaddr_utils.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/sockaddr_utils.h" #include @@ -24,7 +26,6 @@ #include #include -#include #include #include "src/core/lib/gpr/host_port.h" diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h index e3bd51a4ad..ace54a2a80 100644 --- a/src/core/lib/iomgr/sockaddr_utils.h +++ b/src/core/lib/iomgr/sockaddr_utils.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H +#include + #include "src/core/lib/iomgr/resolve_address.h" /* Returns true if addr is an IPv4-mapped IPv6 address within the diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h index 20e37c9fc4..3a4fcc9e8a 100644 --- a/src/core/lib/iomgr/sockaddr_windows.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/socket_factory_posix.cc b/src/core/lib/iomgr/socket_factory_posix.cc index 3e696c2e10..1d1e36c0e3 100644 --- a/src/core/lib/iomgr/socket_factory_posix.cc +++ b/src/core/lib/iomgr/socket_factory_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/socket_factory_posix.h b/src/core/lib/iomgr/socket_factory_posix.h index af57cc5b60..9a52f4ea4e 100644 --- a/src/core/lib/iomgr/socket_factory_posix.h +++ b/src/core/lib/iomgr/socket_factory_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_FACTORY_POSIX_H #define GRPC_CORE_LIB_IOMGR_SOCKET_FACTORY_POSIX_H +#include + #include #include #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/socket_mutator.cc b/src/core/lib/iomgr/socket_mutator.cc index eb219d7cb3..b9b8eaf4ad 100644 --- a/src/core/lib/iomgr/socket_mutator.cc +++ b/src/core/lib/iomgr/socket_mutator.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/socket_mutator.h" #include diff --git a/src/core/lib/iomgr/socket_mutator.h b/src/core/lib/iomgr/socket_mutator.h index f8fd21d15a..6c7781c51d 100644 --- a/src/core/lib/iomgr/socket_mutator.h +++ b/src/core/lib/iomgr/socket_mutator.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H #define GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H +#include + #include #include diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 9fd141b6de..e96eb97a7e 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H #define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H +#include + #include /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index a0cca6195b..4fb6c7ad63 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET @@ -37,7 +39,6 @@ #include #include -#include #include #include "src/core/lib/gpr/host_port.h" diff --git a/src/core/lib/iomgr/socket_utils_linux.cc b/src/core/lib/iomgr/socket_utils_linux.cc index e8bf05c3a8..deb7c55267 100644 --- a/src/core/lib/iomgr/socket_utils_linux.cc +++ b/src/core/lib/iomgr/socket_utils_linux.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_LINUX_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_utils_posix.cc b/src/core/lib/iomgr/socket_utils_posix.cc index c49cbb203b..c856f641e3 100644 --- a/src/core/lib/iomgr/socket_utils_posix.cc +++ b/src/core/lib/iomgr/socket_utils_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 77df4205ff..1f50e8d315 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H #define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H +#include + #include "src/core/lib/iomgr/resolve_address.h" #include diff --git a/src/core/lib/iomgr/socket_utils_uv.cc b/src/core/lib/iomgr/socket_utils_uv.cc index 75316d8c24..3f650eef66 100644 --- a/src/core/lib/iomgr/socket_utils_uv.cc +++ b/src/core/lib/iomgr/socket_utils_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/socket_utils_windows.cc b/src/core/lib/iomgr/socket_utils_windows.cc index 0482a1783d..5fc3b7617e 100644 --- a/src/core/lib/iomgr/socket_utils_windows.cc +++ b/src/core/lib/iomgr/socket_utils_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINDOWS_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_windows.cc b/src/core/lib/iomgr/socket_windows.cc index 9bb6a75dd8..2e23409582 100644 --- a/src/core/lib/iomgr/socket_windows.cc +++ b/src/core/lib/iomgr/socket_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h index cb28f2b8df..3ff2c307e2 100644 --- a/src/core/lib/iomgr/socket_windows.h +++ b/src/core/lib/iomgr/socket_windows.h @@ -20,6 +20,7 @@ #define GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H #include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/sys_epoll_wrapper.h b/src/core/lib/iomgr/sys_epoll_wrapper.h index 3fa5357156..d21d853665 100644 --- a/src/core/lib/iomgr/sys_epoll_wrapper.h +++ b/src/core/lib/iomgr/sys_epoll_wrapper.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SYS_EPOLL_WRAPPER_H #define GRPC_CORE_LIB_IOMGR_SYS_EPOLL_WRAPPER_H +#include + #include #ifndef EPOLLEXCLUSIVE diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index 5f55d30955..a6b99e63c2 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H #define GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H +#include + #include #include #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc index 33a0b0404d..3fe2989c6b 100644 --- a/src/core/lib/iomgr/tcp_client_posix.cc +++ b/src/core/lib/iomgr/tcp_client_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_client_posix.h b/src/core/lib/iomgr/tcp_client_posix.h index 57e50a67d2..d0168ef133 100644 --- a/src/core/lib/iomgr/tcp_client_posix.h +++ b/src/core/lib/iomgr/tcp_client_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H #define GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H +#include + #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/tcp_client.h" diff --git a/src/core/lib/iomgr/tcp_client_uv.cc b/src/core/lib/iomgr/tcp_client_uv.cc index 4e9c7cc11d..d29d6c8f41 100644 --- a/src/core/lib/iomgr/tcp_client_uv.cc +++ b/src/core/lib/iomgr/tcp_client_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/tcp_client_windows.cc b/src/core/lib/iomgr/tcp_client_windows.cc index d46569d7cc..70c2495350 100644 --- a/src/core/lib/iomgr/tcp_client_windows.cc +++ b/src/core/lib/iomgr/tcp_client_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 50efd04382..ca0046b83b 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h index 4529c02beb..af89bd24db 100644 --- a/src/core/lib/iomgr/tcp_posix.h +++ b/src/core/lib/iomgr/tcp_posix.h @@ -29,6 +29,8 @@ otherwise specified. */ +#include + #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 038c765c6c..965d97407f 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TCP_SERVER_H #define GRPC_CORE_LIB_IOMGR_TCP_SERVER_H +#include + #include #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc index fe6108e4ac..a609c09ea7 100644 --- a/src/core/lib/iomgr/tcp_server_posix.cc +++ b/src/core/lib/iomgr/tcp_server_posix.cc @@ -21,6 +21,8 @@ #define _GNU_SOURCE #endif +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_server_utils_posix.h b/src/core/lib/iomgr/tcp_server_utils_posix.h index 6046f257f9..34d68130c9 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix.h +++ b/src/core/lib/iomgr/tcp_server_utils_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H #define GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H +#include + #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index be2a00a9dc..846f9cccb7 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc index 612c2584bc..308ff0f8a6 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_HAVE_IFADDRS diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc index 2d72b95def..86ee14f285 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #if defined(GRPC_POSIX_SOCKET) && !defined(GRPC_HAVE_IFADDRS) diff --git a/src/core/lib/iomgr/tcp_server_uv.cc b/src/core/lib/iomgr/tcp_server_uv.cc index 1ac49190fb..aa423766c7 100644 --- a/src/core/lib/iomgr/tcp_server_uv.cc +++ b/src/core/lib/iomgr/tcp_server_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/tcp_server_windows.cc b/src/core/lib/iomgr/tcp_server_windows.cc index 8a30dfde43..6d19c1c4d7 100644 --- a/src/core/lib/iomgr/tcp_server_windows.cc +++ b/src/core/lib/iomgr/tcp_server_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/tcp_uv.cc b/src/core/lib/iomgr/tcp_uv.cc index b384623a5e..6db3217d6e 100644 --- a/src/core/lib/iomgr/tcp_uv.cc +++ b/src/core/lib/iomgr/tcp_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h index fd6d19049a..6b1a6f77c2 100644 --- a/src/core/lib/iomgr/tcp_uv.h +++ b/src/core/lib/iomgr/tcp_uv.h @@ -29,6 +29,8 @@ otherwise specified. */ +#include + #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/lib/iomgr/tcp_windows.cc b/src/core/lib/iomgr/tcp_windows.cc index 6777719785..aab8edc888 100644 --- a/src/core/lib/iomgr/tcp_windows.cc +++ b/src/core/lib/iomgr/tcp_windows.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h index 8578a358ea..161a545a2a 100644 --- a/src/core/lib/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -29,6 +29,8 @@ otherwise specified. */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/time_averaged_stats.cc b/src/core/lib/iomgr/time_averaged_stats.cc index 3bddec04dd..6369e48db0 100644 --- a/src/core/lib/iomgr/time_averaged_stats.cc +++ b/src/core/lib/iomgr/time_averaged_stats.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/time_averaged_stats.h" void grpc_time_averaged_stats_init(grpc_time_averaged_stats* stats, diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index 82049859c5..67f1b1b3f9 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_H #define GRPC_CORE_LIB_IOMGR_TIMER_H +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_UV @@ -27,7 +29,6 @@ #include "src/core/lib/iomgr/timer_generic.h" #endif /* GRPC_UV */ -#include #include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc index 697162f7a8..52a571f425 100644 --- a/src/core/lib/iomgr/timer_generic.cc +++ b/src/core/lib/iomgr/timer_generic.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/timer_generic.h b/src/core/lib/iomgr/timer_generic.h index 190381e904..97a4513355 100644 --- a/src/core/lib/iomgr/timer_generic.h +++ b/src/core/lib/iomgr/timer_generic.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H #define GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/timer_heap.cc b/src/core/lib/iomgr/timer_heap.cc index c26896ee4a..e5b5abfc97 100644 --- a/src/core/lib/iomgr/timer_heap.cc +++ b/src/core/lib/iomgr/timer_heap.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_TIMER_USE_GENERIC diff --git a/src/core/lib/iomgr/timer_heap.h b/src/core/lib/iomgr/timer_heap.h index 436eef55a6..503365d4cd 100644 --- a/src/core/lib/iomgr/timer_heap.h +++ b/src/core/lib/iomgr/timer_heap.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H #define GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H +#include + #include "src/core/lib/iomgr/timer.h" typedef struct { diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 94e7953fde..0210e70015 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -16,11 +16,12 @@ * */ +#include + #include "src/core/lib/iomgr/timer_manager.h" #include #include -#include #include diff --git a/src/core/lib/iomgr/timer_manager.h b/src/core/lib/iomgr/timer_manager.h index 0ba502928a..3c4cdda2c8 100644 --- a/src/core/lib/iomgr/timer_manager.h +++ b/src/core/lib/iomgr/timer_manager.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H #define GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H +#include + #include /* Timer Manager tries to keep one thread waiting for the next timeout at all diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc index 5d238da089..6f28f553c5 100644 --- a/src/core/lib/iomgr/timer_uv.cc +++ b/src/core/lib/iomgr/timer_uv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #if GRPC_UV diff --git a/src/core/lib/iomgr/timer_uv.h b/src/core/lib/iomgr/timer_uv.h index 214aaa600a..093b2d085d 100644 --- a/src/core/lib/iomgr/timer_uv.h +++ b/src/core/lib/iomgr/timer_uv.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_UV_H #define GRPC_CORE_LIB_IOMGR_TIMER_UV_H +#include + #include "src/core/lib/iomgr/exec_ctx.h" struct grpc_timer { diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc index eecb3b09d9..ec65497d79 100644 --- a/src/core/lib/iomgr/udp_server.cc +++ b/src/core/lib/iomgr/udp_server.cc @@ -25,6 +25,8 @@ #define SO_RXQ_OVFL 40 #endif +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index c1aa49f15d..1be4d04dbb 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_UDP_SERVER_H #define GRPC_CORE_LIB_IOMGR_UDP_SERVER_H +#include + #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index b603916c47..8d252fd331 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -15,6 +15,8 @@ * limitations under the License. * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_HAVE_UNIX_SOCKET diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 1c079e6e76..917d0327a9 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H #define GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H +#include + #include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.cc b/src/core/lib/iomgr/unix_sockets_posix_noop.cc index fbd9602e1b..dfab3e0acb 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.cc +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/unix_sockets_posix.h" #ifndef GRPC_HAVE_UNIX_SOCKET diff --git a/src/core/lib/iomgr/wakeup_fd_cv.cc b/src/core/lib/iomgr/wakeup_fd_cv.cc index 41d35cb1fd..ee322105ae 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.cc +++ b/src/core/lib/iomgr/wakeup_fd_cv.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h index 399620af76..86365f07e1 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.h +++ b/src/core/lib/iomgr/wakeup_fd_cv.h @@ -33,6 +33,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H #define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H +#include + #include #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.cc b/src/core/lib/iomgr/wakeup_fd_eventfd.cc index 421ac55b00..dcf7dab71f 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.cc +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_LINUX_EVENTFD diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.cc b/src/core/lib/iomgr/wakeup_fd_nospecial.cc index c2b525a254..64778929f0 100644 --- a/src/core/lib/iomgr/wakeup_fd_nospecial.cc +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.cc @@ -21,6 +21,8 @@ * systems without anything better than pipe. */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_NO_SPECIAL_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.cc b/src/core/lib/iomgr/wakeup_fd_pipe.cc index 05d69dc9cc..cb173903a9 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.cc +++ b/src/core/lib/iomgr/wakeup_fd_pipe.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.h b/src/core/lib/iomgr/wakeup_fd_pipe.h index 326a0c4e01..1756976305 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.h +++ b/src/core/lib/iomgr/wakeup_fd_pipe.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H #define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H +#include + #include "src/core/lib/iomgr/wakeup_fd_posix.h" extern const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable; diff --git a/src/core/lib/iomgr/wakeup_fd_posix.cc b/src/core/lib/iomgr/wakeup_fd_posix.cc index e8de208a25..b5b8b37a9a 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.cc +++ b/src/core/lib/iomgr/wakeup_fd_posix.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index a9584d0d48..670c319593 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -47,6 +47,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H #define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H +#include + #include "src/core/lib/iomgr/error.h" void grpc_wakeup_fd_global_init(void); diff --git a/src/core/lib/json/json.cc b/src/core/lib/json/json.cc index adf35b9088..2141db4c5b 100644 --- a/src/core/lib/json/json.cc +++ b/src/core/lib/json/json.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h index bbd43025eb..3a62ef9cfb 100644 --- a/src/core/lib/json/json.h +++ b/src/core/lib/json/json.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_JSON_JSON_H #define GRPC_CORE_LIB_JSON_JSON_H +#include + #include #include "src/core/lib/json/json_common.h" diff --git a/src/core/lib/json/json_reader.cc b/src/core/lib/json/json_reader.cc index 6dadea5006..819572e4de 100644 --- a/src/core/lib/json/json_reader.cc +++ b/src/core/lib/json/json_reader.cc @@ -16,10 +16,10 @@ * */ -#include - #include +#include + #include #include "src/core/lib/json/json_reader.h" diff --git a/src/core/lib/json/json_reader.h b/src/core/lib/json/json_reader.h index 03185cb2b6..78f7ad9f3a 100644 --- a/src/core/lib/json/json_reader.h +++ b/src/core/lib/json/json_reader.h @@ -20,6 +20,7 @@ #define GRPC_CORE_LIB_JSON_JSON_READER_H #include + #include "src/core/lib/json/json_common.h" typedef enum { diff --git a/src/core/lib/json/json_string.cc b/src/core/lib/json/json_string.cc index 8200900956..4f9175b9e7 100644 --- a/src/core/lib/json/json_string.cc +++ b/src/core/lib/json/json_string.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/json/json_writer.cc b/src/core/lib/json/json_writer.cc index 6d442b8716..7bbdccc7a3 100644 --- a/src/core/lib/json/json_writer.cc +++ b/src/core/lib/json/json_writer.cc @@ -16,10 +16,10 @@ * */ -#include - #include +#include + #include "src/core/lib/json/json_writer.h" static void json_writer_output_char(grpc_json_writer* writer, char c) { diff --git a/src/core/lib/json/json_writer.h b/src/core/lib/json/json_writer.h index a4f2d4daeb..ba0bedde7f 100644 --- a/src/core/lib/json/json_writer.h +++ b/src/core/lib/json/json_writer.h @@ -31,6 +31,8 @@ #ifndef GRPC_CORE_LIB_JSON_JSON_WRITER_H #define GRPC_CORE_LIB_JSON_JSON_WRITER_H +#include + #include #include "src/core/lib/json/json_common.h" diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc index c7e212bb21..14051a3f00 100644 --- a/src/core/lib/security/context/security_context.cc +++ b/src/core/lib/security/context/security_context.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index 34f8c2487e..e782e4f28f 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H #define GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H +#include + #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index ea2c4e208f..b8f409260f 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index 11990d38ff..a952ad57f1 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" typedef struct { diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc index 17f7de58be..c43cb440eb 100644 --- a/src/core/lib/security/credentials/credentials.cc +++ b/src/core/lib/security/credentials/credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/credentials.h" #include diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 50beca897e..b1421e83c5 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H +#include + #include #include #include diff --git a/src/core/lib/security/credentials/credentials_metadata.cc b/src/core/lib/security/credentials/credentials_metadata.cc index 250e384155..703de4aaaf 100644 --- a/src/core/lib/security/credentials/credentials_metadata.cc +++ b/src/core/lib/security/credentials/credentials_metadata.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/credentials.h" #include diff --git a/src/core/lib/security/credentials/fake/fake_credentials.cc b/src/core/lib/security/credentials/fake/fake_credentials.cc index fa0f89c583..46311fa122 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.cc +++ b/src/core/lib/security/credentials/fake/fake_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index 0e9ff155d8..5166e43167 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" /* -- Fake transport security credentials. -- */ diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.cc b/src/core/lib/security/credentials/google_default/credentials_generic.cc index 15ae9d6428..10ff0f620f 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.cc +++ b/src/core/lib/security/credentials/google_default/credentials_generic.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 65455f94b3..70d4c3ea51 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/credentials.h" #include diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 7f19fbc785..5d92fa88c4 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/iam/iam_credentials.h" #include diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 5e3cf65bad..a45710fe0f 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" typedef struct { diff --git a/src/core/lib/security/credentials/jwt/json_token.cc b/src/core/lib/security/credentials/jwt/json_token.cc index f7c9f57808..1c4827df0f 100644 --- a/src/core/lib/security/credentials/jwt/json_token.cc +++ b/src/core/lib/security/credentials/jwt/json_token.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/jwt/json_token.h" #include diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h index 9b774882b7..d0fb4ebd0a 100644 --- a/src/core/lib/security/credentials/jwt/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H +#include + #include #include diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index f58a8b67ba..5c3d34aa56 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/jwt/json_token.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index f5c1ada6ca..5c47276e32 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" #include diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index b3805e75cd..cdb09870bd 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H +#include + #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/json/json.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index afae7d8f2f..2129029737 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index e5b8df8eb9..c0dd1546e3 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H +#include + #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index ddb86e153b..73946ce039 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/plugin/plugin_credentials.h" #include diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index e1467b0824..caf990efa1 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" extern grpc_core::TraceFlag grpc_plugin_credentials_trace; diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.cc b/src/core/lib/security/credentials/ssl/ssl_credentials.cc index a4fce25f3a..252b25bc0a 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.cc +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" #include diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index 0003905857..712d34c733 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -18,6 +18,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" typedef struct { diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index eb88045711..b01fd6f769 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/security_connector/security_connector.h" #include diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h index 0c972a7125..130c8ecd3e 100644 --- a/src/core/lib/security/security_connector/security_connector.h +++ b/src/core/lib/security/security_connector/security_connector.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H #define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H +#include + #include #include diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h index e999a027ae..af2104cfbc 100644 --- a/src/core/lib/security/transport/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H +#include + #include #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index 506f5a0666..d6ca8ee8f8 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/transport/auth_filters.h" #include diff --git a/src/core/lib/security/transport/lb_targets_info.cc b/src/core/lib/security/transport/lb_targets_info.cc index 67a3c7449d..155a91e556 100644 --- a/src/core/lib/security/transport/lb_targets_info.cc +++ b/src/core/lib/security/transport/lb_targets_info.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h index 7543d3c012..7e816c5222 100644 --- a/src/core/lib/security/transport/lb_targets_info.h +++ b/src/core/lib/security/transport/lb_targets_info.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H +#include + #include "src/core/lib/slice/slice_hash_table.h" /** Return a channel argument containing \a targets_info. */ diff --git a/src/core/lib/security/transport/secure_endpoint.cc b/src/core/lib/security/transport/secure_endpoint.cc index f72f8b6121..31b779e333 100644 --- a/src/core/lib/security/transport/secure_endpoint.cc +++ b/src/core/lib/security/transport/secure_endpoint.cc @@ -20,6 +20,8 @@ using that endpoint. Because of various transitive includes in uv.h, including windows.h on Windows, uv.h must be included before other system headers. Therefore, sockaddr.h must always be included first */ +#include + #include "src/core/lib/iomgr/sockaddr.h" #include diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index b2556a0182..e7e3351678 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H +#include + #include #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/lib/security/transport/security_handshaker.cc b/src/core/lib/security/transport/security_handshaker.cc index b37392ab81..0c97dfa6b3 100644 --- a/src/core/lib/security/transport/security_handshaker.cc +++ b/src/core/lib/security/transport/security_handshaker.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/transport/security_handshaker.h" #include diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h index f109a51996..ecf59ec5c5 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H +#include + #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc index 409aded650..a560a4a02e 100644 --- a/src/core/lib/security/transport/server_auth_filter.cc +++ b/src/core/lib/security/transport/server_auth_filter.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/security/transport/tsi_error.cc b/src/core/lib/security/transport/tsi_error.cc index f71696d35d..f78bb8df38 100644 --- a/src/core/lib/security/transport/tsi_error.cc +++ b/src/core/lib/security/transport/tsi_error.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/transport/tsi_error.h" grpc_error* grpc_set_tsi_error_result(grpc_error* error, tsi_result result) { diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h index 8fa6c480ac..16e04f70f1 100644 --- a/src/core/lib/security/transport/tsi_error.h +++ b/src/core/lib/security/transport/tsi_error.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H +#include + #include "src/core/lib/iomgr/error.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/lib/security/util/json_util.cc b/src/core/lib/security/util/json_util.cc index fef1a1f51d..75512a19c9 100644 --- a/src/core/lib/security/util/json_util.cc +++ b/src/core/lib/security/util/json_util.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/security/util/json_util.h" #include diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h index b7e46d4062..89deffcc08 100644 --- a/src/core/lib/security/util/json_util.h +++ b/src/core/lib/security/util/json_util.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H #define GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H +#include + #include #include "src/core/lib/json/json.h" diff --git a/src/core/lib/slice/b64.cc b/src/core/lib/slice/b64.cc index 3e19b7197f..27f2724002 100644 --- a/src/core/lib/slice/b64.cc +++ b/src/core/lib/slice/b64.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/slice/b64.h" #include diff --git a/src/core/lib/slice/b64.h b/src/core/lib/slice/b64.h index 17e7306303..4475568c25 100644 --- a/src/core/lib/slice/b64.h +++ b/src/core/lib/slice/b64.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SLICE_B64_H #define GRPC_CORE_LIB_SLICE_B64_H +#include + #include /* Encodes data using base64. It is the caller's responsability to free diff --git a/src/core/lib/slice/percent_encoding.cc b/src/core/lib/slice/percent_encoding.cc index 84fb554454..45cd2cc47f 100644 --- a/src/core/lib/slice/percent_encoding.cc +++ b/src/core/lib/slice/percent_encoding.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/slice/percent_encoding.h" #include diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index a1009ff01f..6b13ffc3fe 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -26,6 +26,8 @@ and another which applies percent encoding only to non-http2 header bytes (the 'compatible' variant) */ +#include + #include #include diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index 476d941fbb..585b41cf91 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/slice/slice_internal.h" #include diff --git a/src/core/lib/slice/slice_buffer.cc b/src/core/lib/slice/slice_buffer.cc index 0416c9d371..e418ab10ef 100644 --- a/src/core/lib/slice/slice_buffer.cc +++ b/src/core/lib/slice/slice_buffer.cc @@ -16,9 +16,10 @@ * */ -#include #include +#include + #include #include diff --git a/src/core/lib/slice/slice_hash_table.cc b/src/core/lib/slice/slice_hash_table.cc index 2342e90485..9e32321636 100644 --- a/src/core/lib/slice/slice_hash_table.cc +++ b/src/core/lib/slice/slice_hash_table.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/lib/slice/slice_hash_table.h" #include diff --git a/src/core/lib/slice/slice_hash_table.h b/src/core/lib/slice/slice_hash_table.h index db69da662a..819bb3b5bc 100644 --- a/src/core/lib/slice/slice_hash_table.h +++ b/src/core/lib/slice/slice_hash_table.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H #define GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H +#include + #include "src/core/lib/transport/metadata.h" /** Hash table implementation. diff --git a/src/core/lib/slice/slice_intern.cc b/src/core/lib/slice/slice_intern.cc index 2d633c4903..e53c040e1a 100644 --- a/src/core/lib/slice/slice_intern.cc +++ b/src/core/lib/slice/slice_intern.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/slice/slice_internal.h" #include diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index 4e9ab80261..065c25c90c 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H #define GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H +#include + #include #include diff --git a/src/core/lib/slice/slice_string_helpers.cc b/src/core/lib/slice/slice_string_helpers.cc index f91ece3b98..6af9c33eb5 100644 --- a/src/core/lib/slice/slice_string_helpers.cc +++ b/src/core/lib/slice/slice_string_helpers.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/slice/slice_string_helpers.h" #include diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index 429f9ff4b5..976f72411a 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -19,12 +19,13 @@ #ifndef GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H #define GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H +#include + #include #include #include #include -#include #include "src/core/lib/gpr/string.h" diff --git a/src/core/lib/slice/slice_traits.h b/src/core/lib/slice/slice_traits.h index 4b898bdcd4..ee01916525 100644 --- a/src/core/lib/slice/slice_traits.h +++ b/src/core/lib/slice/slice_traits.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H #define GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H +#include + #include #include diff --git a/src/core/lib/surface/api_trace.cc b/src/core/lib/surface/api_trace.cc index 7ab836a9ba..bab5a7910c 100644 --- a/src/core/lib/surface/api_trace.cc +++ b/src/core/lib/surface/api_trace.cc @@ -16,7 +16,9 @@ * */ -#include "src/core/lib/surface/api_trace.h" +#include + #include "src/core/lib/debug/trace.h" +#include "src/core/lib/surface/api_trace.h" grpc_core::TraceFlag grpc_api_trace(false, "api"); diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h index a4e11ce154..72ed830554 100644 --- a/src/core/lib/surface/api_trace.h +++ b/src/core/lib/surface/api_trace.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_API_TRACE_H #define GRPC_CORE_LIB_SURFACE_API_TRACE_H +#include + #include #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/surface/byte_buffer.cc b/src/core/lib/surface/byte_buffer.cc index 01cbf7354a..fce87dc611 100644 --- a/src/core/lib/surface/byte_buffer.cc +++ b/src/core/lib/surface/byte_buffer.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include diff --git a/src/core/lib/surface/byte_buffer_reader.cc b/src/core/lib/surface/byte_buffer_reader.cc index f7ea5161c7..a10f1a3933 100644 --- a/src/core/lib/surface/byte_buffer_reader.cc +++ b/src/core/lib/surface/byte_buffer_reader.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 2d5077525c..3df745652a 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index 189329ccc4..793cce4efa 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_CALL_H #define GRPC_CORE_LIB_SURFACE_CALL_H +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/lib/surface/call_details.cc b/src/core/lib/surface/call_details.cc index cd0b14586a..7f20b1dae7 100644 --- a/src/core/lib/surface/call_details.cc +++ b/src/core/lib/surface/call_details.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/surface/call_log_batch.cc b/src/core/lib/surface/call_log_batch.cc index d56ea2a932..f0c82c0357 100644 --- a/src/core/lib/surface/call_log_batch.cc +++ b/src/core/lib/surface/call_log_batch.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/call.h" #include diff --git a/src/core/lib/surface/call_test_only.h b/src/core/lib/surface/call_test_only.h index 9eb32f03fb..dbd1a866ca 100644 --- a/src/core/lib/surface/call_test_only.h +++ b/src/core/lib/surface/call_test_only.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H #define GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H +#include + #include /** Return the message compression algorithm from \a call. diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index d536027c08..03353d6beb 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/channel.h" #include diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 26d8fceb2f..288313951e 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_H #define GRPC_CORE_LIB_SURFACE_CHANNEL_H +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/surface/channel_stack_type.h" diff --git a/src/core/lib/surface/channel_init.cc b/src/core/lib/surface/channel_init.cc index b1e1dceed3..62eb1c3f9d 100644 --- a/src/core/lib/surface/channel_init.cc +++ b/src/core/lib/surface/channel_init.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/channel_init.h" #include diff --git a/src/core/lib/surface/channel_init.h b/src/core/lib/surface/channel_init.h index d702f0f325..f01852473b 100644 --- a/src/core/lib/surface/channel_init.h +++ b/src/core/lib/surface/channel_init.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H #define GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H +#include + #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/surface/channel_ping.cc b/src/core/lib/surface/channel_ping.cc index 513519d991..bae945942f 100644 --- a/src/core/lib/surface/channel_ping.cc +++ b/src/core/lib/surface/channel_ping.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/channel.h" #include diff --git a/src/core/lib/surface/channel_stack_type.cc b/src/core/lib/surface/channel_stack_type.cc index 366c452942..fcf96ddc9f 100644 --- a/src/core/lib/surface/channel_stack_type.cc +++ b/src/core/lib/surface/channel_stack_type.cc @@ -16,10 +16,11 @@ * */ -#include "src/core/lib/surface/channel_stack_type.h" -#include #include +#include +#include "src/core/lib/surface/channel_stack_type.h" + bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type) { switch (type) { case GRPC_CLIENT_CHANNEL: diff --git a/src/core/lib/surface/channel_stack_type.h b/src/core/lib/surface/channel_stack_type.h index 52f85a6406..8a3c08e1cc 100644 --- a/src/core/lib/surface/channel_stack_type.h +++ b/src/core/lib/surface/channel_stack_type.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H #define GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H +#include + #include typedef enum { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index aea47afaf5..c9dc2d93c1 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -21,6 +21,8 @@ /* Internal API for completion queues */ +#include + #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/pollset.h" diff --git a/src/core/lib/surface/completion_queue_factory.cc b/src/core/lib/surface/completion_queue_factory.cc index d0bb065c8f..51c1183c5f 100644 --- a/src/core/lib/surface/completion_queue_factory.cc +++ b/src/core/lib/surface/completion_queue_factory.cc @@ -16,8 +16,10 @@ * */ -#include "src/core/lib/surface/completion_queue_factory.h" +#include + #include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/surface/completion_queue_factory.h" #include diff --git a/src/core/lib/surface/completion_queue_factory.h b/src/core/lib/surface/completion_queue_factory.h index 89be8f8216..d2b30a9ce1 100644 --- a/src/core/lib/surface/completion_queue_factory.h +++ b/src/core/lib/surface/completion_queue_factory.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H #define GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H +#include + #include #include "src/core/lib/surface/completion_queue.h" diff --git a/src/core/lib/surface/event_string.cc b/src/core/lib/surface/event_string.cc index 7f40bb2405..d639baec45 100644 --- a/src/core/lib/surface/event_string.cc +++ b/src/core/lib/surface/event_string.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/event_string.h" #include diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h index cbf96da6c5..e6095705e9 100644 --- a/src/core/lib/surface/event_string.h +++ b/src/core/lib/surface/event_string.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_EVENT_STRING_H #define GRPC_CORE_LIB_SURFACE_EVENT_STRING_H +#include + #include /* Returns a string describing an event. Must be later freed with gpr_free() */ diff --git a/src/core/lib/surface/init_unsecure.cc b/src/core/lib/surface/init_unsecure.cc index b852cab985..2b3bc64382 100644 --- a/src/core/lib/surface/init_unsecure.cc +++ b/src/core/lib/surface/init_unsecure.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/init.h" void grpc_security_pre_init(void) {} diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc index a1f1cf1107..f5aca91f97 100644 --- a/src/core/lib/surface/lame_client.cc +++ b/src/core/lib/surface/lame_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h index 3ce353f101..aefa67c24a 100644 --- a/src/core/lib/surface/lame_client.h +++ b/src/core/lib/surface/lame_client.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H #define GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H +#include + #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_lame_filter; diff --git a/src/core/lib/surface/metadata_array.cc b/src/core/lib/surface/metadata_array.cc index 0afb8b4b87..f794a2bb95 100644 --- a/src/core/lib/surface/metadata_array.cc +++ b/src/core/lib/surface/metadata_array.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index d71a23a5d7..f7505c888e 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/surface/server.h" #include diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index 63b6dff16b..c617cc223e 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_SERVER_H #define GRPC_CORE_LIB_SURFACE_SERVER_H +#include + #include #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/surface/validate_metadata.cc b/src/core/lib/surface/validate_metadata.cc index fc94ea7dbe..2dd18f3dd3 100644 --- a/src/core/lib/surface/validate_metadata.cc +++ b/src/core/lib/surface/validate_metadata.cc @@ -16,12 +16,13 @@ * */ +#include + #include #include #include #include -#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h index ff074b00b2..e87fb7beed 100644 --- a/src/core/lib/surface/validate_metadata.h +++ b/src/core/lib/surface/validate_metadata.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H #define GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H +#include + #include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/surface/version.cc b/src/core/lib/surface/version.cc index 1710fd5afb..be196a78bc 100644 --- a/src/core/lib/surface/version.cc +++ b/src/core/lib/surface/version.cc @@ -19,6 +19,8 @@ /* This file is autogenerated from: templates/src/core/surface/version.c.template */ +#include + #include const char* grpc_version_string(void) { return "6.0.0-dev"; } diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc index 70b308230b..8130535ddd 100644 --- a/src/core/lib/transport/bdp_estimator.cc +++ b/src/core/lib/transport/bdp_estimator.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/bdp_estimator.h" #include diff --git a/src/core/lib/transport/byte_stream.cc b/src/core/lib/transport/byte_stream.cc index b96598c393..e1751f8010 100644 --- a/src/core/lib/transport/byte_stream.cc +++ b/src/core/lib/transport/byte_stream.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/byte_stream.h" #include diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index fc12e5686d..4d3c3c131b 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H #define GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc index 17f3529a0e..0122e773ca 100644 --- a/src/core/lib/transport/connectivity_state.cc +++ b/src/core/lib/transport/connectivity_state.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/connectivity_state.h" #include diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h index c3a50f3211..421db5aa39 100644 --- a/src/core/lib/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H #define GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H +#include + #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index 79d904315e..2eff8b2916 100644 --- a/src/core/lib/transport/error_utils.cc +++ b/src/core/lib/transport/error_utils.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/error_utils.h" #include diff --git a/src/core/lib/transport/error_utils.h b/src/core/lib/transport/error_utils.h index 4100f65d6d..9a46267f38 100644 --- a/src/core/lib/transport/error_utils.h +++ b/src/core/lib/transport/error_utils.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H #define GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H +#include + #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/http2_errors.h" diff --git a/src/core/lib/transport/metadata.cc b/src/core/lib/transport/metadata.cc index e06e0b5313..d10194a2fe 100644 --- a/src/core/lib/transport/metadata.cc +++ b/src/core/lib/transport/metadata.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/metadata.h" #include diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 82142ebed8..5e0ecbdb96 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_H #define GRPC_CORE_LIB_TRANSPORT_METADATA_H +#include + #include #include diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc index 9c95339ba0..b23f516516 100644 --- a/src/core/lib/transport/metadata_batch.cc +++ b/src/core/lib/transport/metadata_batch.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/metadata_batch.h" #include diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 8353a426f8..06fc9ade7e 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -19,11 +19,12 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H #define GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H +#include + #include #include #include -#include #include #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" diff --git a/src/core/lib/transport/pid_controller.cc b/src/core/lib/transport/pid_controller.cc index b33ea63df6..dbc98f4917 100644 --- a/src/core/lib/transport/pid_controller.cc +++ b/src/core/lib/transport/pid_controller.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/pid_controller.h" #include "src/core/lib/gpr/useful.h" diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h index 87e59a1a90..e26205bf20 100644 --- a/src/core/lib/transport/pid_controller.h +++ b/src/core/lib/transport/pid_controller.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H #define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H +#include + #include /* \file Simple PID controller. diff --git a/src/core/lib/transport/service_config.cc b/src/core/lib/transport/service_config.cc index 75196c5f88..b1d727419d 100644 --- a/src/core/lib/transport/service_config.cc +++ b/src/core/lib/transport/service_config.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include "src/core/lib/transport/service_config.h" #include diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h index 98554b9f0f..6517f36802 100644 --- a/src/core/lib/transport/service_config.h +++ b/src/core/lib/transport/service_config.h @@ -17,6 +17,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H #define GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H +#include + #include #include "src/core/lib/json/json.h" diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index 5994cbc265..0e11b6e4e4 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -24,6 +24,8 @@ * an explanation of what's going on. */ +#include + #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 8ce9b21bc1..88d9f9f52c 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -27,6 +27,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H #define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H +#include + #include "src/core/lib/transport/metadata.h" #define GRPC_STATIC_MDSTR_COUNT 101 diff --git a/src/core/lib/transport/status_conversion.cc b/src/core/lib/transport/status_conversion.cc index 46cba4292b..e58bef5ba9 100644 --- a/src/core/lib/transport/status_conversion.cc +++ b/src/core/lib/transport/status_conversion.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/status_conversion.h" grpc_http2_error_code grpc_status_to_http2_error(grpc_status_code status) { diff --git a/src/core/lib/transport/status_conversion.h b/src/core/lib/transport/status_conversion.h index 107eb92a53..9f14e9bee0 100644 --- a/src/core/lib/transport/status_conversion.h +++ b/src/core/lib/transport/status_conversion.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H #define GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H +#include + #include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/http2_errors.h" diff --git a/src/core/lib/transport/timeout_encoding.cc b/src/core/lib/transport/timeout_encoding.cc index 6800255be2..c37249920b 100644 --- a/src/core/lib/transport/timeout_encoding.cc +++ b/src/core/lib/transport/timeout_encoding.cc @@ -16,12 +16,13 @@ * */ +#include + #include "src/core/lib/transport/timeout_encoding.h" #include #include -#include #include "src/core/lib/gpr/string.h" static int64_t round_up(int64_t x, int64_t divisor) { diff --git a/src/core/lib/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h index 4e9268262e..8505e32ff0 100644 --- a/src/core/lib/transport/timeout_encoding.h +++ b/src/core/lib/transport/timeout_encoding.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H #define GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H +#include + #include #include diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc index d71d4fdd76..c90d16fc32 100644 --- a/src/core/lib/transport/transport.cc +++ b/src/core/lib/transport/transport.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/lib/transport/transport.h" #include diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index b392c696cd..b279ce8c80 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H #define GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H +#include + #include #include "src/core/lib/channel/context.h" diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h index 50b8a5f9b7..ba5e05df0a 100644 --- a/src/core/lib/transport/transport_impl.h +++ b/src/core/lib/transport/transport_impl.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H #define GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H +#include + #include "src/core/lib/transport/transport.h" typedef struct grpc_transport_vtable { diff --git a/src/core/plugin_registry/grpc_cronet_plugin_registry.cc b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc index fe5eb28f05..49b9c7d4fe 100644 --- a/src/core/plugin_registry/grpc_cronet_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include void grpc_http_filters_init(void); diff --git a/src/core/plugin_registry/grpc_plugin_registry.cc b/src/core/plugin_registry/grpc_plugin_registry.cc index fdf9acc09c..ccf5f79a8e 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_plugin_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include void grpc_http_filters_init(void); diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc index d73f946241..b08c5ce3ae 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc @@ -16,6 +16,8 @@ * */ +#include + #include void grpc_http_filters_init(void); diff --git a/src/core/tsi/alts_transport_security.cc b/src/core/tsi/alts_transport_security.cc index 1654d893d0..b45b4e0736 100644 --- a/src/core/tsi/alts_transport_security.cc +++ b/src/core/tsi/alts_transport_security.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/tsi/alts_transport_security.h" #include diff --git a/src/core/tsi/alts_transport_security.h b/src/core/tsi/alts_transport_security.h index 37febd1e28..3ca064992b 100644 --- a/src/core/tsi/alts_transport_security.h +++ b/src/core/tsi/alts_transport_security.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_ALTS_TRANSPORT_SECURITY_H #define GRPC_CORE_TSI_ALTS_TRANSPORT_SECURITY_H +#include + #include #include diff --git a/src/core/tsi/fake_transport_security.cc b/src/core/tsi/fake_transport_security.cc index b5b7203d20..ad08b50ede 100644 --- a/src/core/tsi/fake_transport_security.cc +++ b/src/core/tsi/fake_transport_security.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/tsi/fake_transport_security.h" #include @@ -23,7 +25,6 @@ #include #include -#include #include "src/core/lib/gpr/useful.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/tsi/fake_transport_security.h b/src/core/tsi/fake_transport_security.h index 3848e7c6bf..37791827e1 100644 --- a/src/core/tsi/fake_transport_security.h +++ b/src/core/tsi/fake_transport_security.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_FAKE_TRANSPORT_SECURITY_H #define GRPC_CORE_TSI_FAKE_TRANSPORT_SECURITY_H +#include + #include "src/core/tsi/transport_security_interface.h" /* Value for the TSI_CERTIFICATE_TYPE_PEER_PROPERTY property for FAKE certs. */ diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 29fd59a0e9..971170b7c5 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -16,10 +16,10 @@ * */ -#include "src/core/tsi/ssl_transport_security.h" - #include +#include "src/core/tsi/ssl_transport_security.h" + #include #include diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index bf211e110a..edebadc1be 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_SSL_TRANSPORT_SECURITY_H #define GRPC_CORE_TSI_SSL_TRANSPORT_SECURITY_H +#include + #include "src/core/tsi/transport_security_interface.h" /* Value for the TSI_CERTIFICATE_TYPE_PEER_PROPERTY property for X509 certs. */ diff --git a/src/core/tsi/ssl_types.h b/src/core/tsi/ssl_types.h index 3788643355..b15d02be39 100644 --- a/src/core/tsi/ssl_types.h +++ b/src/core/tsi/ssl_types.h @@ -27,6 +27,8 @@ * function */ +#include + #include #ifdef OPENSSL_IS_BORINGSSL diff --git a/src/core/tsi/transport_security.cc b/src/core/tsi/transport_security.cc index 0c8e3e9dcc..129533f779 100644 --- a/src/core/tsi/transport_security.cc +++ b/src/core/tsi/transport_security.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/tsi/transport_security.h" #include diff --git a/src/core/tsi/transport_security.h b/src/core/tsi/transport_security.h index ed662d48af..b1ec82d3f7 100644 --- a/src/core/tsi/transport_security.h +++ b/src/core/tsi/transport_security.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_H #define GRPC_CORE_TSI_TRANSPORT_SECURITY_H +#include + #include #include "src/core/lib/debug/trace.h" diff --git a/src/core/tsi/transport_security_adapter.cc b/src/core/tsi/transport_security_adapter.cc index 5f094b3201..25608f065a 100644 --- a/src/core/tsi/transport_security_adapter.cc +++ b/src/core/tsi/transport_security_adapter.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/tsi/transport_security_adapter.h" #include diff --git a/src/core/tsi/transport_security_adapter.h b/src/core/tsi/transport_security_adapter.h index 9818fceb86..f83ecc53e5 100644 --- a/src/core/tsi/transport_security_adapter.h +++ b/src/core/tsi/transport_security_adapter.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H #define GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H +#include + #include "src/core/tsi/transport_security_interface.h" /* Create a tsi handshaker that takes an implementation of old interface and diff --git a/src/core/tsi/transport_security_grpc.cc b/src/core/tsi/transport_security_grpc.cc index 76f7ae782f..c73a6e303e 100644 --- a/src/core/tsi/transport_security_grpc.cc +++ b/src/core/tsi/transport_security_grpc.cc @@ -16,6 +16,8 @@ * */ +#include + #include "src/core/tsi/transport_security_grpc.h" /* This method creates a tsi_zero_copy_grpc_protector object. */ diff --git a/src/core/tsi/transport_security_grpc.h b/src/core/tsi/transport_security_grpc.h index 0156ff1c68..d3bb04d07f 100644 --- a/src/core/tsi/transport_security_grpc.h +++ b/src/core/tsi/transport_security_grpc.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_GRPC_H #define GRPC_CORE_TSI_TRANSPORT_SECURITY_GRPC_H +#include + #include #include "src/core/tsi/transport_security.h" diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index e925598463..8c10866934 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H #define GRPC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H +#include + #include #include diff --git a/templates/src/core/lib/surface/version.cc.template b/templates/src/core/lib/surface/version.cc.template index d9fa4479db..0cb3154725 100644 --- a/templates/src/core/lib/surface/version.cc.template +++ b/templates/src/core/lib/surface/version.cc.template @@ -21,6 +21,8 @@ /* This file is autogenerated from: templates/src/core/surface/version.c.template */ + #include + #include const char* grpc_version_string(void) { return "${settings.core_version}"; } diff --git a/templates/src/core/plugin_registry.template b/templates/src/core/plugin_registry.template index 805ae9049f..a00d204a46 100644 --- a/templates/src/core/plugin_registry.template +++ b/templates/src/core/plugin_registry.template @@ -22,6 +22,8 @@ template: | * */ + #include + #include %for plugin in selected.plugins: diff --git a/tools/run_tests/sanity/check_port_platform.py b/tools/run_tests/sanity/check_port_platform.py new file mode 100755 index 0000000000..fff828eaee --- /dev/null +++ b/tools/run_tests/sanity/check_port_platform.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import sys + +os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '../../..')) + + +def check_port_platform_inclusion(directory_root): + bad_files = [] + for root, dirs, files in os.walk(directory_root): + for filename in files: + path = os.path.join(root, filename) + if os.path.splitext(path)[1] not in ['.c', '.cc', '.h']: continue + if path in [ + os.path.join('include', 'grpc', 'support', + 'port_platform.h'), + os.path.join('include', 'grpc', 'impl', 'codegen', + 'port_platform.h'), + ]: + continue + if filename.endswith('.pb.h') or filename.endswith('.pb.c'): + continue + with open(path) as f: + all_lines_in_file = f.readlines() + for index, l in enumerate(all_lines_in_file): + if '#include' in l: + if l not in [ + '#include \n', + '#include \n' + ]: + bad_files.append(path) + elif all_lines_in_file[index + 1] != '\n': + # Require a blank line after including port_platform.h in + # order to prevent the formatter from reording it's + # inclusion order upon future changes. + bad_files.append(path) + break + return bad_files + + +all_bad_files = [] +all_bad_files += check_port_platform_inclusion(os.path.join('src', 'core')) +all_bad_files += check_port_platform_inclusion(os.path.join('include', 'grpc')) + +if len(all_bad_files) > 0: + for f in all_bad_files: + print(('port_platform.h is not the first included header or there ' + 'is not a blank line following its inclusion in %s') % f) + sys.exit(1) diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index 0c1ad9d44d..a15473db0f 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -11,6 +11,7 @@ - script: tools/run_tests/sanity/core_banned_functions.py - script: tools/run_tests/sanity/core_untyped_structs.sh - script: tools/run_tests/sanity/check_deprecated_grpc++.py +- script: tools/run_tests/sanity/check_port_platform.py - script: tools/buildgen/generate_projects.sh -j 3 cpu_cost: 3 - script: tools/distrib/check_copyright.py -- cgit v1.2.3 From af9f81cbb00ca6ac3f22bcc77c6ef86537851407 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 22 Feb 2018 20:38:31 -0800 Subject: Cancel max idle timer when shutting down the server channel --- src/core/ext/filters/max_age/max_age_filter.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/max_age/max_age_filter.cc b/src/core/ext/filters/max_age/max_age_filter.cc index abb9d69036..0de392f4d9 100644 --- a/src/core/ext/filters/max_age/max_age_filter.cc +++ b/src/core/ext/filters/max_age/max_age_filter.cc @@ -368,6 +368,9 @@ static void channel_connectivity_changed(void* arg, grpc_error* error) { max_idle_timer, and prevent max_idle_timer from being started in the future. */ increase_call_count(chand); + if (gpr_atm_acq_load(&chand->idle_state) == MAX_IDLE_STATE_SEEN_EXIT_IDLE) { + grpc_timer_cancel(&chand->max_idle_timer); + } } } -- cgit v1.2.3 From 3e7f2df04749720dc55a265c5ff03f9fbda2b44c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 26 Feb 2018 13:17:06 -0800 Subject: Convert slice hash table and service config code to C++. --- BUILD | 10 +- CMakeLists.txt | 81 ++++--- Makefile | 102 ++++---- build.yaml | 30 +-- config.m4 | 4 +- config.w32 | 4 +- gRPC-C++.podspec | 3 +- gRPC-Core.podspec | 10 +- grpc.gemspec | 7 +- grpc.gyp | 10 +- package.xml | 7 +- .../ext/filters/client_channel/client_channel.cc | 157 +++---------- .../lb_policy/grpclb/grpclb_channel_secure.cc | 55 ++--- .../ext/filters/client_channel/method_params.cc | 103 +++++++++ .../ext/filters/client_channel/method_params.h | 63 +++++ .../resolver/dns/c_ares/dns_resolver_ares.cc | 8 +- .../filters/message_size/message_size_filter.cc | 89 +++---- .../chttp2/client/secure/secure_channel_create.cc | 39 ++-- src/core/lib/gprpp/orphanable.h | 1 + src/core/lib/gprpp/ref_counted.h | 2 + src/core/lib/gprpp/ref_counted_ptr.h | 1 + .../security_connector/security_connector.cc | 4 +- src/core/lib/security/transport/lb_targets_info.cc | 61 ----- src/core/lib/security/transport/lb_targets_info.h | 34 --- .../security/transport/target_authority_table.cc | 75 ++++++ .../security/transport/target_authority_table.h | 40 ++++ src/core/lib/slice/slice_hash_table.cc | 147 ------------ src/core/lib/slice/slice_hash_table.h | 221 ++++++++++++++---- src/core/lib/transport/service_config.cc | 194 ++-------------- src/core/lib/transport/service_config.h | 256 ++++++++++++++++++--- src/python/grpcio/grpc_core_dependencies.py | 4 +- test/core/slice/BUILD | 3 + test/core/slice/slice_hash_table_test.cc | 248 ++++++++++---------- tools/doxygen/Doxyfile.core.internal | 7 +- tools/run_tests/generated/sources_and_headers.json | 44 ++-- tools/run_tests/generated/tests.json | 48 ++-- 36 files changed, 1146 insertions(+), 1026 deletions(-) create mode 100644 src/core/ext/filters/client_channel/method_params.cc create mode 100644 src/core/ext/filters/client_channel/method_params.h delete mode 100644 src/core/lib/security/transport/lb_targets_info.cc delete mode 100644 src/core/lib/security/transport/lb_targets_info.h create mode 100644 src/core/lib/security/transport/target_authority_table.cc create mode 100644 src/core/lib/security/transport/target_authority_table.h delete mode 100644 src/core/lib/slice/slice_hash_table.cc (limited to 'src/core/ext') diff --git a/BUILD b/BUILD index b780e89468..34225437cf 100644 --- a/BUILD +++ b/BUILD @@ -779,7 +779,6 @@ grpc_cc_library( "src/core/lib/slice/percent_encoding.cc", "src/core/lib/slice/slice.cc", "src/core/lib/slice/slice_buffer.cc", - "src/core/lib/slice/slice_hash_table.cc", "src/core/lib/slice/slice_intern.cc", "src/core/lib/slice/slice_string_helpers.cc", "src/core/lib/surface/api_trace.cc", @@ -945,6 +944,9 @@ grpc_cc_library( "gpr_base", "grpc_codegen", "grpc_trace", + "ref_counted", + "ref_counted_ptr", + "inlined_vector", ], ) @@ -999,6 +1001,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy.cc", "src/core/ext/filters/client_channel/lb_policy_factory.cc", "src/core/ext/filters/client_channel/lb_policy_registry.cc", + "src/core/ext/filters/client_channel/method_params.cc", "src/core/ext/filters/client_channel/parse_address.cc", "src/core/ext/filters/client_channel/proxy_mapper.cc", "src/core/ext/filters/client_channel/proxy_mapper_registry.cc", @@ -1019,6 +1022,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy.h", "src/core/ext/filters/client_channel/lb_policy_factory.h", "src/core/ext/filters/client_channel/lb_policy_registry.h", + "src/core/ext/filters/client_channel/method_params.h", "src/core/ext/filters/client_channel/parse_address.h", "src/core/ext/filters/client_channel/proxy_mapper.h", "src/core/ext/filters/client_channel/proxy_mapper_registry.h", @@ -1328,10 +1332,10 @@ grpc_cc_library( "src/core/lib/security/credentials/ssl/ssl_credentials.cc", "src/core/lib/security/security_connector/security_connector.cc", "src/core/lib/security/transport/client_auth_filter.cc", - "src/core/lib/security/transport/lb_targets_info.cc", "src/core/lib/security/transport/secure_endpoint.cc", "src/core/lib/security/transport/security_handshaker.cc", "src/core/lib/security/transport/server_auth_filter.cc", + "src/core/lib/security/transport/target_authority_table.cc", "src/core/lib/security/transport/tsi_error.cc", "src/core/lib/security/util/json_util.cc", "src/core/lib/surface/init_secure.cc", @@ -1351,9 +1355,9 @@ grpc_cc_library( "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_handshaker.h", + "src/core/lib/security/transport/target_authority_table.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/json_util.h", ], diff --git a/CMakeLists.txt b/CMakeLists.txt index 25a965a952..3b0f593f30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,7 +344,6 @@ add_dependencies(buildtests_c sequential_connectivity_test) add_dependencies(buildtests_c server_chttp2_test) add_dependencies(buildtests_c server_test) add_dependencies(buildtests_c slice_buffer_test) -add_dependencies(buildtests_c slice_hash_table_test) add_dependencies(buildtests_c slice_string_helpers_test) add_dependencies(buildtests_c slice_test) add_dependencies(buildtests_c sockaddr_resolver_test) @@ -594,6 +593,7 @@ add_dependencies(buildtests_cxx server_crash_test_client) add_dependencies(buildtests_cxx server_early_return_test) add_dependencies(buildtests_cxx server_request_call_test) add_dependencies(buildtests_cxx shutdown_test) +add_dependencies(buildtests_cxx slice_hash_table_test) add_dependencies(buildtests_cxx stats_test) add_dependencies(buildtests_cxx status_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) @@ -881,7 +881,6 @@ add_library(grpc src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -961,10 +960,10 @@ add_library(grpc src/core/lib/security/credentials/ssl/ssl_credentials.cc src/core/lib/security/security_connector/security_connector.cc src/core/lib/security/transport/client_auth_filter.cc - src/core/lib/security/transport/lb_targets_info.cc src/core/lib/security/transport/secure_endpoint.cc src/core/lib/security/transport/security_handshaker.cc src/core/lib/security/transport/server_auth_filter.cc + src/core/lib/security/transport/target_authority_table.cc src/core/lib/security/transport/tsi_error.cc src/core/lib/security/util/json_util.cc src/core/lib/surface/init_secure.cc @@ -987,6 +986,7 @@ add_library(grpc src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -1221,7 +1221,6 @@ add_library(grpc_cronet src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -1298,6 +1297,7 @@ add_library(grpc_cronet src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -1325,10 +1325,10 @@ add_library(grpc_cronet src/core/lib/security/credentials/ssl/ssl_credentials.cc src/core/lib/security/security_connector/security_connector.cc src/core/lib/security/transport/client_auth_filter.cc - src/core/lib/security/transport/lb_targets_info.cc src/core/lib/security/transport/secure_endpoint.cc src/core/lib/security/transport/security_handshaker.cc src/core/lib/security/transport/server_auth_filter.cc + src/core/lib/security/transport/target_authority_table.cc src/core/lib/security/transport/tsi_error.cc src/core/lib/security/util/json_util.cc src/core/lib/surface/init_secure.cc @@ -1547,7 +1547,6 @@ add_library(grpc_test_util src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -1593,6 +1592,7 @@ add_library(grpc_test_util src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -1834,7 +1834,6 @@ add_library(grpc_test_util_unsecure src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -1880,6 +1879,7 @@ add_library(grpc_test_util_unsecure src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -2101,7 +2101,6 @@ add_library(grpc_unsecure src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -2180,6 +2179,7 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -2900,7 +2900,6 @@ add_library(grpc++_cronet src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_hash_table.cc src/core/lib/slice/slice_intern.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/surface/api_trace.cc @@ -2951,6 +2950,7 @@ add_library(grpc++_cronet src/core/ext/filters/client_channel/lb_policy.cc src/core/ext/filters/client_channel/lb_policy_factory.cc src/core/ext/filters/client_channel/lb_policy_registry.cc + src/core/ext/filters/client_channel/method_params.cc src/core/ext/filters/client_channel/parse_address.cc src/core/ext/filters/client_channel/proxy_mapper.cc src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -7880,33 +7880,6 @@ target_link_libraries(slice_buffer_test endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) -add_executable(slice_hash_table_test - test/core/slice/slice_hash_table_test.cc -) - - -target_include_directories(slice_hash_table_test - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${_gRPC_SSL_INCLUDE_DIR} - PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} - PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} - PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} - PRIVATE ${_gRPC_CARES_INCLUDE_DIR} - PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} -) - -target_link_libraries(slice_hash_table_test - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util - grpc - gpr_test_util - gpr -) - -endif (gRPC_BUILD_TESTS) -if (gRPC_BUILD_TESTS) - add_executable(slice_string_helpers_test test/core/slice/slice_string_helpers_test.cc ) @@ -12104,6 +12077,42 @@ target_link_libraries(shutdown_test endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(slice_hash_table_test + test/core/slice/slice_hash_table_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + + +target_include_directories(slice_hash_table_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(slice_hash_table_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util + grpc + gpr_test_util + gpr + ${_gRPC_GFLAGS_LIBRARIES} +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(stats_test test/core/debug/stats_test.cc third_party/googletest/googletest/src/gtest-all.cc diff --git a/Makefile b/Makefile index df3e3c5149..6149c2740d 100644 --- a/Makefile +++ b/Makefile @@ -1067,7 +1067,6 @@ server_chttp2_test: $(BINDIR)/$(CONFIG)/server_chttp2_test server_fuzzer: $(BINDIR)/$(CONFIG)/server_fuzzer server_test: $(BINDIR)/$(CONFIG)/server_test slice_buffer_test: $(BINDIR)/$(CONFIG)/slice_buffer_test -slice_hash_table_test: $(BINDIR)/$(CONFIG)/slice_hash_table_test slice_string_helpers_test: $(BINDIR)/$(CONFIG)/slice_string_helpers_test slice_test: $(BINDIR)/$(CONFIG)/slice_test sockaddr_resolver_test: $(BINDIR)/$(CONFIG)/sockaddr_resolver_test @@ -1181,6 +1180,7 @@ server_crash_test_client: $(BINDIR)/$(CONFIG)/server_crash_test_client server_early_return_test: $(BINDIR)/$(CONFIG)/server_early_return_test server_request_call_test: $(BINDIR)/$(CONFIG)/server_request_call_test shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test +slice_hash_table_test: $(BINDIR)/$(CONFIG)/slice_hash_table_test stats_test: $(BINDIR)/$(CONFIG)/stats_test status_test: $(BINDIR)/$(CONFIG)/status_test streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test @@ -1469,7 +1469,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/server_chttp2_test \ $(BINDIR)/$(CONFIG)/server_test \ $(BINDIR)/$(CONFIG)/slice_buffer_test \ - $(BINDIR)/$(CONFIG)/slice_hash_table_test \ $(BINDIR)/$(CONFIG)/slice_string_helpers_test \ $(BINDIR)/$(CONFIG)/slice_test \ $(BINDIR)/$(CONFIG)/sockaddr_resolver_test \ @@ -1639,6 +1638,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/server_early_return_test \ $(BINDIR)/$(CONFIG)/server_request_call_test \ $(BINDIR)/$(CONFIG)/shutdown_test \ + $(BINDIR)/$(CONFIG)/slice_hash_table_test \ $(BINDIR)/$(CONFIG)/stats_test \ $(BINDIR)/$(CONFIG)/status_test \ $(BINDIR)/$(CONFIG)/streaming_throughput_test \ @@ -1783,6 +1783,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/server_early_return_test \ $(BINDIR)/$(CONFIG)/server_request_call_test \ $(BINDIR)/$(CONFIG)/shutdown_test \ + $(BINDIR)/$(CONFIG)/slice_hash_table_test \ $(BINDIR)/$(CONFIG)/stats_test \ $(BINDIR)/$(CONFIG)/status_test \ $(BINDIR)/$(CONFIG)/streaming_throughput_test \ @@ -1994,8 +1995,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/server_test || ( echo test server_test failed ; exit 1 ) $(E) "[RUN] Testing slice_buffer_test" $(Q) $(BINDIR)/$(CONFIG)/slice_buffer_test || ( echo test slice_buffer_test failed ; exit 1 ) - $(E) "[RUN] Testing slice_hash_table_test" - $(Q) $(BINDIR)/$(CONFIG)/slice_hash_table_test || ( echo test slice_hash_table_test failed ; exit 1 ) $(E) "[RUN] Testing slice_string_helpers_test" $(Q) $(BINDIR)/$(CONFIG)/slice_string_helpers_test || ( echo test slice_string_helpers_test failed ; exit 1 ) $(E) "[RUN] Testing slice_test" @@ -2208,6 +2207,8 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/server_request_call_test || ( echo test server_request_call_test failed ; exit 1 ) $(E) "[RUN] Testing shutdown_test" $(Q) $(BINDIR)/$(CONFIG)/shutdown_test || ( echo test shutdown_test failed ; exit 1 ) + $(E) "[RUN] Testing slice_hash_table_test" + $(Q) $(BINDIR)/$(CONFIG)/slice_hash_table_test || ( echo test slice_hash_table_test failed ; exit 1 ) $(E) "[RUN] Testing stats_test" $(Q) $(BINDIR)/$(CONFIG)/stats_test || ( echo test stats_test failed ; exit 1 ) $(E) "[RUN] Testing status_test" @@ -3115,7 +3116,6 @@ LIBGRPC_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -3195,10 +3195,10 @@ LIBGRPC_SRC = \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ - src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ + src/core/lib/security/transport/target_authority_table.cc \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/util/json_util.cc \ src/core/lib/surface/init_secure.cc \ @@ -3221,6 +3221,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -3457,7 +3458,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -3534,6 +3534,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -3561,10 +3562,10 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/security/credentials/ssl/ssl_credentials.cc \ src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ - src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ + src/core/lib/security/transport/target_authority_table.cc \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/util/json_util.cc \ src/core/lib/surface/init_secure.cc \ @@ -3784,7 +3785,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -3830,6 +3830,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -4064,7 +4065,6 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -4110,6 +4110,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -4311,7 +4312,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -4390,6 +4390,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -5111,7 +5112,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -5162,6 +5162,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ @@ -13306,38 +13307,6 @@ endif endif -SLICE_HASH_TABLE_TEST_SRC = \ - test/core/slice/slice_hash_table_test.cc \ - -SLICE_HASH_TABLE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SLICE_HASH_TABLE_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/slice_hash_table_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/slice_hash_table_test: $(SLICE_HASH_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SLICE_HASH_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_hash_table_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/slice/slice_hash_table_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_slice_hash_table_test: $(SLICE_HASH_TABLE_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(SLICE_HASH_TABLE_TEST_OBJS:.o=.dep) -endif -endif - - SLICE_STRING_HELPERS_TEST_SRC = \ test/core/slice/slice_string_helpers_test.cc \ @@ -17910,6 +17879,49 @@ endif endif +SLICE_HASH_TABLE_TEST_SRC = \ + test/core/slice/slice_hash_table_test.cc \ + +SLICE_HASH_TABLE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SLICE_HASH_TABLE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/slice_hash_table_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/slice_hash_table_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/slice_hash_table_test: $(PROTOBUF_DEP) $(SLICE_HASH_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(SLICE_HASH_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/slice_hash_table_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/core/slice/slice_hash_table_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_slice_hash_table_test: $(SLICE_HASH_TABLE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SLICE_HASH_TABLE_TEST_OBJS:.o=.dep) +endif +endif + + STATS_TEST_SRC = \ test/core/debug/stats_test.cc \ @@ -22221,10 +22233,10 @@ src/core/lib/security/credentials/plugin/plugin_credentials.cc: $(OPENSSL_DEP) src/core/lib/security/credentials/ssl/ssl_credentials.cc: $(OPENSSL_DEP) src/core/lib/security/security_connector/security_connector.cc: $(OPENSSL_DEP) src/core/lib/security/transport/client_auth_filter.cc: $(OPENSSL_DEP) -src/core/lib/security/transport/lb_targets_info.cc: $(OPENSSL_DEP) src/core/lib/security/transport/secure_endpoint.cc: $(OPENSSL_DEP) src/core/lib/security/transport/security_handshaker.cc: $(OPENSSL_DEP) src/core/lib/security/transport/server_auth_filter.cc: $(OPENSSL_DEP) +src/core/lib/security/transport/target_authority_table.cc: $(OPENSSL_DEP) src/core/lib/security/transport/tsi_error.cc: $(OPENSSL_DEP) src/core/lib/security/util/json_util.cc: $(OPENSSL_DEP) src/core/lib/surface/init_secure.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index a4bd8ec670..6c955676fe 100644 --- a/build.yaml +++ b/build.yaml @@ -250,7 +250,6 @@ filegroups: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_buffer.cc - - src/core/lib/slice/slice_hash_table.cc - src/core/lib/slice/slice_intern.cc - src/core/lib/slice/slice_string_helpers.cc - src/core/lib/surface/api_trace.cc @@ -447,6 +446,7 @@ filegroups: - src/core/ext/filters/client_channel/lb_policy.h - src/core/ext/filters/client_channel/lb_policy_factory.h - src/core/ext/filters/client_channel/lb_policy_registry.h + - src/core/ext/filters/client_channel/method_params.h - src/core/ext/filters/client_channel/parse_address.h - src/core/ext/filters/client_channel/proxy_mapper.h - src/core/ext/filters/client_channel/proxy_mapper_registry.h @@ -469,6 +469,7 @@ filegroups: - src/core/ext/filters/client_channel/lb_policy.cc - src/core/ext/filters/client_channel/lb_policy_factory.cc - src/core/ext/filters/client_channel/lb_policy_registry.cc + - src/core/ext/filters/client_channel/method_params.cc - src/core/ext/filters/client_channel/parse_address.cc - src/core/ext/filters/client_channel/proxy_mapper.cc - src/core/ext/filters/client_channel/proxy_mapper_registry.cc @@ -650,9 +651,9 @@ filegroups: - src/core/lib/security/credentials/ssl/ssl_credentials.h - src/core/lib/security/security_connector/security_connector.h - src/core/lib/security/transport/auth_filters.h - - src/core/lib/security/transport/lb_targets_info.h - src/core/lib/security/transport/secure_endpoint.h - src/core/lib/security/transport/security_handshaker.h + - src/core/lib/security/transport/target_authority_table.h - src/core/lib/security/transport/tsi_error.h - src/core/lib/security/util/json_util.h src: @@ -673,10 +674,10 @@ filegroups: - src/core/lib/security/credentials/ssl/ssl_credentials.cc - src/core/lib/security/security_connector/security_connector.cc - src/core/lib/security/transport/client_auth_filter.cc - - src/core/lib/security/transport/lb_targets_info.cc - src/core/lib/security/transport/secure_endpoint.cc - src/core/lib/security/transport/security_handshaker.cc - src/core/lib/security/transport/server_auth_filter.cc + - src/core/lib/security/transport/target_authority_table.cc - src/core/lib/security/transport/tsi_error.cc - src/core/lib/security/util/json_util.cc - src/core/lib/surface/init_secure.cc @@ -3147,17 +3148,6 @@ targets: - gpr_test_util - gpr uses_polling: false -- name: slice_hash_table_test - build: test - language: c - src: - - test/core/slice/slice_hash_table_test.cc - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - uses_polling: false - name: slice_string_helpers_test build: test language: c @@ -4827,6 +4817,18 @@ targets: - grpc - gpr_test_util - gpr +- name: slice_hash_table_test + gtest: true + build: test + language: c++ + src: + - test/core/slice/slice_hash_table_test.cc + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + uses_polling: false - name: stats_test gtest: true build: test diff --git a/config.m4 b/config.m4 index d95e6dbe3d..2b7ed1c68c 100644 --- a/config.m4 +++ b/config.m4 @@ -180,7 +180,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ - src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_string_helpers.cc \ src/core/lib/surface/api_trace.cc \ @@ -260,10 +259,10 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/credentials/ssl/ssl_credentials.cc \ src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/transport/client_auth_filter.cc \ - src/core/lib/security/transport/lb_targets_info.cc \ src/core/lib/security/transport/secure_endpoint.cc \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/server_auth_filter.cc \ + src/core/lib/security/transport/target_authority_table.cc \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/util/json_util.cc \ src/core/lib/surface/init_secure.cc \ @@ -286,6 +285,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/lb_policy.cc \ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ + src/core/ext/filters/client_channel/method_params.cc \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/proxy_mapper.cc \ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \ diff --git a/config.w32 b/config.w32 index 06b0c60b81..2f4e9b7e7e 100644 --- a/config.w32 +++ b/config.w32 @@ -157,7 +157,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\slice\\percent_encoding.cc " + "src\\core\\lib\\slice\\slice.cc " + "src\\core\\lib\\slice\\slice_buffer.cc " + - "src\\core\\lib\\slice\\slice_hash_table.cc " + "src\\core\\lib\\slice\\slice_intern.cc " + "src\\core\\lib\\slice\\slice_string_helpers.cc " + "src\\core\\lib\\surface\\api_trace.cc " + @@ -237,10 +236,10 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\security\\credentials\\ssl\\ssl_credentials.cc " + "src\\core\\lib\\security\\security_connector\\security_connector.cc " + "src\\core\\lib\\security\\transport\\client_auth_filter.cc " + - "src\\core\\lib\\security\\transport\\lb_targets_info.cc " + "src\\core\\lib\\security\\transport\\secure_endpoint.cc " + "src\\core\\lib\\security\\transport\\security_handshaker.cc " + "src\\core\\lib\\security\\transport\\server_auth_filter.cc " + + "src\\core\\lib\\security\\transport\\target_authority_table.cc " + "src\\core\\lib\\security\\transport\\tsi_error.cc " + "src\\core\\lib\\security\\util\\json_util.cc " + "src\\core\\lib\\surface\\init_secure.cc " + @@ -263,6 +262,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\lb_policy.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy_factory.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy_registry.cc " + + "src\\core\\ext\\filters\\client_channel\\method_params.cc " + "src\\core\\ext\\filters\\client_channel\\parse_address.cc " + "src\\core\\ext\\filters\\client_channel\\proxy_mapper.cc " + "src\\core\\ext\\filters\\client_channel\\proxy_mapper_registry.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index bbd0ff1d9e..737af98cac 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -273,9 +273,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/ssl/ssl_credentials.h', 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_handshaker.h', + 'src/core/lib/security/transport/target_authority_table.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', 'src/core/tsi/alts_transport_security.h', @@ -296,6 +296,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy.h', 'src/core/ext/filters/client_channel/lb_policy_factory.h', 'src/core/ext/filters/client_channel/lb_policy_registry.h', + 'src/core/ext/filters/client_channel/method_params.h', 'src/core/ext/filters/client_channel/parse_address.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index ed290b43c4..a7b9131423 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -285,9 +285,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/ssl/ssl_credentials.h', 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_handshaker.h', + 'src/core/lib/security/transport/target_authority_table.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', 'src/core/tsi/alts_transport_security.h', @@ -308,6 +308,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy.h', 'src/core/ext/filters/client_channel/lb_policy_factory.h', 'src/core/ext/filters/client_channel/lb_policy_registry.h', + 'src/core/ext/filters/client_channel/method_params.h', 'src/core/ext/filters/client_channel/parse_address.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', @@ -563,7 +564,6 @@ Pod::Spec.new do |s| 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -643,10 +643,10 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', - 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/target_authority_table.cc', 'src/core/lib/security/transport/tsi_error.cc', 'src/core/lib/security/util/json_util.cc', 'src/core/lib/surface/init_secure.cc', @@ -669,6 +669,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', @@ -773,9 +774,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/ssl/ssl_credentials.h', 'src/core/lib/security/security_connector/security_connector.h', 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/lb_targets_info.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_handshaker.h', + 'src/core/lib/security/transport/target_authority_table.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/json_util.h', 'src/core/tsi/alts_transport_security.h', @@ -796,6 +797,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy.h', 'src/core/ext/filters/client_channel/lb_policy_factory.h', 'src/core/ext/filters/client_channel/lb_policy_registry.h', + 'src/core/ext/filters/client_channel/method_params.h', 'src/core/ext/filters/client_channel/parse_address.h', 'src/core/ext/filters/client_channel/proxy_mapper.h', 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', diff --git a/grpc.gemspec b/grpc.gemspec index 3899d95864..490aceb97e 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -211,9 +211,9 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) s.files += %w( src/core/lib/security/security_connector/security_connector.h ) s.files += %w( src/core/lib/security/transport/auth_filters.h ) - s.files += %w( src/core/lib/security/transport/lb_targets_info.h ) s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) s.files += %w( src/core/lib/security/transport/security_handshaker.h ) + s.files += %w( src/core/lib/security/transport/target_authority_table.h ) s.files += %w( src/core/lib/security/transport/tsi_error.h ) s.files += %w( src/core/lib/security/util/json_util.h ) s.files += %w( src/core/tsi/alts_transport_security.h ) @@ -234,6 +234,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/lb_policy.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.h ) + s.files += %w( src/core/ext/filters/client_channel/method_params.h ) s.files += %w( src/core/ext/filters/client_channel/parse_address.h ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.h ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.h ) @@ -493,7 +494,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/slice/percent_encoding.cc ) s.files += %w( src/core/lib/slice/slice.cc ) s.files += %w( src/core/lib/slice/slice_buffer.cc ) - s.files += %w( src/core/lib/slice/slice_hash_table.cc ) s.files += %w( src/core/lib/slice/slice_intern.cc ) s.files += %w( src/core/lib/slice/slice_string_helpers.cc ) s.files += %w( src/core/lib/surface/api_trace.cc ) @@ -573,10 +573,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.cc ) s.files += %w( src/core/lib/security/security_connector/security_connector.cc ) s.files += %w( src/core/lib/security/transport/client_auth_filter.cc ) - s.files += %w( src/core/lib/security/transport/lb_targets_info.cc ) s.files += %w( src/core/lib/security/transport/secure_endpoint.cc ) s.files += %w( src/core/lib/security/transport/security_handshaker.cc ) s.files += %w( src/core/lib/security/transport/server_auth_filter.cc ) + s.files += %w( src/core/lib/security/transport/target_authority_table.cc ) s.files += %w( src/core/lib/security/transport/tsi_error.cc ) s.files += %w( src/core/lib/security/util/json_util.cc ) s.files += %w( src/core/lib/surface/init_secure.cc ) @@ -599,6 +599,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/lb_policy.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.cc ) + s.files += %w( src/core/ext/filters/client_channel/method_params.cc ) s.files += %w( src/core/ext/filters/client_channel/parse_address.cc ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.cc ) s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.cc ) diff --git a/grpc.gyp b/grpc.gyp index c9390d306e..abebf995fd 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -321,7 +321,6 @@ 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -401,10 +400,10 @@ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', - 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/target_authority_table.cc', 'src/core/lib/security/transport/tsi_error.cc', 'src/core/lib/security/util/json_util.cc', 'src/core/lib/surface/init_secure.cc', @@ -427,6 +426,7 @@ 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', @@ -618,7 +618,6 @@ 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -664,6 +663,7 @@ 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', @@ -833,7 +833,6 @@ 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -879,6 +878,7 @@ 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', @@ -1027,7 +1027,6 @@ 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -1106,6 +1105,7 @@ 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', diff --git a/package.xml b/package.xml index 814de91fa7..705b91a2cd 100644 --- a/package.xml +++ b/package.xml @@ -218,9 +218,9 @@ - + @@ -241,6 +241,7 @@ + @@ -500,7 +501,6 @@ - @@ -580,10 +580,10 @@ - + @@ -606,6 +606,7 @@ + diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 9a8f25b630..bfb064bc88 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -33,6 +33,7 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" +#include "src/core/ext/filters/client_channel/method_params.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" @@ -53,114 +54,21 @@ #include "src/core/lib/transport/service_config.h" #include "src/core/lib/transport/static_metadata.h" +using grpc_core::internal::ClientChannelMethodParams; + /* Client channel implementation */ grpc_core::TraceFlag grpc_client_channel_trace(false, "client_channel"); /************************************************************************* - * METHOD-CONFIG TABLE + * CHANNEL-WIDE FUNCTIONS */ -typedef enum { - /* zero so it can be default initialized */ - WAIT_FOR_READY_UNSET = 0, - WAIT_FOR_READY_FALSE, - WAIT_FOR_READY_TRUE -} wait_for_ready_value; - -typedef struct { - gpr_refcount refs; - grpc_millis timeout; - wait_for_ready_value wait_for_ready; -} method_parameters; - -static method_parameters* method_parameters_ref( - method_parameters* method_params) { - gpr_ref(&method_params->refs); - return method_params; -} - -static void method_parameters_unref(method_parameters* method_params) { - if (gpr_unref(&method_params->refs)) { - gpr_free(method_params); - } -} - -// Wrappers to pass to grpc_service_config_create_method_config_table(). -static void* method_parameters_ref_wrapper(void* value) { - return method_parameters_ref(static_cast(value)); -} -static void method_parameters_unref_wrapper(void* value) { - method_parameters_unref(static_cast(value)); -} - -static bool parse_wait_for_ready(grpc_json* field, - wait_for_ready_value* wait_for_ready) { - if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { - return false; - } - *wait_for_ready = field->type == GRPC_JSON_TRUE ? WAIT_FOR_READY_TRUE - : WAIT_FOR_READY_FALSE; - return true; -} - -static bool parse_timeout(grpc_json* field, grpc_millis* timeout) { - if (field->type != GRPC_JSON_STRING) return false; - size_t len = strlen(field->value); - if (field->value[len - 1] != 's') return false; - char* buf = gpr_strdup(field->value); - buf[len - 1] = '\0'; // Remove trailing 's'. - char* decimal_point = strchr(buf, '.'); - int nanos = 0; - if (decimal_point != nullptr) { - *decimal_point = '\0'; - nanos = gpr_parse_nonnegative_int(decimal_point + 1); - if (nanos == -1) { - gpr_free(buf); - return false; - } - int num_digits = static_cast(strlen(decimal_point + 1)); - if (num_digits > 9) { // We don't accept greater precision than nanos. - gpr_free(buf); - return false; - } - for (int i = 0; i < (9 - num_digits); ++i) { - nanos *= 10; - } - } - int seconds = decimal_point == buf ? 0 : gpr_parse_nonnegative_int(buf); - gpr_free(buf); - if (seconds == -1) return false; - *timeout = seconds * GPR_MS_PER_SEC + nanos / GPR_NS_PER_MS; - return true; -} - -static void* method_parameters_create_from_json(const grpc_json* json) { - wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET; - grpc_millis timeout = 0; - for (grpc_json* field = json->child; field != nullptr; field = field->next) { - if (field->key == nullptr) continue; - if (strcmp(field->key, "waitForReady") == 0) { - if (wait_for_ready != WAIT_FOR_READY_UNSET) return nullptr; // Duplicate. - if (!parse_wait_for_ready(field, &wait_for_ready)) return nullptr; - } else if (strcmp(field->key, "timeout") == 0) { - if (timeout > 0) return nullptr; // Duplicate. - if (!parse_timeout(field, &timeout)) return nullptr; - } - } - method_parameters* value = - static_cast(gpr_malloc(sizeof(method_parameters))); - gpr_ref_init(&value->refs, 1); - value->timeout = timeout; - value->wait_for_ready = wait_for_ready; - return value; -} - struct external_connectivity_watcher; -/************************************************************************* - * CHANNEL-WIDE FUNCTIONS - */ +typedef grpc_core::SliceHashTable< + grpc_core::RefCountedPtr> + MethodParamsTable; typedef struct client_channel_channel_data { /** resolver for this channel */ @@ -179,7 +87,7 @@ typedef struct client_channel_channel_data { /** retry throttle data */ grpc_server_retry_throttle_data* retry_throttle_data; /** maps method names to method_parameters structs */ - grpc_slice_hash_table* method_params_table; + grpc_core::RefCountedPtr method_params_table; /** incoming resolver result - set by resolver.next() */ grpc_channel_args* resolver_result; /** a list of closures that are all waiting for resolver result to come in */ @@ -306,9 +214,8 @@ typedef struct { grpc_server_retry_throttle_data* retry_throttle_data; } service_config_parsing_state; -static void parse_retry_throttle_params(const grpc_json* field, void* arg) { - service_config_parsing_state* parsing_state = - static_cast(arg); +static void parse_retry_throttle_params( + const grpc_json* field, service_config_parsing_state* parsing_state) { if (strcmp(field->key, "retryThrottling") == 0) { if (parsing_state->retry_throttle_data != nullptr) return; // Duplicate. if (field->type != GRPC_JSON_OBJECT) return; @@ -396,7 +303,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { grpc_core::OrphanablePtr new_lb_policy; char* service_config_json = nullptr; grpc_server_retry_throttle_data* retry_throttle_data = nullptr; - grpc_slice_hash_table* method_params_table = nullptr; + grpc_core::RefCountedPtr method_params_table; if (chand->resolver_result != nullptr) { if (chand->resolver != nullptr) { // Find LB policy name. @@ -475,8 +382,8 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { service_config_json = gpr_strdup(grpc_channel_arg_get_string(channel_arg)); if (service_config_json != nullptr) { - grpc_service_config* service_config = - grpc_service_config_create(service_config_json); + grpc_core::UniquePtr service_config = + grpc_core::ServiceConfig::Create(service_config_json); if (service_config != nullptr) { channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVER_URI); @@ -488,14 +395,12 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { memset(&parsing_state, 0, sizeof(parsing_state)); parsing_state.server_name = uri->path[0] == '/' ? uri->path + 1 : uri->path; - grpc_service_config_parse_global_params( - service_config, parse_retry_throttle_params, &parsing_state); + service_config->ParseGlobalParams(parse_retry_throttle_params, + &parsing_state); grpc_uri_destroy(uri); retry_throttle_data = parsing_state.retry_throttle_data; - method_params_table = grpc_service_config_create_method_config_table( - service_config, method_parameters_create_from_json, - method_parameters_ref_wrapper, method_parameters_unref_wrapper); - grpc_service_config_destroy(service_config); + method_params_table = service_config->CreateMethodConfigTable( + ClientChannelMethodParams::CreateFromJson); } } // Before we clean up, save a copy of lb_policy_name, since it might @@ -534,10 +439,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { } chand->retry_throttle_data = retry_throttle_data; // Swap out the method params table. - if (chand->method_params_table != nullptr) { - grpc_slice_hash_table_unref(chand->method_params_table); - } - chand->method_params_table = method_params_table; + chand->method_params_table = std::move(method_params_table); // If we have a new LB policy or are shutting down (in which case // new_lb_policy will be NULL), swap out the LB policy, unreffing the old one // and removing its fds from chand->interested_parties. Note that we do NOT do @@ -794,7 +696,7 @@ static void cc_destroy_channel_elem(grpc_channel_element* elem) { grpc_server_retry_throttle_data_unref(chand->retry_throttle_data); } if (chand->method_params_table != nullptr) { - grpc_slice_hash_table_unref(chand->method_params_table); + chand->method_params_table.reset(); } grpc_client_channel_stop_backup_polling(chand->interested_parties); grpc_connectivity_state_destroy(&chand->state_tracker); @@ -841,7 +743,7 @@ typedef struct client_channel_call_data { grpc_call_combiner* call_combiner; grpc_server_retry_throttle_data* retry_throttle_data; - method_parameters* method_params; + grpc_core::RefCountedPtr method_params; grpc_subchannel_call* subchannel_call; grpc_error* error; @@ -970,17 +872,16 @@ static void apply_service_config_to_call_locked(grpc_call_element* elem) { grpc_server_retry_throttle_data_ref(chand->retry_throttle_data); } if (chand->method_params_table != nullptr) { - calld->method_params = static_cast( - grpc_method_config_table_get(chand->method_params_table, calld->path)); + calld->method_params = grpc_core::ServiceConfig::MethodConfigTableLookup( + *chand->method_params_table, calld->path); if (calld->method_params != nullptr) { - method_parameters_ref(calld->method_params); // If the deadline from the service config is shorter than the one // from the client API, reset the deadline timer. if (chand->deadline_checking_enabled && - calld->method_params->timeout != 0) { + calld->method_params->timeout() != 0) { const grpc_millis per_method_deadline = grpc_timespec_to_millis_round_up(calld->call_start_time) + - calld->method_params->timeout; + calld->method_params->timeout(); if (per_method_deadline < calld->deadline) { calld->deadline = per_method_deadline; grpc_deadline_state_reset(elem, calld->deadline); @@ -1109,9 +1010,11 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET; const bool wait_for_ready_set_from_service_config = calld->method_params != nullptr && - calld->method_params->wait_for_ready != WAIT_FOR_READY_UNSET; + calld->method_params->wait_for_ready() != + ClientChannelMethodParams::WAIT_FOR_READY_UNSET; if (!wait_for_ready_set_from_api && wait_for_ready_set_from_service_config) { - if (calld->method_params->wait_for_ready == WAIT_FOR_READY_TRUE) { + if (calld->method_params->wait_for_ready() == + ClientChannelMethodParams::WAIT_FOR_READY_TRUE) { initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; } else { initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; @@ -1441,9 +1344,7 @@ static void cc_destroy_call_elem(grpc_call_element* elem, grpc_deadline_state_destroy(elem); } grpc_slice_unref_internal(calld->path); - if (calld->method_params != nullptr) { - method_parameters_unref(calld->method_params); - } + calld->method_params.reset(); GRPC_ERROR_UNREF(calld->error); if (calld->subchannel_call != nullptr) { grpc_subchannel_call_set_cleanup_closure(calld->subchannel_call, diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc index 7abd7f37f9..441efd5e23 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc @@ -30,47 +30,41 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/lb_targets_info.h" +#include "src/core/lib/security/transport/target_authority_table.h" #include "src/core/lib/slice/slice_internal.h" -static void destroy_balancer_name(void* balancer_name) { - gpr_free(balancer_name); -} - -static grpc_slice_hash_table_entry targets_info_entry_create( - const char* address, const char* balancer_name) { - grpc_slice_hash_table_entry entry; - entry.key = grpc_slice_from_copied_string(address); - entry.value = gpr_strdup(balancer_name); - return entry; -} +namespace grpc_core { +namespace { -static int balancer_name_cmp_fn(void* a, void* b) { - const char* a_str = static_cast(a); - const char* b_str = static_cast(b); - return strcmp(a_str, b_str); +int BalancerNameCmp(const grpc_core::UniquePtr& a, + const grpc_core::UniquePtr& b) { + return strcmp(a.get(), b.get()); } -static grpc_slice_hash_table* build_targets_info_table( +RefCountedPtr CreateTargetAuthorityTable( grpc_lb_addresses* addresses) { - grpc_slice_hash_table_entry* targets_info_entries = - static_cast( - gpr_zalloc(sizeof(*targets_info_entries) * addresses->num_addresses)); + TargetAuthorityTable::Entry* target_authority_entries = + static_cast(gpr_zalloc( + sizeof(*target_authority_entries) * addresses->num_addresses)); for (size_t i = 0; i < addresses->num_addresses; ++i) { char* addr_str; GPR_ASSERT(grpc_sockaddr_to_string( &addr_str, &addresses->addresses[i].address, true) > 0); - targets_info_entries[i] = targets_info_entry_create( - addr_str, addresses->addresses[i].balancer_name); + target_authority_entries[i].key = grpc_slice_from_copied_string(addr_str); + target_authority_entries[i].value.reset( + gpr_strdup(addresses->addresses[i].balancer_name)); gpr_free(addr_str); } - grpc_slice_hash_table* targets_info = grpc_slice_hash_table_create( - addresses->num_addresses, targets_info_entries, destroy_balancer_name, - balancer_name_cmp_fn); - gpr_free(targets_info_entries); - return targets_info; + RefCountedPtr target_authority_table = + TargetAuthorityTable::Create(addresses->num_addresses, + target_authority_entries, BalancerNameCmp); + gpr_free(target_authority_entries); + return target_authority_table; } +} // namespace +} // namespace grpc_core + grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( grpc_channel_args* args) { const char* args_to_remove[1]; @@ -83,9 +77,11 @@ grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( GPR_ASSERT(arg->type == GRPC_ARG_POINTER); grpc_lb_addresses* addresses = static_cast(arg->value.pointer.p); - grpc_slice_hash_table* targets_info = build_targets_info_table(addresses); + grpc_core::RefCountedPtr + target_authority_table = grpc_core::CreateTargetAuthorityTable(addresses); args_to_add[num_args_to_add++] = - grpc_lb_targets_info_create_channel_arg(targets_info); + grpc_core::CreateTargetAuthorityTableChannelArg( + target_authority_table.get()); // Substitute the channel credentials with a version without call // credentials: the load balancer is not necessarily trusted to handle // bearer token credentials. @@ -105,7 +101,6 @@ grpc_channel_args* grpc_lb_policy_grpclb_modify_lb_channel_args( args, args_to_remove, num_args_to_remove, args_to_add, num_args_to_add); // Clean up. grpc_channel_args_destroy(args); - grpc_slice_hash_table_unref(targets_info); if (creds_sans_call_creds != nullptr) { grpc_channel_credentials_unref(creds_sans_call_creds); } diff --git a/src/core/ext/filters/client_channel/method_params.cc b/src/core/ext/filters/client_channel/method_params.cc new file mode 100644 index 0000000000..72456160b1 --- /dev/null +++ b/src/core/ext/filters/client_channel/method_params.cc @@ -0,0 +1,103 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include +#include + +#include +#include +#include + +#include "src/core/ext/filters/client_channel/method_params.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gprpp/memory.h" + +namespace grpc_core { +namespace internal { + +namespace { + +bool ParseWaitForReady( + grpc_json* field, ClientChannelMethodParams::WaitForReady* wait_for_ready) { + if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { + return false; + } + *wait_for_ready = field->type == GRPC_JSON_TRUE + ? ClientChannelMethodParams::WAIT_FOR_READY_TRUE + : ClientChannelMethodParams::WAIT_FOR_READY_FALSE; + return true; +} + +// Parses a JSON field of the form generated for a google.proto.Duration +// proto message. +bool ParseDuration(grpc_json* field, grpc_millis* duration) { + if (field->type != GRPC_JSON_STRING) return false; + size_t len = strlen(field->value); + if (field->value[len - 1] != 's') return false; + UniquePtr buf(gpr_strdup(field->value)); + *(buf.get() + len - 1) = '\0'; // Remove trailing 's'. + char* decimal_point = strchr(buf.get(), '.'); + int nanos = 0; + if (decimal_point != nullptr) { + *decimal_point = '\0'; + nanos = gpr_parse_nonnegative_int(decimal_point + 1); + if (nanos == -1) { + return false; + } + int num_digits = (int)strlen(decimal_point + 1); + if (num_digits > 9) { // We don't accept greater precision than nanos. + return false; + } + for (int i = 0; i < (9 - num_digits); ++i) { + nanos *= 10; + } + } + int seconds = + decimal_point == buf.get() ? 0 : gpr_parse_nonnegative_int(buf.get()); + if (seconds == -1) return false; + *duration = seconds * GPR_MS_PER_SEC + nanos / GPR_NS_PER_MS; + return true; +} + +} // namespace + +RefCountedPtr +ClientChannelMethodParams::CreateFromJson(const grpc_json* json) { + RefCountedPtr method_params = + MakeRefCounted(); + for (grpc_json* field = json->child; field != nullptr; field = field->next) { + if (field->key == nullptr) continue; + if (strcmp(field->key, "waitForReady") == 0) { + if (method_params->wait_for_ready_ != WAIT_FOR_READY_UNSET) { + return nullptr; // Duplicate. + } + if (!ParseWaitForReady(field, &method_params->wait_for_ready_)) { + return nullptr; + } + } else if (strcmp(field->key, "timeout") == 0) { + if (method_params->timeout_ > 0) return nullptr; // Duplicate. + if (!ParseDuration(field, &method_params->timeout_)) return nullptr; + } + } + return method_params; +} + +} // namespace internal +} // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/method_params.h b/src/core/ext/filters/client_channel/method_params.h new file mode 100644 index 0000000000..b003d53eeb --- /dev/null +++ b/src/core/ext/filters/client_channel/method_params.h @@ -0,0 +1,63 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_METHOD_PARAMS_H +#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_METHOD_PARAMS_H + +#include + +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/iomgr/exec_ctx.h" // for grpc_millis +#include "src/core/lib/json/json.h" + +namespace grpc_core { +namespace internal { + +class ClientChannelMethodParams : public RefCounted { + public: + enum WaitForReady { + WAIT_FOR_READY_UNSET = 0, + WAIT_FOR_READY_FALSE, + WAIT_FOR_READY_TRUE + }; + + /// Creates a method_parameters object from \a json. + /// Intended for use with ServiceConfig::CreateMethodConfigTable(). + static RefCountedPtr CreateFromJson( + const grpc_json* json); + + grpc_millis timeout() const { return timeout_; } + WaitForReady wait_for_ready() const { return wait_for_ready_; } + + private: + // So New() can call our private ctor. + template + friend T* grpc_core::New(Args&&... args); + + ClientChannelMethodParams() {} + virtual ~ClientChannelMethodParams() {} + + grpc_millis timeout_ = 0; + WaitForReady wait_for_ready_ = WAIT_FOR_READY_UNSET; +}; + +} // namespace internal +} // namespace grpc_core + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_METHOD_PARAMS_H */ diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc index a24e8ff352..aa93e5d8de 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -295,7 +295,7 @@ void AresDnsResolver::OnResolvedLocked(void* arg, grpc_error* error) { size_t num_args_to_add = 0; new_args[num_args_to_add++] = grpc_lb_addresses_create_channel_arg(r->lb_addresses_); - grpc_service_config* service_config = nullptr; + grpc_core::UniquePtr service_config; char* service_config_string = nullptr; if (r->service_config_json_ != nullptr) { service_config_string = ChooseServiceConfig(r->service_config_json_); @@ -306,10 +306,11 @@ void AresDnsResolver::OnResolvedLocked(void* arg, grpc_error* error) { args_to_remove[num_args_to_remove++] = GRPC_ARG_SERVICE_CONFIG; new_args[num_args_to_add++] = grpc_channel_arg_string_create( (char*)GRPC_ARG_SERVICE_CONFIG, service_config_string); - service_config = grpc_service_config_create(service_config_string); + service_config = + grpc_core::ServiceConfig::Create(service_config_string); if (service_config != nullptr) { const char* lb_policy_name = - grpc_service_config_get_lb_policy_name(service_config); + service_config->GetLoadBalancingPolicyName(); if (lb_policy_name != nullptr) { args_to_remove[num_args_to_remove++] = GRPC_ARG_LB_POLICY_NAME; new_args[num_args_to_add++] = grpc_channel_arg_string_create( @@ -322,7 +323,6 @@ void AresDnsResolver::OnResolvedLocked(void* arg, grpc_error* error) { result = grpc_channel_args_copy_and_add_and_remove( r->channel_args_, args_to_remove, num_args_to_remove, new_args, num_args_to_add); - if (service_config != nullptr) grpc_service_config_destroy(service_config); gpr_free(service_config_string); grpc_lb_addresses_destroy(r->lb_addresses_); // Reset backoff state so that we start from the beginning when the diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 63a9e566d3..b1b14dde02 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -29,6 +29,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/gpr/string.h" +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/surface/channel_init.h" #include "src/core/lib/transport/service_config.h" @@ -37,27 +39,29 @@ typedef struct { int max_recv_size; } message_size_limits; -typedef struct { - gpr_refcount refs; - message_size_limits limits; -} refcounted_message_size_limits; +namespace grpc_core { +namespace { -static void* refcounted_message_size_limits_ref(void* value) { - refcounted_message_size_limits* limits = - static_cast(value); - gpr_ref(&limits->refs); - return value; -} +class MessageSizeLimits : public RefCounted { + public: + static RefCountedPtr CreateFromJson(const grpc_json* json); -static void refcounted_message_size_limits_unref(void* value) { - refcounted_message_size_limits* limits = - static_cast(value); - if (gpr_unref(&limits->refs)) { - gpr_free(value); + const message_size_limits& limits() const { return limits_; } + + private: + // So New() can call our private ctor. + template + friend T* grpc_core::New(Args&&... args); + + MessageSizeLimits(int max_send_size, int max_recv_size) { + limits_.max_send_size = max_send_size; + limits_.max_recv_size = max_recv_size; } -} -static void* refcounted_message_size_limits_create_from_json( + message_size_limits limits_; +}; + +RefCountedPtr MessageSizeLimits::CreateFromJson( const grpc_json* json) { int max_request_message_bytes = -1; int max_response_message_bytes = -1; @@ -79,16 +83,15 @@ static void* refcounted_message_size_limits_create_from_json( if (max_response_message_bytes == -1) return nullptr; } } - refcounted_message_size_limits* value = - static_cast( - gpr_malloc(sizeof(refcounted_message_size_limits))); - gpr_ref_init(&value->refs, 1); - value->limits.max_send_size = max_request_message_bytes; - value->limits.max_recv_size = max_response_message_bytes; - return value; + return MakeRefCounted(max_request_message_bytes, + max_response_message_bytes); } +} // namespace +} // namespace grpc_core + namespace { + struct call_data { grpc_call_combiner* call_combiner; message_size_limits limits; @@ -105,8 +108,11 @@ struct call_data { struct channel_data { message_size_limits limits; // Maps path names to refcounted_message_size_limits structs. - grpc_slice_hash_table* method_limit_table; + grpc_core::RefCountedPtr>> + method_limit_table; }; + } // namespace // Callback invoked when we receive a message. Here we check the max @@ -185,20 +191,19 @@ static grpc_error* init_call_elem(grpc_call_element* elem, // size to the receive limit. calld->limits = chand->limits; if (chand->method_limit_table != nullptr) { - refcounted_message_size_limits* limits = - static_cast( - grpc_method_config_table_get(chand->method_limit_table, - args->path)); + grpc_core::RefCountedPtr limits = + grpc_core::ServiceConfig::MethodConfigTableLookup( + *chand->method_limit_table, args->path); if (limits != nullptr) { - if (limits->limits.max_send_size >= 0 && - (limits->limits.max_send_size < calld->limits.max_send_size || + if (limits->limits().max_send_size >= 0 && + (limits->limits().max_send_size < calld->limits.max_send_size || calld->limits.max_send_size < 0)) { - calld->limits.max_send_size = limits->limits.max_send_size; + calld->limits.max_send_size = limits->limits().max_send_size; } - if (limits->limits.max_recv_size >= 0 && - (limits->limits.max_recv_size < calld->limits.max_recv_size || + if (limits->limits().max_recv_size >= 0 && + (limits->limits().max_recv_size < calld->limits.max_recv_size || calld->limits.max_recv_size < 0)) { - calld->limits.max_recv_size = limits->limits.max_recv_size; + calld->limits.max_recv_size = limits->limits().max_recv_size; } } } @@ -253,15 +258,11 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem, grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); const char* service_config_str = grpc_channel_arg_get_string(channel_arg); if (service_config_str != nullptr) { - grpc_service_config* service_config = - grpc_service_config_create(service_config_str); + grpc_core::UniquePtr service_config = + grpc_core::ServiceConfig::Create(service_config_str); if (service_config != nullptr) { - chand->method_limit_table = - grpc_service_config_create_method_config_table( - service_config, refcounted_message_size_limits_create_from_json, - refcounted_message_size_limits_ref, - refcounted_message_size_limits_unref); - grpc_service_config_destroy(service_config); + chand->method_limit_table = service_config->CreateMethodConfigTable( + grpc_core::MessageSizeLimits::CreateFromJson); } } return GRPC_ERROR_NONE; @@ -270,7 +271,7 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem, // Destructor for channel_data. static void destroy_channel_elem(grpc_channel_element* elem) { channel_data* chand = static_cast(elem->channel_data); - grpc_slice_hash_table_unref(chand->method_limit_table); + chand->method_limit_table.reset(); } const grpc_channel_filter grpc_message_size_filter = { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index dcfcd243a9..a82009ff69 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -30,10 +30,11 @@ #include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" -#include "src/core/lib/security/transport/lb_targets_info.h" +#include "src/core/lib/security/transport/target_authority_table.h" #include "src/core/lib/slice/slice_hash_table.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" @@ -73,11 +74,11 @@ static grpc_subchannel_args* get_secure_naming_subchannel_args( const char* server_uri_path; server_uri_path = server_uri->path[0] == '/' ? server_uri->path + 1 : server_uri->path; - const grpc_slice_hash_table* targets_info = - grpc_lb_targets_info_find_in_args(args->args); - char* target_name_to_check = nullptr; - if (targets_info != nullptr) { // LB channel - // Find the balancer name for the target. + const grpc_core::TargetAuthorityTable* target_authority_table = + grpc_core::FindTargetAuthorityTableInArgs(args->args); + grpc_core::UniquePtr authority; + if (target_authority_table != nullptr) { + // Find the authority for the target. const char* target_uri_str = grpc_get_subchannel_address_uri_arg(args->args); grpc_uri* target_uri = @@ -86,37 +87,33 @@ static grpc_subchannel_args* get_secure_naming_subchannel_args( if (target_uri->path[0] != '\0') { // "path" may be empty const grpc_slice key = grpc_slice_from_static_string( target_uri->path[0] == '/' ? target_uri->path + 1 : target_uri->path); - const char* value = static_cast( - grpc_slice_hash_table_get(targets_info, key)); - if (value != nullptr) target_name_to_check = gpr_strdup(value); + const grpc_core::UniquePtr* value = + target_authority_table->Get(key); + if (value != nullptr) authority.reset(gpr_strdup(value->get())); grpc_slice_unref_internal(key); } - if (target_name_to_check == nullptr) { - // If the target name to check hasn't already been set, fall back to using - // SERVER_URI - target_name_to_check = gpr_strdup(server_uri_path); - } grpc_uri_destroy(target_uri); - } else { // regular channel: the secure name is the original server URI. - target_name_to_check = gpr_strdup(server_uri_path); + } + // If the authority hasn't already been set (either because no target + // authority table was present or because the target was not present + // in the table), fall back to using the original server URI. + if (authority == nullptr) { + authority.reset(gpr_strdup(server_uri_path)); } grpc_uri_destroy(server_uri); - GPR_ASSERT(target_name_to_check != nullptr); grpc_channel_security_connector* subchannel_security_connector = nullptr; // Create the security connector using the credentials and target name. grpc_channel_args* new_args_from_connector = nullptr; const grpc_security_status security_status = grpc_channel_credentials_create_security_connector( - channel_credentials, target_name_to_check, args->args, + channel_credentials, authority.get(), args->args, &subchannel_security_connector, &new_args_from_connector); if (security_status != GRPC_SECURITY_OK) { gpr_log(GPR_ERROR, "Failed to create secure subchannel for secure name '%s'", - target_name_to_check); - gpr_free(target_name_to_check); + authority.get()); return nullptr; } - gpr_free(target_name_to_check); grpc_arg new_security_connector_arg = grpc_security_connector_to_arg(&subchannel_security_connector->base); diff --git a/src/core/lib/gprpp/orphanable.h b/src/core/lib/gprpp/orphanable.h index 9e9e7f015f..a5bc8d8efc 100644 --- a/src/core/lib/gprpp/orphanable.h +++ b/src/core/lib/gprpp/orphanable.h @@ -24,6 +24,7 @@ #include #include +#include #include #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/lib/gprpp/ref_counted.h index 02b115a40e..46bfaf7fb8 100644 --- a/src/core/lib/gprpp/ref_counted.h +++ b/src/core/lib/gprpp/ref_counted.h @@ -24,6 +24,8 @@ #include #include +#include + #include "src/core/lib/debug/trace.h" #include "src/core/lib/gprpp/abstract.h" #include "src/core/lib/gprpp/debug_location.h" diff --git a/src/core/lib/gprpp/ref_counted_ptr.h b/src/core/lib/gprpp/ref_counted_ptr.h index 72088e76ef..388e2ec410 100644 --- a/src/core/lib/gprpp/ref_counted_ptr.h +++ b/src/core/lib/gprpp/ref_counted_ptr.h @@ -33,6 +33,7 @@ template class RefCountedPtr { public: RefCountedPtr() {} + RefCountedPtr(std::nullptr_t) {} // If value is non-null, we take ownership of a ref to it. explicit RefCountedPtr(T* value) { value_ = value; } diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index b01fd6f769..a57c895374 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -39,9 +39,9 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" -#include "src/core/lib/security/transport/lb_targets_info.h" #include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/security/transport/security_handshaker.h" +#include "src/core/lib/security/transport/target_authority_table.h" #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security_adapter.h" @@ -514,7 +514,7 @@ grpc_channel_security_connector* grpc_fake_channel_security_connector_create( c->target = gpr_strdup(target); const char* expected_targets = grpc_fake_transport_get_expected_targets(args); c->expected_targets = gpr_strdup(expected_targets); - c->is_lb_channel = (grpc_lb_targets_info_find_in_args(args) != nullptr); + c->is_lb_channel = grpc_core::FindTargetAuthorityTableInArgs(args) != nullptr; return &c->base; } diff --git a/src/core/lib/security/transport/lb_targets_info.cc b/src/core/lib/security/transport/lb_targets_info.cc deleted file mode 100644 index 155a91e556..0000000000 --- a/src/core/lib/security/transport/lb_targets_info.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include - -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/transport/lb_targets_info.h" - -/* Channel arg key for the mapping of LB server addresses to their names for - * secure naming purposes. */ -#define GRPC_ARG_LB_SECURE_NAMING_MAP "grpc.lb_secure_naming_map" - -static void* targets_info_copy(void* p) { - return grpc_slice_hash_table_ref(static_cast(p)); -} -static void targets_info_destroy(void* p) { - grpc_slice_hash_table_unref(static_cast(p)); -} -static int targets_info_cmp(void* a, void* b) { - return grpc_slice_hash_table_cmp( - static_cast(a), - static_cast(b)); -} -static const grpc_arg_pointer_vtable server_to_balancer_names_vtable = { - targets_info_copy, targets_info_destroy, targets_info_cmp}; - -grpc_arg grpc_lb_targets_info_create_channel_arg( - grpc_slice_hash_table* targets_info) { - return grpc_channel_arg_pointer_create((char*)GRPC_ARG_LB_SECURE_NAMING_MAP, - targets_info, - &server_to_balancer_names_vtable); -} - -grpc_slice_hash_table* grpc_lb_targets_info_find_in_args( - const grpc_channel_args* args) { - const grpc_arg* targets_info_arg = - grpc_channel_args_find(args, GRPC_ARG_LB_SECURE_NAMING_MAP); - if (targets_info_arg != nullptr) { - GPR_ASSERT(targets_info_arg->type == GRPC_ARG_POINTER); - return static_cast( - targets_info_arg->value.pointer.p); - } - return nullptr; -} diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h deleted file mode 100644 index 7e816c5222..0000000000 --- a/src/core/lib/security/transport/lb_targets_info.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H -#define GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H - -#include - -#include "src/core/lib/slice/slice_hash_table.h" - -/** Return a channel argument containing \a targets_info. */ -grpc_arg grpc_lb_targets_info_create_channel_arg( - grpc_slice_hash_table* targets_info); - -/** Return the instance of targets info in \a args or NULL */ -grpc_slice_hash_table* grpc_lb_targets_info_find_in_args( - const grpc_channel_args* args); - -#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */ diff --git a/src/core/lib/security/transport/target_authority_table.cc b/src/core/lib/security/transport/target_authority_table.cc new file mode 100644 index 0000000000..1eeb557f6a --- /dev/null +++ b/src/core/lib/security/transport/target_authority_table.cc @@ -0,0 +1,75 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/security/transport/target_authority_table.h" + +// Channel arg key for the mapping of target addresses to their authorities. +#define GRPC_ARG_TARGET_AUTHORITY_TABLE "grpc.target_authority_table" + +namespace grpc_core { +namespace { + +void* target_authority_table_copy(void* p) { + TargetAuthorityTable* table = static_cast(p); + // TODO(roth): When channel_args are converted to C++, pass the + // RefCountedPtr<> directly instead of managing the ref manually. + table->Ref().release(); + return p; +} +void target_authority_table_destroy(void* p) { + TargetAuthorityTable* table = static_cast(p); + table->Unref(); +} +int target_authority_table_cmp(void* a, void* b) { + return TargetAuthorityTable::Cmp( + *static_cast(a), + *static_cast(b)); +} +const grpc_arg_pointer_vtable target_authority_table_arg_vtable = { + target_authority_table_copy, target_authority_table_destroy, + target_authority_table_cmp}; + +} // namespace + +grpc_arg CreateTargetAuthorityTableChannelArg(TargetAuthorityTable* table) { + return grpc_channel_arg_pointer_create((char*)GRPC_ARG_TARGET_AUTHORITY_TABLE, + table, + &target_authority_table_arg_vtable); +} + +TargetAuthorityTable* FindTargetAuthorityTableInArgs( + const grpc_channel_args* args) { + const grpc_arg* arg = + grpc_channel_args_find(args, GRPC_ARG_TARGET_AUTHORITY_TABLE); + if (arg != nullptr) { + if (arg->type == GRPC_ARG_POINTER) { + return static_cast(arg->value.pointer.p); + } else { + gpr_log(GPR_ERROR, "value of " GRPC_ARG_TARGET_AUTHORITY_TABLE + " channel arg was not pointer type; ignoring"); + } + } + return nullptr; +} + +} // namespace grpc_core diff --git a/src/core/lib/security/transport/target_authority_table.h b/src/core/lib/security/transport/target_authority_table.h new file mode 100644 index 0000000000..a2e7dc6ac2 --- /dev/null +++ b/src/core/lib/security/transport/target_authority_table.h @@ -0,0 +1,40 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_TARGET_AUTHORITY_TABLE_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_TARGET_AUTHORITY_TABLE_H + +#include + +#include "src/core/lib/slice/slice_hash_table.h" + +namespace grpc_core { + +/// A hash table mapping target addresses to authorities. +typedef SliceHashTable> TargetAuthorityTable; + +/// Returns a channel argument containing \a table. +grpc_arg CreateTargetAuthorityTableChannelArg(TargetAuthorityTable* table); + +/// Returns the target authority table from \a args or nullptr. +TargetAuthorityTable* FindTargetAuthorityTableInArgs( + const grpc_channel_args* args); + +} // namespace grpc_core + +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TARGET_AUTHORITY_TABLE_H */ diff --git a/src/core/lib/slice/slice_hash_table.cc b/src/core/lib/slice/slice_hash_table.cc deleted file mode 100644 index 9e32321636..0000000000 --- a/src/core/lib/slice/slice_hash_table.cc +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright 2016 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include - -#include "src/core/lib/slice/slice_hash_table.h" - -#include -#include - -#include -#include - -#include "src/core/lib/slice/slice_internal.h" -#include "src/core/lib/transport/metadata.h" - -struct grpc_slice_hash_table { - gpr_refcount refs; - void (*destroy_value)(void* value); - int (*value_cmp)(void* a, void* b); - size_t size; - size_t max_num_probes; - grpc_slice_hash_table_entry* entries; -}; - -static bool is_empty(grpc_slice_hash_table_entry* entry) { - return entry->value == nullptr; -} - -static void grpc_slice_hash_table_add(grpc_slice_hash_table* table, - grpc_slice key, void* value) { - GPR_ASSERT(value != nullptr); - const size_t hash = grpc_slice_hash(key); - for (size_t offset = 0; offset < table->size; ++offset) { - const size_t idx = (hash + offset) % table->size; - if (is_empty(&table->entries[idx])) { - table->entries[idx].key = key; - table->entries[idx].value = value; - // Keep track of the maximum number of probes needed, since this - // provides an upper bound for lookups. - if (offset > table->max_num_probes) table->max_num_probes = offset; - return; - } - } - GPR_ASSERT(false); // Table should never be full. -} - -grpc_slice_hash_table* grpc_slice_hash_table_create( - size_t num_entries, grpc_slice_hash_table_entry* entries, - void (*destroy_value)(void* value), int (*value_cmp)(void* a, void* b)) { - grpc_slice_hash_table* table = - static_cast(gpr_zalloc(sizeof(*table))); - gpr_ref_init(&table->refs, 1); - table->destroy_value = destroy_value; - table->value_cmp = value_cmp; - // Keep load factor low to improve performance of lookups. - table->size = num_entries * 2; - const size_t entry_size = sizeof(grpc_slice_hash_table_entry) * table->size; - table->entries = - static_cast(gpr_zalloc(entry_size)); - for (size_t i = 0; i < num_entries; ++i) { - grpc_slice_hash_table_entry* entry = &entries[i]; - grpc_slice_hash_table_add(table, entry->key, entry->value); - } - return table; -} - -grpc_slice_hash_table* grpc_slice_hash_table_ref(grpc_slice_hash_table* table) { - if (table != nullptr) gpr_ref(&table->refs); - return table; -} - -void grpc_slice_hash_table_unref(grpc_slice_hash_table* table) { - if (table != nullptr && gpr_unref(&table->refs)) { - for (size_t i = 0; i < table->size; ++i) { - grpc_slice_hash_table_entry* entry = &table->entries[i]; - if (!is_empty(entry)) { - grpc_slice_unref_internal(entry->key); - table->destroy_value(entry->value); - } - } - gpr_free(table->entries); - gpr_free(table); - } -} - -void* grpc_slice_hash_table_get(const grpc_slice_hash_table* table, - const grpc_slice key) { - const size_t hash = grpc_slice_hash(key); - // We cap the number of probes at the max number recorded when - // populating the table. - for (size_t offset = 0; offset <= table->max_num_probes; ++offset) { - const size_t idx = (hash + offset) % table->size; - if (is_empty(&table->entries[idx])) break; - if (grpc_slice_eq(table->entries[idx].key, key)) { - return table->entries[idx].value; - } - } - return nullptr; // Not found. -} - -static int pointer_cmp(void* a, void* b) { return GPR_ICMP(a, b); } -int grpc_slice_hash_table_cmp(const grpc_slice_hash_table* a, - const grpc_slice_hash_table* b) { - int (*const value_cmp_fn_a)(void* a, void* b) = - a->value_cmp != nullptr ? a->value_cmp : pointer_cmp; - int (*const value_cmp_fn_b)(void* a, void* b) = - b->value_cmp != nullptr ? b->value_cmp : pointer_cmp; - // Compare value_fns - const int value_fns_cmp = - GPR_ICMP((void*)value_cmp_fn_a, (void*)value_cmp_fn_b); - if (value_fns_cmp != 0) return value_fns_cmp; - // Compare sizes - if (a->size < b->size) return -1; - if (a->size > b->size) return 1; - // Compare rows. - for (size_t i = 0; i < a->size; ++i) { - if (is_empty(&a->entries[i])) { - if (!is_empty(&b->entries[i])) { - return -1; // a empty but b non-empty - } - continue; // both empty, no need to check key or value - } else if (is_empty(&b->entries[i])) { - return 1; // a non-empty but b empty - } - // neither entry is empty - const int key_cmp = grpc_slice_cmp(a->entries[i].key, b->entries[i].key); - if (key_cmp != 0) return key_cmp; - const int value_cmp = - value_cmp_fn_a(a->entries[i].value, b->entries[i].value); - if (value_cmp != 0) return value_cmp; - } - return 0; -} diff --git a/src/core/lib/slice/slice_hash_table.h b/src/core/lib/slice/slice_hash_table.h index 819bb3b5bc..fbe9cc58e8 100644 --- a/src/core/lib/slice/slice_hash_table.h +++ b/src/core/lib/slice/slice_hash_table.h @@ -19,52 +19,183 @@ #include -#include "src/core/lib/transport/metadata.h" +#include -/** Hash table implementation. - * - * This implementation uses open addressing - * (https://en.wikipedia.org/wiki/Open_addressing) with linear - * probing (https://en.wikipedia.org/wiki/Linear_probing). - * - * The keys are \a grpc_slice objects. The values are arbitrary pointers - * with a common destroy function. - * - * Hash tables are intentionally immutable, to avoid the need for locking. - */ +#include +#include + +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/slice/slice_internal.h" + +/// Hash table implementation. +/// +/// This implementation uses open addressing +/// (https://en.wikipedia.org/wiki/Open_addressing) with linear +/// probing (https://en.wikipedia.org/wiki/Linear_probing). +/// +/// The keys are \a grpc_slice objects. The values can be any type. +/// +/// Hash tables are intentionally immutable, to avoid the need for locking. + +namespace grpc_core { + +template +class SliceHashTable : public RefCounted> { + public: + struct Entry { + grpc_slice key; + T value; + bool is_set; + }; + + // Function for comparing values. + // TODO(roth): Eliminate this and the Cmp() method from this API once + // grpc_channel_args is redesigned to require that keys are unique. + typedef int (*ValueCmp)(const T&, const T&); + + /// Creates a new hash table containing \a entries, which is an array + /// of length \a num_entries. Takes ownership of all keys and values in \a + /// entries. If not null, \a value_cmp will be used to compare values in + /// the context of \a Cmp(). If null, raw pointer (\a GPR_ICMP) comparison + /// will be used. + static RefCountedPtr Create(size_t num_entries, + Entry* entries, + ValueCmp value_cmp); + + /// Returns the value from the table associated with \a key. + /// Returns null if \a key is not found. + const T* Get(const grpc_slice& key) const; + + /// Compares \a a vs. \a b. + /// A table is considered "smaller" (resp. "greater") if: + /// - GPR_ICMP(a->value_cmp, b->value_cmp) < 1 (resp. > 1), + /// - else, it contains fewer (resp. more) entries, + /// - else, if strcmp(a_key, b_key) < 1 (resp. > 1), + /// - else, if value_cmp(a_value, b_value) < 1 (resp. > 1). + static int Cmp(const SliceHashTable& a, const SliceHashTable& b); + + private: + // So New() can call our private ctor. + template + friend T2* New(Args&&... args); + + SliceHashTable(size_t num_entries, Entry* entries, ValueCmp value_cmp); + virtual ~SliceHashTable(); + + void Add(grpc_slice key, T& value); + + // Default value comparison function, if none specified by caller. + static int DefaultValueCmp(const T& a, const T& b) { return GPR_ICMP(a, b); } + + const ValueCmp value_cmp_; + const size_t size_; + size_t max_num_probes_; + Entry* entries_; +}; + +// +// implementation -- no user-serviceable parts below +// + +template +RefCountedPtr> SliceHashTable::Create(size_t num_entries, + Entry* entries, + ValueCmp value_cmp) { + return MakeRefCounted>(num_entries, entries, value_cmp); +} + +template +SliceHashTable::SliceHashTable(size_t num_entries, Entry* entries, + ValueCmp value_cmp) + : value_cmp_(value_cmp), + // Keep load factor low to improve performance of lookups. + size_(num_entries * 2), + max_num_probes_(0) { + entries_ = static_cast(gpr_zalloc(sizeof(Entry) * size_)); + for (size_t i = 0; i < num_entries; ++i) { + Entry* entry = &entries[i]; + Add(entry->key, entry->value); + } +} + +template +SliceHashTable::~SliceHashTable() { + for (size_t i = 0; i < size_; ++i) { + Entry& entry = entries_[i]; + if (entry.is_set) { + grpc_slice_unref_internal(entry.key); + entry.value.~T(); + } + } + gpr_free(entries_); +} + +template +void SliceHashTable::Add(grpc_slice key, T& value) { + const size_t hash = grpc_slice_hash(key); + for (size_t offset = 0; offset < size_; ++offset) { + const size_t idx = (hash + offset) % size_; + if (!entries_[idx].is_set) { + entries_[idx].is_set = true; + entries_[idx].key = key; + entries_[idx].value = std::move(value); + // Keep track of the maximum number of probes needed, since this + // provides an upper bound for lookups. + if (offset > max_num_probes_) max_num_probes_ = offset; + return; + } + } + GPR_ASSERT(false); // Table should never be full. +} + +template +const T* SliceHashTable::Get(const grpc_slice& key) const { + const size_t hash = grpc_slice_hash(key); + // We cap the number of probes at the max number recorded when + // populating the table. + for (size_t offset = 0; offset <= max_num_probes_; ++offset) { + const size_t idx = (hash + offset) % size_; + if (!entries_[idx].is_set) break; + if (grpc_slice_eq(entries_[idx].key, key)) { + return &entries_[idx].value; + } + } + return nullptr; // Not found. +} + +template +int SliceHashTable::Cmp(const SliceHashTable& a, const SliceHashTable& b) { + ValueCmp value_cmp_a = + a.value_cmp_ != nullptr ? a.value_cmp_ : DefaultValueCmp; + ValueCmp value_cmp_b = + b.value_cmp_ != nullptr ? b.value_cmp_ : DefaultValueCmp; + // Compare value_fns + const int value_fns_cmp = GPR_ICMP((void*)value_cmp_a, (void*)value_cmp_b); + if (value_fns_cmp != 0) return value_fns_cmp; + // Compare sizes + if (a.size_ < b.size_) return -1; + if (a.size_ > b.size_) return 1; + // Compare rows. + for (size_t i = 0; i < a.size_; ++i) { + if (!a.entries_[i].is_set) { + if (b.entries_[i].is_set) { + return -1; // a empty but b non-empty + } + continue; // both empty, no need to check key or value + } else if (!b.entries_[i].is_set) { + return 1; // a non-empty but b empty + } + // neither entry is empty + const int key_cmp = grpc_slice_cmp(a.entries_[i].key, b.entries_[i].key); + if (key_cmp != 0) return key_cmp; + const int value_cmp = value_cmp_a(a.entries_[i].value, b.entries_[i].value); + if (value_cmp != 0) return value_cmp; + } + return 0; +} -typedef struct grpc_slice_hash_table grpc_slice_hash_table; - -typedef struct grpc_slice_hash_table_entry { - grpc_slice key; - void* value; /* Must not be NULL. */ -} grpc_slice_hash_table_entry; - -/** Creates a new hash table of containing \a entries, which is an array - of length \a num_entries. Takes ownership of all keys and values in \a - entries. Values will be cleaned up via \a destroy_value(). If not NULL, \a - value_cmp will be used to compare values in the context of \a - grpc_slice_hash_table_cmp. If NULL, raw pointer (\a GPR_ICMP) comparison - will be used. */ -grpc_slice_hash_table* grpc_slice_hash_table_create( - size_t num_entries, grpc_slice_hash_table_entry* entries, - void (*destroy_value)(void* value), int (*value_cmp)(void* a, void* b)); - -grpc_slice_hash_table* grpc_slice_hash_table_ref(grpc_slice_hash_table* table); -void grpc_slice_hash_table_unref(grpc_slice_hash_table* table); - -/** Returns the value from \a table associated with \a key. - Returns NULL if \a key is not found. */ -void* grpc_slice_hash_table_get(const grpc_slice_hash_table* table, - const grpc_slice key); - -/** Compares \a a vs. \a b. - * A table is considered "smaller" (resp. "greater") if: - * - GPR_ICMP(a->value_cmp, b->value_cmp) < 1 (resp. > 1), - * - else, it contains fewer (resp. more) entries, - * - else, if strcmp(a_key, b_key) < 1 (resp. > 1), - * - else, if value_cmp(a_value, b_value) < 1 (resp. > 1). */ -int grpc_slice_hash_table_cmp(const grpc_slice_hash_table* a, - const grpc_slice_hash_table* b); +} // namespace grpc_core #endif /* GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H */ diff --git a/src/core/lib/transport/service_config.cc b/src/core/lib/transport/service_config.cc index b1d727419d..e1a55d98ab 100644 --- a/src/core/lib/transport/service_config.cc +++ b/src/core/lib/transport/service_config.cc @@ -31,74 +31,30 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" -// The main purpose of the code here is to parse the service config in -// JSON form, which will look like this: -// -// { -// "loadBalancingPolicy": "string", // optional -// "methodConfig": [ // array of one or more method_config objects -// { -// "name": [ // array of one or more name objects -// { -// "service": "string", // required -// "method": "string", // optional -// } -// ], -// // remaining fields are optional. -// // see https://developers.google.com/protocol-buffers/docs/proto3#json -// // for format details. -// "waitForReady": bool, -// "timeout": "duration_string", -// "maxRequestMessageBytes": "int64_string", -// "maxResponseMessageBytes": "int64_string", -// } -// ] -// } - -struct grpc_service_config { - char* json_string; // Underlying storage for json_tree. - grpc_json* json_tree; -}; +namespace grpc_core { -grpc_service_config* grpc_service_config_create(const char* json_string) { - grpc_service_config* service_config = - static_cast(gpr_malloc(sizeof(*service_config))); - service_config->json_string = gpr_strdup(json_string); - service_config->json_tree = - grpc_json_parse_string(service_config->json_string); - if (service_config->json_tree == nullptr) { +UniquePtr ServiceConfig::Create(const char* json) { + UniquePtr json_string(gpr_strdup(json)); + grpc_json* json_tree = grpc_json_parse_string(json_string.get()); + if (json_tree == nullptr) { gpr_log(GPR_INFO, "failed to parse JSON for service config"); - gpr_free(service_config->json_string); - gpr_free(service_config); return nullptr; } - return service_config; + return MakeUnique(std::move(json_string), json_tree); } -void grpc_service_config_destroy(grpc_service_config* service_config) { - grpc_json_destroy(service_config->json_tree); - gpr_free(service_config->json_string); - gpr_free(service_config); -} +ServiceConfig::ServiceConfig(UniquePtr json_string, grpc_json* json_tree) + : json_string_(std::move(json_string)), json_tree_(json_tree) {} -void grpc_service_config_parse_global_params( - const grpc_service_config* service_config, - void (*process_json)(const grpc_json* json, void* arg), void* arg) { - const grpc_json* json = service_config->json_tree; - if (json->type != GRPC_JSON_OBJECT || json->key != nullptr) return; - for (grpc_json* field = json->child; field != nullptr; field = field->next) { - if (field->key == nullptr) return; - if (strcmp(field->key, "methodConfig") == 0) continue; - process_json(field, arg); - } -} +ServiceConfig::~ServiceConfig() { grpc_json_destroy(json_tree_); } -const char* grpc_service_config_get_lb_policy_name( - const grpc_service_config* service_config) { - const grpc_json* json = service_config->json_tree; - if (json->type != GRPC_JSON_OBJECT || json->key != nullptr) return nullptr; +const char* ServiceConfig::GetLoadBalancingPolicyName() const { + if (json_tree_->type != GRPC_JSON_OBJECT || json_tree_->key != nullptr) { + return nullptr; + } const char* lb_policy_name = nullptr; - for (grpc_json* field = json->child; field != nullptr; field = field->next) { + for (grpc_json* field = json_tree_->child; field != nullptr; + field = field->next) { if (field->key == nullptr) return nullptr; if (strcmp(field->key, "loadBalancingPolicy") == 0) { if (lb_policy_name != nullptr) return nullptr; // Duplicate. @@ -109,8 +65,7 @@ const char* grpc_service_config_get_lb_policy_name( return lb_policy_name; } -// Returns the number of names specified in the method config \a json. -static size_t count_names_in_method_config_json(grpc_json* json) { +size_t ServiceConfig::CountNamesInMethodConfig(grpc_json* json) { size_t num_names = 0; for (grpc_json* field = json->child; field != nullptr; field = field->next) { if (field->key != nullptr && strcmp(field->key, "name") == 0) { @@ -124,9 +79,7 @@ static size_t count_names_in_method_config_json(grpc_json* json) { return num_names; } -// Returns a path string for the JSON name object specified by \a json. -// Returns NULL on error. Caller takes ownership of result. -static char* parse_json_method_name(grpc_json* json) { +UniquePtr ServiceConfig::ParseJsonMethodName(grpc_json* json) { if (json->type != GRPC_JSON_OBJECT) return nullptr; const char* service_name = nullptr; const char* method_name = nullptr; @@ -147,116 +100,7 @@ static char* parse_json_method_name(grpc_json* json) { char* path; gpr_asprintf(&path, "/%s/%s", service_name, method_name == nullptr ? "*" : method_name); - return path; + return UniquePtr(path); } -// Parses the method config from \a json. Adds an entry to \a entries for -// each name found, incrementing \a idx for each entry added. -// Returns false on error. -static bool parse_json_method_config( - grpc_json* json, void* (*create_value)(const grpc_json* method_config_json), - void* (*ref_value)(void* value), void (*unref_value)(void* value), - grpc_slice_hash_table_entry* entries, size_t* idx) { - // Construct value. - void* method_config = create_value(json); - if (method_config == nullptr) return false; - // Construct list of paths. - bool success = false; - gpr_strvec paths; - gpr_strvec_init(&paths); - for (grpc_json* child = json->child; child != nullptr; child = child->next) { - if (child->key == nullptr) continue; - if (strcmp(child->key, "name") == 0) { - if (child->type != GRPC_JSON_ARRAY) goto done; - for (grpc_json* name = child->child; name != nullptr; name = name->next) { - char* path = parse_json_method_name(name); - if (path == nullptr) goto done; - gpr_strvec_add(&paths, path); - } - } - } - if (paths.count == 0) goto done; // No names specified. - // Add entry for each path. - for (size_t i = 0; i < paths.count; ++i) { - entries[*idx].key = grpc_slice_from_copied_string(paths.strs[i]); - entries[*idx].value = ref_value(method_config); - ++*idx; - } - success = true; -done: - unref_value(method_config); - gpr_strvec_destroy(&paths); - return success; -} - -grpc_slice_hash_table* grpc_service_config_create_method_config_table( - const grpc_service_config* service_config, - void* (*create_value)(const grpc_json* method_config_json), - void* (*ref_value)(void* value), void (*unref_value)(void* value)) { - const grpc_json* json = service_config->json_tree; - // Traverse parsed JSON tree. - if (json->type != GRPC_JSON_OBJECT || json->key != nullptr) return nullptr; - size_t num_entries = 0; - grpc_slice_hash_table_entry* entries = nullptr; - for (grpc_json* field = json->child; field != nullptr; field = field->next) { - if (field->key == nullptr) return nullptr; - if (strcmp(field->key, "methodConfig") == 0) { - if (entries != nullptr) return nullptr; // Duplicate. - if (field->type != GRPC_JSON_ARRAY) return nullptr; - // Find number of entries. - for (grpc_json* method = field->child; method != nullptr; - method = method->next) { - size_t count = count_names_in_method_config_json(method); - if (count <= 0) return nullptr; - num_entries += count; - } - // Populate method config table entries. - entries = static_cast( - gpr_malloc(num_entries * sizeof(grpc_slice_hash_table_entry))); - size_t idx = 0; - for (grpc_json* method = field->child; method != nullptr; - method = method->next) { - if (!parse_json_method_config(method, create_value, ref_value, - unref_value, entries, &idx)) { - for (size_t i = 0; i < idx; ++i) { - grpc_slice_unref_internal(entries[i].key); - unref_value(entries[i].value); - } - gpr_free(entries); - return nullptr; - } - } - GPR_ASSERT(idx == num_entries); - } - } - // Instantiate method config table. - grpc_slice_hash_table* method_config_table = nullptr; - if (entries != nullptr) { - method_config_table = grpc_slice_hash_table_create(num_entries, entries, - unref_value, nullptr); - gpr_free(entries); - } - return method_config_table; -} - -void* grpc_method_config_table_get(const grpc_slice_hash_table* table, - grpc_slice path) { - void* value = grpc_slice_hash_table_get(table, path); - // If we didn't find a match for the path, try looking for a wildcard - // entry (i.e., change "/service/method" to "/service/*"). - if (value == nullptr) { - char* path_str = grpc_slice_to_c_string(path); - const char* sep = strrchr(path_str, '/') + 1; - const size_t len = static_cast(sep - path_str); - char* buf = static_cast(gpr_malloc(len + 2)); // '*' and NUL - memcpy(buf, path_str, len); - buf[len] = '*'; - buf[len + 1] = '\0'; - grpc_slice wildcard_path = grpc_slice_from_copied_string(buf); - gpr_free(buf); - value = grpc_slice_hash_table_get(table, wildcard_path); - grpc_slice_unref_internal(wildcard_path); - gpr_free(path_str); - } - return value; -} +} // namespace grpc_core diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h index 6517f36802..a65b267d46 100644 --- a/src/core/lib/transport/service_config.h +++ b/src/core/lib/transport/service_config.h @@ -20,44 +20,230 @@ #include #include +#include +#include "src/core/lib/gprpp/inlined_vector.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/json/json.h" #include "src/core/lib/slice/slice_hash_table.h" -typedef struct grpc_service_config grpc_service_config; - -grpc_service_config* grpc_service_config_create(const char* json_string); -void grpc_service_config_destroy(grpc_service_config* service_config); - -/// Invokes \a process_json() for each global parameter in the service -/// config. \a arg is passed as the second argument to \a process_json(). -void grpc_service_config_parse_global_params( - const grpc_service_config* service_config, - void (*process_json)(const grpc_json* json, void* arg), void* arg); - -/// Gets the LB policy name from \a service_config. -/// Returns NULL if no LB policy name was specified. -/// Caller does NOT take ownership. -const char* grpc_service_config_get_lb_policy_name( - const grpc_service_config* service_config); - -/// Creates a method config table based on the data in \a json. -/// The table's keys are request paths. The table's value type is -/// returned by \a create_value(), based on data parsed from the JSON tree. -/// \a ref_value() and \a unref_value() are used to ref and unref values. -/// Returns NULL on error. -grpc_slice_hash_table* grpc_service_config_create_method_config_table( - const grpc_service_config* service_config, - void* (*create_value)(const grpc_json* method_config_json), - void* (*ref_value)(void* value), void (*unref_value)(void* value)); - -/// A helper function for looking up values in the table returned by -/// \a grpc_service_config_create_method_config_table(). -/// Gets the method config for the specified \a path, which should be of -/// the form "/service/method". -/// Returns NULL if the method has no config. -/// Caller does NOT own a reference to the result. -void* grpc_method_config_table_get(const grpc_slice_hash_table* table, - grpc_slice path); +// The main purpose of the code here is to parse the service config in +// JSON form, which will look like this: +// +// { +// "loadBalancingPolicy": "string", // optional +// "methodConfig": [ // array of one or more method_config objects +// { +// "name": [ // array of one or more name objects +// { +// "service": "string", // required +// "method": "string", // optional +// } +// ], +// // remaining fields are optional. +// // see +// https://developers.google.com/protocol-buffers/docs/proto3#json +// // for format details. +// "waitForReady": bool, +// "timeout": "duration_string", +// "maxRequestMessageBytes": "int64_string", +// "maxResponseMessageBytes": "int64_string", +// } +// ] +// } + +namespace grpc_core { + +class ServiceConfig { + public: + /// Creates a new service config from parsing \a json_string. + /// Returns null on parse error. + static UniquePtr Create(const char* json); + + ~ServiceConfig(); + + /// Invokes \a process_json() for each global parameter in the service + /// config. \a arg is passed as the second argument to \a process_json(). + template + using ProcessJson = void (*)(const grpc_json*, T*); + template + void ParseGlobalParams(ProcessJson process_json, T* arg) const; + + /// Gets the LB policy name from \a service_config. + /// Returns NULL if no LB policy name was specified. + /// Caller does NOT take ownership. + const char* GetLoadBalancingPolicyName() const; + + /// Creates a method config table based on the data in \a json. + /// The table's keys are request paths. The table's value type is + /// returned by \a create_value(), based on data parsed from the JSON tree. + /// Returns null on error. + template + using CreateValue = RefCountedPtr (*)(const grpc_json* method_config_json); + template + RefCountedPtr>> CreateMethodConfigTable( + CreateValue create_value); + + /// A helper function for looking up values in the table returned by + /// \a CreateMethodConfigTable(). + /// Gets the method config for the specified \a path, which should be of + /// the form "/service/method". + /// Returns null if the method has no config. + /// Caller does NOT own a reference to the result. + template + static RefCountedPtr MethodConfigTableLookup( + const SliceHashTable>& table, grpc_slice path); + + private: + // So New() can call our private ctor. + template + friend T* New(Args&&... args); + + // Takes ownership of \a json_tree. + ServiceConfig(UniquePtr json_string, grpc_json* json_tree); + + // Returns the number of names specified in the method config \a json. + static size_t CountNamesInMethodConfig(grpc_json* json); + + // Returns a path string for the JSON name object specified by \a json. + // Returns null on error. + static UniquePtr ParseJsonMethodName(grpc_json* json); + + // Parses the method config from \a json. Adds an entry to \a entries for + // each name found, incrementing \a idx for each entry added. + // Returns false on error. + template + static bool ParseJsonMethodConfig( + grpc_json* json, CreateValue create_value, + typename SliceHashTable>::Entry* entries, size_t* idx); + + UniquePtr json_string_; // Underlying storage for json_tree. + grpc_json* json_tree_; +}; + +// +// implementation -- no user-serviceable parts below +// + +template +void ServiceConfig::ParseGlobalParams(ProcessJson process_json, + T* arg) const { + if (json_tree_->type != GRPC_JSON_OBJECT || json_tree_->key != nullptr) { + return; + } + for (grpc_json* field = json_tree_->child; field != nullptr; + field = field->next) { + if (field->key == nullptr) return; + if (strcmp(field->key, "methodConfig") == 0) continue; + process_json(field, arg); + } +} + +template +bool ServiceConfig::ParseJsonMethodConfig( + grpc_json* json, CreateValue create_value, + typename SliceHashTable>::Entry* entries, size_t* idx) { + // Construct value. + RefCountedPtr method_config = create_value(json); + if (method_config == nullptr) return false; + // Construct list of paths. + InlinedVector, 10> paths; + for (grpc_json* child = json->child; child != nullptr; child = child->next) { + if (child->key == nullptr) continue; + if (strcmp(child->key, "name") == 0) { + if (child->type != GRPC_JSON_ARRAY) return false; + for (grpc_json* name = child->child; name != nullptr; name = name->next) { + UniquePtr path = ParseJsonMethodName(name); + if (path == nullptr) return false; + paths.push_back(std::move(path)); + } + } + } + if (paths.size() == 0) return false; // No names specified. + // Add entry for each path. + for (size_t i = 0; i < paths.size(); ++i) { + entries[*idx].key = grpc_slice_from_copied_string(paths[i].get()); + entries[*idx].value = method_config; // Takes a new ref. + ++*idx; + } + // Success. + return true; +} + +template +RefCountedPtr>> +ServiceConfig::CreateMethodConfigTable(CreateValue create_value) { + // Traverse parsed JSON tree. + if (json_tree_->type != GRPC_JSON_OBJECT || json_tree_->key != nullptr) { + return nullptr; + } + size_t num_entries = 0; + typename SliceHashTable>::Entry* entries = nullptr; + for (grpc_json* field = json_tree_->child; field != nullptr; + field = field->next) { + if (field->key == nullptr) return nullptr; + if (strcmp(field->key, "methodConfig") == 0) { + if (entries != nullptr) return nullptr; // Duplicate. + if (field->type != GRPC_JSON_ARRAY) return nullptr; + // Find number of entries. + for (grpc_json* method = field->child; method != nullptr; + method = method->next) { + size_t count = CountNamesInMethodConfig(method); + if (count <= 0) return nullptr; + num_entries += count; + } + // Populate method config table entries. + entries = static_cast>::Entry*>( + gpr_zalloc(num_entries * + sizeof(typename SliceHashTable>::Entry))); + size_t idx = 0; + for (grpc_json* method = field->child; method != nullptr; + method = method->next) { + if (!ParseJsonMethodConfig(method, create_value, entries, &idx)) { + for (size_t i = 0; i < idx; ++i) { + grpc_slice_unref_internal(entries[i].key); + entries[i].value.reset(); + } + gpr_free(entries); + return nullptr; + } + } + GPR_ASSERT(idx == num_entries); + } + } + // Instantiate method config table. + RefCountedPtr>> method_config_table; + if (entries != nullptr) { + method_config_table = + SliceHashTable>::Create(num_entries, entries, nullptr); + gpr_free(entries); + } + return method_config_table; +} + +template +RefCountedPtr ServiceConfig::MethodConfigTableLookup( + const SliceHashTable>& table, grpc_slice path) { + const RefCountedPtr* value = table.Get(path); + // If we didn't find a match for the path, try looking for a wildcard + // entry (i.e., change "/service/method" to "/service/*"). + if (value == nullptr) { + char* path_str = grpc_slice_to_c_string(path); + const char* sep = strrchr(path_str, '/') + 1; + const size_t len = (size_t)(sep - path_str); + char* buf = (char*)gpr_malloc(len + 2); // '*' and NUL + memcpy(buf, path_str, len); + buf[len] = '*'; + buf[len + 1] = '\0'; + grpc_slice wildcard_path = grpc_slice_from_copied_string(buf); + gpr_free(buf); + value = table.Get(wildcard_path); + grpc_slice_unref_internal(wildcard_path); + gpr_free(path_str); + } + return RefCountedPtr(*value); +} + +} // namespace grpc_core #endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 479ed3aad8..79ebed5f46 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -156,7 +156,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/slice/percent_encoding.cc', 'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice_buffer.cc', - 'src/core/lib/slice/slice_hash_table.cc', 'src/core/lib/slice/slice_intern.cc', 'src/core/lib/slice/slice_string_helpers.cc', 'src/core/lib/surface/api_trace.cc', @@ -236,10 +235,10 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', 'src/core/lib/security/security_connector/security_connector.cc', 'src/core/lib/security/transport/client_auth_filter.cc', - 'src/core/lib/security/transport/lb_targets_info.cc', 'src/core/lib/security/transport/secure_endpoint.cc', 'src/core/lib/security/transport/security_handshaker.cc', 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/target_authority_table.cc', 'src/core/lib/security/transport/tsi_error.cc', 'src/core/lib/security/util/json_util.cc', 'src/core/lib/surface/init_secure.cc', @@ -262,6 +261,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/lb_policy.cc', 'src/core/ext/filters/client_channel/lb_policy_factory.cc', 'src/core/ext/filters/client_channel/lb_policy_registry.cc', + 'src/core/ext/filters/client_channel/method_params.cc', 'src/core/ext/filters/client_channel/parse_address.cc', 'src/core/ext/filters/client_channel/proxy_mapper.cc', 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc', diff --git a/test/core/slice/BUILD b/test/core/slice/BUILD index ba2b553e0b..226aed1db9 100644 --- a/test/core/slice/BUILD +++ b/test/core/slice/BUILD @@ -87,6 +87,9 @@ grpc_cc_test( srcs = ["slice_hash_table_test.cc"], deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], language = "C++", + external_deps = [ + "gtest", + ], ) grpc_cc_test( diff --git a/test/core/slice/slice_hash_table_test.cc b/test/core/slice/slice_hash_table_test.cc index 9fad9a614e..279b543098 100644 --- a/test/core/slice/slice_hash_table_test.cc +++ b/test/core/slice/slice_hash_table_test.cc @@ -20,6 +20,10 @@ #include +#include + +#include + #include #include #include @@ -27,56 +31,55 @@ #include "src/core/lib/slice/slice_internal.h" #include "test/core/util/test_config.h" -typedef struct { - const char* key; - const char* value; -} test_entry; +namespace grpc_core { +namespace { -static void populate_entries(const test_entry* input, size_t num_entries, - grpc_slice_hash_table_entry* output) { - for (size_t i = 0; i < num_entries; ++i) { - output[i].key = grpc_slice_from_copied_string(input[i].key); - output[i].value = gpr_strdup(input[i].value); - } -} +typedef SliceHashTable> TestHashTable; -static void check_values(const test_entry* input, size_t num_entries, - grpc_slice_hash_table* table) { - for (size_t i = 0; i < num_entries; ++i) { - grpc_slice key = grpc_slice_from_static_string(input[i].key); - const char* actual = - static_cast(grpc_slice_hash_table_get(table, key)); - GPR_ASSERT(actual != nullptr); - GPR_ASSERT(strcmp(actual, input[i].value) == 0); +struct TestEntry { + const char* key; + const char* value; +}; + +void CheckValues(const std::vector& input, + const TestHashTable& table) { + for (const TestEntry& expected : input) { + grpc_slice key = grpc_slice_from_static_string(expected.key); + const UniquePtr* actual = table.Get(key); + ASSERT_NE(actual, nullptr); + EXPECT_STREQ(expected.value, actual->get()); grpc_slice_unref(key); } } -static void check_non_existent_value(const char* key_string, - grpc_slice_hash_table* table) { +void CheckNonExistentValue(const char* key_string, const TestHashTable& table) { grpc_slice key = grpc_slice_from_static_string(key_string); - GPR_ASSERT(grpc_slice_hash_table_get(table, key) == nullptr); + ASSERT_EQ(nullptr, table.Get(key)); grpc_slice_unref(key); } -static void destroy_string(void* value) { gpr_free(value); } - -static grpc_slice_hash_table* create_table_from_entries( - const test_entry* test_entries, size_t num_test_entries, - int (*value_cmp_fn)(void*, void*)) { - // Construct table. - grpc_slice_hash_table_entry* entries = - static_cast( - gpr_zalloc(sizeof(*entries) * num_test_entries)); - populate_entries(test_entries, num_test_entries, entries); - grpc_slice_hash_table* table = grpc_slice_hash_table_create( - num_test_entries, entries, destroy_string, value_cmp_fn); +void PopulateEntries(const std::vector& input, + TestHashTable::Entry* output) { + for (size_t i = 0; i < input.size(); ++i) { + output[i].key = grpc_slice_from_copied_string(input[i].key); + output[i].value = UniquePtr(gpr_strdup(input[i].value)); + } +} + +RefCountedPtr CreateTableFromEntries( + const std::vector& test_entries, + TestHashTable::ValueCmp value_cmp) { + TestHashTable::Entry* entries = static_cast( + gpr_zalloc(sizeof(*entries) * test_entries.size())); + PopulateEntries(test_entries, entries); + RefCountedPtr table = + TestHashTable::Create(test_entries.size(), entries, value_cmp); gpr_free(entries); return table; } -static void test_slice_hash_table() { - const test_entry test_entries[] = { +TEST(SliceHashTable, Basic) { + const std::vector test_entries = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}, {"key_3", "value_3"}, {"key_4", "value_4"}, {"key_5", "value_5"}, {"key_6", "value_6"}, {"key_7", "value_7"}, {"key_8", "value_8"}, @@ -112,129 +115,110 @@ static void test_slice_hash_table() { {"key_96", "value_96"}, {"key_97", "value_97"}, {"key_98", "value_98"}, {"key_99", "value_99"}, }; - const size_t num_entries = GPR_ARRAY_SIZE(test_entries); - grpc_slice_hash_table* table = - create_table_from_entries(test_entries, num_entries, nullptr); + RefCountedPtr table = + CreateTableFromEntries(test_entries, nullptr); // Check contents of table. - check_values(test_entries, num_entries, table); - check_non_existent_value("XX", table); - // Clean up. - grpc_core::ExecCtx exec_ctx; - grpc_slice_hash_table_unref(table); + CheckValues(test_entries, *table); + CheckNonExistentValue("XX", *table); } -static int value_cmp_fn(void* a, void* b) { - const char* a_str = static_cast(a); - const char* b_str = static_cast(b); - return strcmp(a_str, b_str); +int StringCmp(const UniquePtr& a, const UniquePtr& b) { + return strcmp(a.get(), b.get()); } -static int pointer_cmp_fn(void* a, void* b) { return GPR_ICMP(a, b); } +int PointerCmp(const UniquePtr& a, const UniquePtr& b) { + return GPR_ICMP(a.get(), b.get()); +} -static void test_slice_hash_table_eq() { - const test_entry test_entries_a[] = { +TEST(SliceHashTable, CmpEqual) { + const std::vector test_entries_a = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_a = GPR_ARRAY_SIZE(test_entries_a); - grpc_slice_hash_table* table_a = - create_table_from_entries(test_entries_a, num_entries_a, value_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_a) == 0); - - const test_entry test_entries_b[] = { + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_b = GPR_ARRAY_SIZE(test_entries_b); - grpc_slice_hash_table* table_b = - create_table_from_entries(test_entries_b, num_entries_b, value_cmp_fn); - - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_b) == 0); - grpc_core::ExecCtx exec_ctx; - grpc_slice_hash_table_unref(table_a); - grpc_slice_hash_table_unref(table_b); + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, StringCmp); + // table_a equals itself. + EXPECT_EQ(0, TestHashTable::Cmp(*table_a, *table_a)); + // table_a equals table_b. + EXPECT_EQ(0, TestHashTable::Cmp(*table_a, *table_b)); } -static void test_slice_hash_table_not_eq() { - const test_entry test_entries_a[] = { +TEST(SliceHashTable, CmpDifferentSizes) { + // table_a has 3 entries, table_b has only 2. + const std::vector test_entries_a = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_a = GPR_ARRAY_SIZE(test_entries_a); - grpc_slice_hash_table* table_a = - create_table_from_entries(test_entries_a, num_entries_a, value_cmp_fn); - - // Different sizes. - const test_entry test_entries_b_smaller[] = {{"key_0", "value_0"}, - {"key_1", "value_1"}}; - const size_t num_entries_b_smaller = GPR_ARRAY_SIZE(test_entries_b_smaller); - grpc_slice_hash_table* table_b_smaller = create_table_from_entries( - test_entries_b_smaller, num_entries_b_smaller, value_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_b_smaller) > 0); - - const test_entry test_entries_b_larger[] = {{"key_0", "value_0"}, - {"key_1", "value_1"}, - {"key_2", "value_2"}, - {"key_3", "value_3"}}; - const size_t num_entries_b_larger = GPR_ARRAY_SIZE(test_entries_b_larger); - grpc_slice_hash_table* table_b_larger = create_table_from_entries( - test_entries_b_larger, num_entries_b_larger, value_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_b_larger) < 0); + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = {{"key_0", "value_0"}, + {"key_1", "value_1"}}; + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, StringCmp); + EXPECT_GT(TestHashTable::Cmp(*table_a, *table_b), 0); + EXPECT_LT(TestHashTable::Cmp(*table_b, *table_a), 0); +} +TEST(SliceHashTable, CmpDifferentKey) { // One key doesn't match and is lexicographically "smaller". - const test_entry test_entries_c[] = { + const std::vector test_entries_a = { + {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = { {"key_zz", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_c = GPR_ARRAY_SIZE(test_entries_c); - grpc_slice_hash_table* table_c = - create_table_from_entries(test_entries_c, num_entries_c, value_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_c) > 0); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_c, table_a) < 0); + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, StringCmp); + EXPECT_GT(TestHashTable::Cmp(*table_a, *table_b), 0); + EXPECT_LT(TestHashTable::Cmp(*table_b, *table_a), 0); +} +TEST(SliceHashTable, CmpDifferentValue) { // One value doesn't match. - const test_entry test_entries_d[] = { + const std::vector test_entries_a = { + {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = { {"key_0", "value_z"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_d = GPR_ARRAY_SIZE(test_entries_d); - grpc_slice_hash_table* table_d = - create_table_from_entries(test_entries_d, num_entries_d, value_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_d) < 0); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_d, table_a) > 0); + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, StringCmp); + EXPECT_LT(TestHashTable::Cmp(*table_a, *table_b), 0); + EXPECT_GT(TestHashTable::Cmp(*table_b, *table_a), 0); +} +TEST(SliceHashTable, CmpDifferentCmpFunctions) { // Same values but different "equals" functions. - const test_entry test_entries_e[] = { + const std::vector test_entries_a = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_e = GPR_ARRAY_SIZE(test_entries_e); - grpc_slice_hash_table* table_e = - create_table_from_entries(test_entries_e, num_entries_e, value_cmp_fn); - const test_entry test_entries_f[] = { + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = { {"key_0", "value_0"}, {"key_1", "value_1"}, {"key_2", "value_2"}}; - const size_t num_entries_f = GPR_ARRAY_SIZE(test_entries_f); - grpc_slice_hash_table* table_f = - create_table_from_entries(test_entries_f, num_entries_f, pointer_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_e, table_f) != 0); + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, PointerCmp); + EXPECT_NE(TestHashTable::Cmp(*table_a, *table_b), 0); +} +TEST(SliceHashTable, CmpEmptyKeysDifferentValue) { // Same (empty) key, different values. - const test_entry test_entries_g[] = {{"", "value_0"}}; - const size_t num_entries_g = GPR_ARRAY_SIZE(test_entries_g); - grpc_slice_hash_table* table_g = - create_table_from_entries(test_entries_g, num_entries_g, value_cmp_fn); - const test_entry test_entries_h[] = {{"", "value_1"}}; - const size_t num_entries_h = GPR_ARRAY_SIZE(test_entries_h); - grpc_slice_hash_table* table_h = - create_table_from_entries(test_entries_h, num_entries_h, pointer_cmp_fn); - GPR_ASSERT(grpc_slice_hash_table_cmp(table_g, table_h) != 0); - - grpc_core::ExecCtx exec_ctx; - grpc_slice_hash_table_unref(table_a); - grpc_slice_hash_table_unref(table_b_larger); - grpc_slice_hash_table_unref(table_b_smaller); - grpc_slice_hash_table_unref(table_c); - grpc_slice_hash_table_unref(table_d); - grpc_slice_hash_table_unref(table_e); - grpc_slice_hash_table_unref(table_f); - grpc_slice_hash_table_unref(table_g); - grpc_slice_hash_table_unref(table_h); + const std::vector test_entries_a = {{"", "value_0"}}; + RefCountedPtr table_a = + CreateTableFromEntries(test_entries_a, StringCmp); + const std::vector test_entries_b = {{"", "value_1"}}; + RefCountedPtr table_b = + CreateTableFromEntries(test_entries_b, PointerCmp); + EXPECT_NE(TestHashTable::Cmp(*table_a, *table_b), 0); } +} // namespace +} // namespace grpc_core + int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); grpc_test_init(argc, argv); grpc_core::ExecCtx::GlobalInit(); - test_slice_hash_table(); - test_slice_hash_table_eq(); - test_slice_hash_table_not_eq(); + int result = RUN_ALL_TESTS(); grpc_core::ExecCtx::GlobalShutdown(); - return 0; + return result; } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e99c9c06b4..dd1facd7b4 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -901,6 +901,8 @@ src/core/ext/filters/client_channel/lb_policy_factory.cc \ src/core/ext/filters/client_channel/lb_policy_factory.h \ src/core/ext/filters/client_channel/lb_policy_registry.cc \ src/core/ext/filters/client_channel/lb_policy_registry.h \ +src/core/ext/filters/client_channel/method_params.cc \ +src/core/ext/filters/client_channel/method_params.h \ src/core/ext/filters/client_channel/parse_address.cc \ src/core/ext/filters/client_channel/parse_address.h \ src/core/ext/filters/client_channel/proxy_mapper.cc \ @@ -1309,13 +1311,13 @@ src/core/lib/security/security_connector/security_connector.cc \ src/core/lib/security/security_connector/security_connector.h \ src/core/lib/security/transport/auth_filters.h \ src/core/lib/security/transport/client_auth_filter.cc \ -src/core/lib/security/transport/lb_targets_info.cc \ -src/core/lib/security/transport/lb_targets_info.h \ src/core/lib/security/transport/secure_endpoint.cc \ src/core/lib/security/transport/secure_endpoint.h \ src/core/lib/security/transport/security_handshaker.cc \ src/core/lib/security/transport/security_handshaker.h \ src/core/lib/security/transport/server_auth_filter.cc \ +src/core/lib/security/transport/target_authority_table.cc \ +src/core/lib/security/transport/target_authority_table.h \ src/core/lib/security/transport/tsi_error.cc \ src/core/lib/security/transport/tsi_error.h \ src/core/lib/security/util/json_util.cc \ @@ -1326,7 +1328,6 @@ src/core/lib/slice/percent_encoding.cc \ src/core/lib/slice/percent_encoding.h \ src/core/lib/slice/slice.cc \ src/core/lib/slice/slice_buffer.cc \ -src/core/lib/slice/slice_hash_table.cc \ src/core/lib/slice/slice_hash_table.h \ src/core/lib/slice/slice_intern.cc \ src/core/lib/slice/slice_internal.h \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index b34fb5332b..2ad0e23fed 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -1954,23 +1954,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "is_filegroup": false, - "language": "c", - "name": "slice_hash_table_test", - "src": [ - "test/core/slice/slice_hash_table_test.cc" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -4170,6 +4153,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c++", + "name": "slice_hash_table_test", + "src": [ + "test/core/slice/slice_hash_table_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -8577,7 +8577,6 @@ "src/core/lib/slice/percent_encoding.cc", "src/core/lib/slice/slice.cc", "src/core/lib/slice/slice_buffer.cc", - "src/core/lib/slice/slice_hash_table.cc", "src/core/lib/slice/slice_intern.cc", "src/core/lib/slice/slice_string_helpers.cc", "src/core/lib/surface/api_trace.cc", @@ -8921,6 +8920,7 @@ "src/core/ext/filters/client_channel/lb_policy.h", "src/core/ext/filters/client_channel/lb_policy_factory.h", "src/core/ext/filters/client_channel/lb_policy_registry.h", + "src/core/ext/filters/client_channel/method_params.h", "src/core/ext/filters/client_channel/parse_address.h", "src/core/ext/filters/client_channel/proxy_mapper.h", "src/core/ext/filters/client_channel/proxy_mapper_registry.h", @@ -8956,6 +8956,8 @@ "src/core/ext/filters/client_channel/lb_policy_factory.h", "src/core/ext/filters/client_channel/lb_policy_registry.cc", "src/core/ext/filters/client_channel/lb_policy_registry.h", + "src/core/ext/filters/client_channel/method_params.cc", + "src/core/ext/filters/client_channel/method_params.h", "src/core/ext/filters/client_channel/parse_address.cc", "src/core/ext/filters/client_channel/parse_address.h", "src/core/ext/filters/client_channel/proxy_mapper.cc", @@ -9308,9 +9310,9 @@ "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_handshaker.h", + "src/core/lib/security/transport/target_authority_table.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/json_util.h" ], @@ -9350,13 +9352,13 @@ "src/core/lib/security/security_connector/security_connector.h", "src/core/lib/security/transport/auth_filters.h", "src/core/lib/security/transport/client_auth_filter.cc", - "src/core/lib/security/transport/lb_targets_info.cc", - "src/core/lib/security/transport/lb_targets_info.h", "src/core/lib/security/transport/secure_endpoint.cc", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_handshaker.cc", "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/server_auth_filter.cc", + "src/core/lib/security/transport/target_authority_table.cc", + "src/core/lib/security/transport/target_authority_table.h", "src/core/lib/security/transport/tsi_error.cc", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/json_util.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 2d62fc6326..649581dada 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -2259,30 +2259,6 @@ ], "uses_polling": false }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "slice_hash_table_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "uses_polling": false - }, { "args": [], "benchmark": false, @@ -4455,6 +4431,30 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "slice_hash_table_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, -- cgit v1.2.3 From 41a6aa320ac9984a997b838057da8288e40e52d0 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 27 Feb 2018 18:25:14 -0800 Subject: Address the comments on backup poller --- src/core/ext/filters/client_channel/backup_poller.cc | 19 +++++++++++-------- src/core/ext/filters/client_channel/backup_poller.h | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/core/ext') diff --git a/src/core/ext/filters/client_channel/backup_poller.cc b/src/core/ext/filters/client_channel/backup_poller.cc index e7d72d1fde..3e2faa57bc 100644 --- a/src/core/ext/filters/client_channel/backup_poller.cc +++ b/src/core/ext/filters/client_channel/backup_poller.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015 gRPC authors. + * Copyright 2017 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,13 +127,7 @@ static void run_poller(void* arg, grpc_error* error) { &p->run_poller_closure); } -void grpc_client_channel_start_backup_polling( - grpc_pollset_set* interested_parties) { - gpr_once_init(&g_once, init_globals); - if (g_poll_interval_ms == 0) { - return; - } - gpr_mu_lock(&g_poller_mu); +static void g_poller_init_locked() { if (g_poller == nullptr) { g_poller = static_cast(gpr_zalloc(sizeof(backup_poller))); g_poller->pollset = @@ -149,7 +143,16 @@ void grpc_client_channel_start_backup_polling( grpc_core::ExecCtx::Get()->Now() + g_poll_interval_ms, &g_poller->run_poller_closure); } +} +void grpc_client_channel_start_backup_polling( + grpc_pollset_set* interested_parties) { + gpr_once_init(&g_once, init_globals); + if (g_poll_interval_ms == 0) { + return; + } + gpr_mu_lock(&g_poller_mu); + g_poller_init_locked(); gpr_ref(&g_poller->refs); /* Get a reference to g_poller->pollset before releasing g_poller_mu to make * TSAN happy. Otherwise, reading from g_poller (i.e g_poller->pollset) after diff --git a/src/core/ext/filters/client_channel/backup_poller.h b/src/core/ext/filters/client_channel/backup_poller.h index 45bdf10d6c..7285b9b93e 100644 --- a/src/core/ext/filters/client_channel/backup_poller.h +++ b/src/core/ext/filters/client_channel/backup_poller.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015 gRPC authors. + * Copyright 2017 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. -- cgit v1.2.3 From 718c8341ca8dcad17d93dc9e20c289c48b7ece34 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 28 Feb 2018 13:00:04 -0800 Subject: Retry support. --- BUILD | 4 + CMakeLists.txt | 110 + Makefile | 138 + build.yaml | 23 + config.m4 | 2 + config.w32 | 2 + gRPC-C++.podspec | 3 + gRPC-Core.podspec | 21 + grpc.gemspec | 4 + grpc.gyp | 38 + include/grpc/impl/codegen/grpc_types.h | 10 + package.xml | 4 + .../ext/filters/client_channel/client_channel.cc | 2052 +- .../ext/filters/client_channel/method_params.cc | 79 +- .../ext/filters/client_channel/method_params.h | 11 + .../ext/filters/client_channel/retry_throttle.cc | 4 +- src/core/ext/filters/client_channel/status_util.cc | 100 + src/core/ext/filters/client_channel/status_util.h | 58 + src/core/ext/filters/client_channel/subchannel.cc | 15 +- src/core/ext/filters/client_channel/subchannel.h | 9 +- .../transport/chttp2/transport/chttp2_transport.cc | 12 +- .../chttp2/transport/incoming_metadata.cc | 3 +- src/core/lib/gpr/arena.cc | 45 + src/core/lib/surface/call.cc | 30 +- src/core/lib/transport/metadata_batch.cc | 24 + src/core/lib/transport/metadata_batch.h | 9 + src/core/lib/transport/static_metadata.cc | 602 +- src/core/lib/transport/static_metadata.h | 176 +- src/core/lib/transport/status_metadata.cc | 54 + src/core/lib/transport/status_metadata.h | 30 + src/core/lib/transport/transport.h | 27 + src/python/grpcio/grpc_core_dependencies.py | 2 + test/core/client_channel/BUILD | 11 + test/core/client_channel/status_util_test.cc | 49 + test/core/end2end/end2end_nosec_tests.cc | 120 + test/core/end2end/end2end_tests.cc | 120 + test/core/end2end/fixtures/h2_proxy.cc | 12 +- test/core/end2end/fuzzers/hpack.dictionary | 8 +- test/core/end2end/gen_build_yaml.py | 116 +- test/core/end2end/generate_tests.bzl | 65 +- test/core/end2end/tests/retry.cc | 325 + test/core/end2end/tests/retry_cancellation.cc | 277 + test/core/end2end/tests/retry_disabled.cc | 262 + .../retry_exceeds_buffer_size_in_initial_batch.cc | 266 + ...etry_exceeds_buffer_size_in_subsequent_batch.cc | 276 + .../end2end/tests/retry_non_retriable_status.cc | 257 + .../end2end/tests/retry_recv_initial_metadata.cc | 268 + test/core/end2end/tests/retry_recv_message.cc | 261 + .../end2end/tests/retry_server_pushback_delay.cc | 318 + .../tests/retry_server_pushback_disabled.cc | 306 + test/core/end2end/tests/retry_streaming.cc | 424 + .../end2end/tests/retry_streaming_after_commit.cc | 354 + ...ry_streaming_succeeds_before_replay_finished.cc | 400 + test/core/end2end/tests/retry_throttled.cc | 264 + test/core/end2end/tests/retry_too_many_attempts.cc | 299 + test/core/transport/BUILD | 12 + test/core/transport/status_metadata_test.cc | 61 + tools/codegen/core/gen_static_metadata.py | 8 + tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 4 + tools/run_tests/generated/sources_and_headers.json | 64 + tools/run_tests/generated/tests.json | 19425 +++++++++++++------ 62 files changed, 21555 insertions(+), 6779 deletions(-) create mode 100644 src/core/ext/filters/client_channel/status_util.cc create mode 100644 src/core/ext/filters/client_channel/status_util.h create mode 100644 src/core/lib/transport/status_metadata.cc create mode 100644 src/core/lib/transport/status_metadata.h create mode 100644 test/core/client_channel/status_util_test.cc create mode 100644 test/core/end2end/tests/retry.cc create mode 100644 test/core/end2end/tests/retry_cancellation.cc create mode 100644 test/core/end2end/tests/retry_disabled.cc create mode 100644 test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc create mode 100644 test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc create mode 100644 test/core/end2end/tests/retry_non_retriable_status.cc create mode 100644 test/core/end2end/tests/retry_recv_initial_metadata.cc create mode 100644 test/core/end2end/tests/retry_recv_message.cc create mode 100644 test/core/end2end/tests/retry_server_pushback_delay.cc create mode 100644 test/core/end2end/tests/retry_server_pushback_disabled.cc create mode 100644 test/core/end2end/tests/retry_streaming.cc create mode 100644 test/core/end2end/tests/retry_streaming_after_commit.cc create mode 100644 test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc create mode 100644 test/core/end2end/tests/retry_throttled.cc create mode 100644 test/core/end2end/tests/retry_too_many_attempts.cc create mode 100644 test/core/transport/status_metadata_test.cc (limited to 'src/core/ext') diff --git a/BUILD b/BUILD index 34225437cf..9f16f7f3ed 100644 --- a/BUILD +++ b/BUILD @@ -808,6 +808,7 @@ grpc_cc_library( "src/core/lib/transport/service_config.cc", "src/core/lib/transport/static_metadata.cc", "src/core/lib/transport/status_conversion.cc", + "src/core/lib/transport/status_metadata.cc", "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", "src/core/lib/transport/transport_op_string.cc", @@ -930,6 +931,7 @@ grpc_cc_library( "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/status_conversion.h", + "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", @@ -1008,6 +1010,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/resolver.cc", "src/core/ext/filters/client_channel/resolver_registry.cc", "src/core/ext/filters/client_channel/retry_throttle.cc", + "src/core/ext/filters/client_channel/status_util.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_index.cc", "src/core/ext/filters/client_channel/uri_parser.cc", @@ -1030,6 +1033,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/resolver_factory.h", "src/core/ext/filters/client_channel/resolver_registry.h", "src/core/ext/filters/client_channel/retry_throttle.h", + "src/core/ext/filters/client_channel/status_util.h", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.h", "src/core/ext/filters/client_channel/uri_parser.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b0f593f30..ad4503299f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -595,7 +595,9 @@ add_dependencies(buildtests_cxx server_request_call_test) add_dependencies(buildtests_cxx shutdown_test) add_dependencies(buildtests_cxx slice_hash_table_test) add_dependencies(buildtests_cxx stats_test) +add_dependencies(buildtests_cxx status_metadata_test) add_dependencies(buildtests_cxx status_test) +add_dependencies(buildtests_cxx status_util_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx streaming_throughput_test) endif() @@ -911,6 +913,7 @@ add_library(grpc src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -993,6 +996,7 @@ add_library(grpc src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -1251,6 +1255,7 @@ add_library(grpc_cronet src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -1304,6 +1309,7 @@ add_library(grpc_cronet src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -1577,6 +1583,7 @@ add_library(grpc_test_util src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -1599,6 +1606,7 @@ add_library(grpc_test_util src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -1864,6 +1872,7 @@ add_library(grpc_test_util_unsecure src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -1886,6 +1895,7 @@ add_library(grpc_test_util_unsecure src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -2131,6 +2141,7 @@ add_library(grpc_unsecure src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -2186,6 +2197,7 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -2930,6 +2942,7 @@ add_library(grpc++_cronet src/core/lib/transport/service_config.cc src/core/lib/transport/static_metadata.cc src/core/lib/transport/status_conversion.cc + src/core/lib/transport/status_metadata.cc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc @@ -2957,6 +2970,7 @@ add_library(grpc++_cronet src/core/ext/filters/client_channel/resolver.cc src/core/ext/filters/client_channel/resolver_registry.cc src/core/ext/filters/client_channel/retry_throttle.cc + src/core/ext/filters/client_channel/status_util.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_index.cc src/core/ext/filters/client_channel/uri_parser.cc @@ -4868,6 +4882,21 @@ add_library(end2end_tests test/core/end2end/tests/request_with_flags.cc test/core/end2end/tests/request_with_payload.cc test/core/end2end/tests/resource_quota_server.cc + test/core/end2end/tests/retry.cc + test/core/end2end/tests/retry_cancellation.cc + test/core/end2end/tests/retry_disabled.cc + test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc + test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc + test/core/end2end/tests/retry_non_retriable_status.cc + test/core/end2end/tests/retry_recv_initial_metadata.cc + test/core/end2end/tests/retry_recv_message.cc + test/core/end2end/tests/retry_server_pushback_delay.cc + test/core/end2end/tests/retry_server_pushback_disabled.cc + test/core/end2end/tests/retry_streaming.cc + test/core/end2end/tests/retry_streaming_after_commit.cc + test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc + test/core/end2end/tests/retry_throttled.cc + test/core/end2end/tests/retry_too_many_attempts.cc test/core/end2end/tests/server_finishes_request.cc test/core/end2end/tests/shutdown_finishes_calls.cc test/core/end2end/tests/shutdown_finishes_tags.cc @@ -4968,6 +4997,21 @@ add_library(end2end_nosec_tests test/core/end2end/tests/request_with_flags.cc test/core/end2end/tests/request_with_payload.cc test/core/end2end/tests/resource_quota_server.cc + test/core/end2end/tests/retry.cc + test/core/end2end/tests/retry_cancellation.cc + test/core/end2end/tests/retry_disabled.cc + test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc + test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc + test/core/end2end/tests/retry_non_retriable_status.cc + test/core/end2end/tests/retry_recv_initial_metadata.cc + test/core/end2end/tests/retry_recv_message.cc + test/core/end2end/tests/retry_server_pushback_delay.cc + test/core/end2end/tests/retry_server_pushback_disabled.cc + test/core/end2end/tests/retry_streaming.cc + test/core/end2end/tests/retry_streaming_after_commit.cc + test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc + test/core/end2end/tests/retry_throttled.cc + test/core/end2end/tests/retry_too_many_attempts.cc test/core/end2end/tests/server_finishes_request.cc test/core/end2end/tests/shutdown_finishes_calls.cc test/core/end2end/tests/shutdown_finishes_tags.cc @@ -12150,6 +12194,39 @@ target_link_libraries(stats_test endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(status_metadata_test + test/core/transport/status_metadata_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + + +target_include_directories(status_metadata_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(status_metadata_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc + ${_gRPC_GFLAGS_LIBRARIES} +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(status_test test/cpp/util/status_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -12184,6 +12261,39 @@ target_link_libraries(status_test ${_gRPC_GFLAGS_LIBRARIES} ) +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + +add_executable(status_util_test + test/core/client_channel/status_util_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + + +target_include_directories(status_util_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(status_util_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc + ${_gRPC_GFLAGS_LIBRARIES} +) + endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) diff --git a/Makefile b/Makefile index 6149c2740d..e86dbe87ac 100644 --- a/Makefile +++ b/Makefile @@ -1182,7 +1182,9 @@ server_request_call_test: $(BINDIR)/$(CONFIG)/server_request_call_test shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test slice_hash_table_test: $(BINDIR)/$(CONFIG)/slice_hash_table_test stats_test: $(BINDIR)/$(CONFIG)/stats_test +status_metadata_test: $(BINDIR)/$(CONFIG)/status_metadata_test status_test: $(BINDIR)/$(CONFIG)/status_test +status_util_test: $(BINDIR)/$(CONFIG)/status_util_test streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test stress_test: $(BINDIR)/$(CONFIG)/stress_test thread_manager_test: $(BINDIR)/$(CONFIG)/thread_manager_test @@ -1640,7 +1642,9 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/shutdown_test \ $(BINDIR)/$(CONFIG)/slice_hash_table_test \ $(BINDIR)/$(CONFIG)/stats_test \ + $(BINDIR)/$(CONFIG)/status_metadata_test \ $(BINDIR)/$(CONFIG)/status_test \ + $(BINDIR)/$(CONFIG)/status_util_test \ $(BINDIR)/$(CONFIG)/streaming_throughput_test \ $(BINDIR)/$(CONFIG)/stress_test \ $(BINDIR)/$(CONFIG)/thread_manager_test \ @@ -1785,7 +1789,9 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/shutdown_test \ $(BINDIR)/$(CONFIG)/slice_hash_table_test \ $(BINDIR)/$(CONFIG)/stats_test \ + $(BINDIR)/$(CONFIG)/status_metadata_test \ $(BINDIR)/$(CONFIG)/status_test \ + $(BINDIR)/$(CONFIG)/status_util_test \ $(BINDIR)/$(CONFIG)/streaming_throughput_test \ $(BINDIR)/$(CONFIG)/stress_test \ $(BINDIR)/$(CONFIG)/thread_manager_test \ @@ -2211,8 +2217,12 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/slice_hash_table_test || ( echo test slice_hash_table_test failed ; exit 1 ) $(E) "[RUN] Testing stats_test" $(Q) $(BINDIR)/$(CONFIG)/stats_test || ( echo test stats_test failed ; exit 1 ) + $(E) "[RUN] Testing status_metadata_test" + $(Q) $(BINDIR)/$(CONFIG)/status_metadata_test || ( echo test status_metadata_test failed ; exit 1 ) $(E) "[RUN] Testing status_test" $(Q) $(BINDIR)/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 ) + $(E) "[RUN] Testing status_util_test" + $(Q) $(BINDIR)/$(CONFIG)/status_util_test || ( echo test status_util_test failed ; exit 1 ) $(E) "[RUN] Testing streaming_throughput_test" $(Q) $(BINDIR)/$(CONFIG)/streaming_throughput_test || ( echo test streaming_throughput_test failed ; exit 1 ) $(E) "[RUN] Testing thread_manager_test" @@ -3146,6 +3156,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -3228,6 +3239,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -3488,6 +3500,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -3541,6 +3554,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -3815,6 +3829,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -3837,6 +3852,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -4095,6 +4111,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -4117,6 +4134,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -4342,6 +4360,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -4397,6 +4416,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -5142,6 +5162,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -5169,6 +5190,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ @@ -9404,6 +9426,21 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/request_with_flags.cc \ test/core/end2end/tests/request_with_payload.cc \ test/core/end2end/tests/resource_quota_server.cc \ + test/core/end2end/tests/retry.cc \ + test/core/end2end/tests/retry_cancellation.cc \ + test/core/end2end/tests/retry_disabled.cc \ + test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc \ + test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc \ + test/core/end2end/tests/retry_non_retriable_status.cc \ + test/core/end2end/tests/retry_recv_initial_metadata.cc \ + test/core/end2end/tests/retry_recv_message.cc \ + test/core/end2end/tests/retry_server_pushback_delay.cc \ + test/core/end2end/tests/retry_server_pushback_disabled.cc \ + test/core/end2end/tests/retry_streaming.cc \ + test/core/end2end/tests/retry_streaming_after_commit.cc \ + test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc \ + test/core/end2end/tests/retry_throttled.cc \ + test/core/end2end/tests/retry_too_many_attempts.cc \ test/core/end2end/tests/server_finishes_request.cc \ test/core/end2end/tests/shutdown_finishes_calls.cc \ test/core/end2end/tests/shutdown_finishes_tags.cc \ @@ -9503,6 +9540,21 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/request_with_flags.cc \ test/core/end2end/tests/request_with_payload.cc \ test/core/end2end/tests/resource_quota_server.cc \ + test/core/end2end/tests/retry.cc \ + test/core/end2end/tests/retry_cancellation.cc \ + test/core/end2end/tests/retry_disabled.cc \ + test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc \ + test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc \ + test/core/end2end/tests/retry_non_retriable_status.cc \ + test/core/end2end/tests/retry_recv_initial_metadata.cc \ + test/core/end2end/tests/retry_recv_message.cc \ + test/core/end2end/tests/retry_server_pushback_delay.cc \ + test/core/end2end/tests/retry_server_pushback_disabled.cc \ + test/core/end2end/tests/retry_streaming.cc \ + test/core/end2end/tests/retry_streaming_after_commit.cc \ + test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc \ + test/core/end2end/tests/retry_throttled.cc \ + test/core/end2end/tests/retry_too_many_attempts.cc \ test/core/end2end/tests/server_finishes_request.cc \ test/core/end2end/tests/shutdown_finishes_calls.cc \ test/core/end2end/tests/shutdown_finishes_tags.cc \ @@ -17965,6 +18017,49 @@ endif endif +STATUS_METADATA_TEST_SRC = \ + test/core/transport/status_metadata_test.cc \ + +STATUS_METADATA_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(STATUS_METADATA_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/status_metadata_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/status_metadata_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/status_metadata_test: $(PROTOBUF_DEP) $(STATUS_METADATA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(STATUS_METADATA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/status_metadata_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/core/transport/status_metadata_test.o: $(LIBDIR)/$(CONFIG)/libgrpc.a + +deps_status_metadata_test: $(STATUS_METADATA_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(STATUS_METADATA_TEST_OBJS:.o=.dep) +endif +endif + + STATUS_TEST_SRC = \ test/cpp/util/status_test.cc \ @@ -18008,6 +18103,49 @@ endif endif +STATUS_UTIL_TEST_SRC = \ + test/core/client_channel/status_util_test.cc \ + +STATUS_UTIL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(STATUS_UTIL_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/status_util_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/status_util_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/status_util_test: $(PROTOBUF_DEP) $(STATUS_UTIL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(STATUS_UTIL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/status_util_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/core/client_channel/status_util_test.o: $(LIBDIR)/$(CONFIG)/libgrpc.a + +deps_status_util_test: $(STATUS_UTIL_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(STATUS_UTIL_TEST_OBJS:.o=.dep) +endif +endif + + STREAMING_THROUGHPUT_TEST_SRC = \ test/cpp/end2end/streaming_throughput_test.cc \ diff --git a/build.yaml b/build.yaml index 6c955676fe..abd4a8220a 100644 --- a/build.yaml +++ b/build.yaml @@ -280,6 +280,7 @@ filegroups: - src/core/lib/transport/service_config.cc - src/core/lib/transport/static_metadata.cc - src/core/lib/transport/status_conversion.cc + - src/core/lib/transport/status_metadata.cc - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc @@ -427,6 +428,7 @@ filegroups: - src/core/lib/transport/service_config.h - src/core/lib/transport/static_metadata.h - src/core/lib/transport/status_conversion.h + - src/core/lib/transport/status_metadata.h - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_impl.h @@ -454,6 +456,7 @@ filegroups: - src/core/ext/filters/client_channel/resolver_factory.h - src/core/ext/filters/client_channel/resolver_registry.h - src/core/ext/filters/client_channel/retry_throttle.h + - src/core/ext/filters/client_channel/status_util.h - src/core/ext/filters/client_channel/subchannel.h - src/core/ext/filters/client_channel/subchannel_index.h - src/core/ext/filters/client_channel/uri_parser.h @@ -476,6 +479,7 @@ filegroups: - src/core/ext/filters/client_channel/resolver.cc - src/core/ext/filters/client_channel/resolver_registry.cc - src/core/ext/filters/client_channel/retry_throttle.cc + - src/core/ext/filters/client_channel/status_util.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_index.cc - src/core/ext/filters/client_channel/uri_parser.cc @@ -4845,6 +4849,15 @@ targets: - tsan timeout_seconds: 1200 uses_polling: false +- name: status_metadata_test + gtest: true + build: test + language: c++ + src: + - test/core/transport/status_metadata_test.cc + deps: + - grpc + uses_polling: false - name: status_test build: test language: c++ @@ -4857,6 +4870,16 @@ targets: - gpr_test_util - gpr uses_polling: false +- name: status_util_test + gtest: true + cpu_cost: 0.1 + build: test + language: c++ + src: + - test/core/client_channel/status_util_test.cc + deps: + - grpc + uses_polling: false - name: streaming_throughput_test gtest: true build: test diff --git a/config.m4 b/config.m4 index 2b7ed1c68c..8d7bef28ac 100644 --- a/config.m4 +++ b/config.m4 @@ -210,6 +210,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/service_config.cc \ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/status_conversion.cc \ + src/core/lib/transport/status_metadata.cc \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ @@ -292,6 +293,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/resolver.cc \ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/retry_throttle.cc \ + src/core/ext/filters/client_channel/status_util.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ src/core/ext/filters/client_channel/uri_parser.cc \ diff --git a/config.w32 b/config.w32 index 2f4e9b7e7e..2875c10f3b 100644 --- a/config.w32 +++ b/config.w32 @@ -187,6 +187,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\transport\\service_config.cc " + "src\\core\\lib\\transport\\static_metadata.cc " + "src\\core\\lib\\transport\\status_conversion.cc " + + "src\\core\\lib\\transport\\status_metadata.cc " + "src\\core\\lib\\transport\\timeout_encoding.cc " + "src\\core\\lib\\transport\\transport.cc " + "src\\core\\lib\\transport\\transport_op_string.cc " + @@ -269,6 +270,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver_registry.cc " + "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + + "src\\core\\ext\\filters\\client_channel\\status_util.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_index.cc " + "src\\core\\ext\\filters\\client_channel\\uri_parser.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 737af98cac..be1eccb8f9 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -304,6 +304,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/resolver_factory.h', 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/retry_throttle.h', + 'src/core/ext/filters/client_channel/status_util.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', 'src/core/ext/filters/client_channel/uri_parser.h', @@ -432,6 +433,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/status_conversion.h', + 'src/core/lib/transport/status_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', @@ -609,6 +611,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/status_conversion.h', + 'src/core/lib/transport/status_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a7b9131423..41f61d9cb8 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -316,6 +316,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/resolver_factory.h', 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/retry_throttle.h', + 'src/core/ext/filters/client_channel/status_util.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', 'src/core/ext/filters/client_channel/uri_parser.h', @@ -444,6 +445,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/status_conversion.h', + 'src/core/lib/transport/status_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', @@ -594,6 +596,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -676,6 +679,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', @@ -805,6 +809,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/resolver_factory.h', 'src/core/ext/filters/client_channel/resolver_registry.h', 'src/core/ext/filters/client_channel/retry_throttle.h', + 'src/core/ext/filters/client_channel/status_util.h', 'src/core/ext/filters/client_channel/subchannel.h', 'src/core/ext/filters/client_channel/subchannel_index.h', 'src/core/ext/filters/client_channel/uri_parser.h', @@ -933,6 +938,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/status_conversion.h', + 'src/core/lib/transport/status_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', @@ -1072,6 +1078,21 @@ Pod::Spec.new do |s| 'test/core/end2end/tests/request_with_flags.cc', 'test/core/end2end/tests/request_with_payload.cc', 'test/core/end2end/tests/resource_quota_server.cc', + 'test/core/end2end/tests/retry.cc', + 'test/core/end2end/tests/retry_cancellation.cc', + 'test/core/end2end/tests/retry_disabled.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', + 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_recv_initial_metadata.cc', + 'test/core/end2end/tests/retry_recv_message.cc', + 'test/core/end2end/tests/retry_server_pushback_delay.cc', + 'test/core/end2end/tests/retry_server_pushback_disabled.cc', + 'test/core/end2end/tests/retry_streaming.cc', + 'test/core/end2end/tests/retry_streaming_after_commit.cc', + 'test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc', + 'test/core/end2end/tests/retry_throttled.cc', + 'test/core/end2end/tests/retry_too_many_attempts.cc', 'test/core/end2end/tests/server_finishes_request.cc', 'test/core/end2end/tests/shutdown_finishes_calls.cc', 'test/core/end2end/tests/shutdown_finishes_tags.cc', diff --git a/grpc.gemspec b/grpc.gemspec index 490aceb97e..90cf3fb0af 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -242,6 +242,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/resolver_factory.h ) s.files += %w( src/core/ext/filters/client_channel/resolver_registry.h ) s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h ) + s.files += %w( src/core/ext/filters/client_channel/status_util.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel_index.h ) s.files += %w( src/core/ext/filters/client_channel/uri_parser.h ) @@ -370,6 +371,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/service_config.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/status_conversion.h ) + s.files += %w( src/core/lib/transport/status_metadata.h ) s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport_impl.h ) @@ -524,6 +526,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/service_config.cc ) s.files += %w( src/core/lib/transport/static_metadata.cc ) s.files += %w( src/core/lib/transport/status_conversion.cc ) + s.files += %w( src/core/lib/transport/status_metadata.cc ) s.files += %w( src/core/lib/transport/timeout_encoding.cc ) s.files += %w( src/core/lib/transport/transport.cc ) s.files += %w( src/core/lib/transport/transport_op_string.cc ) @@ -606,6 +609,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/resolver.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver_registry.cc ) s.files += %w( src/core/ext/filters/client_channel/retry_throttle.cc ) + s.files += %w( src/core/ext/filters/client_channel/status_util.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) s.files += %w( src/core/ext/filters/client_channel/subchannel_index.cc ) s.files += %w( src/core/ext/filters/client_channel/uri_parser.cc ) diff --git a/grpc.gyp b/grpc.gyp index abebf995fd..3a708d8db8 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -351,6 +351,7 @@ 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -433,6 +434,7 @@ 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', @@ -648,6 +650,7 @@ 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -670,6 +673,7 @@ 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', @@ -863,6 +867,7 @@ 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -885,6 +890,7 @@ 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', @@ -1057,6 +1063,7 @@ 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -1112,6 +1119,7 @@ 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', @@ -2482,6 +2490,21 @@ 'test/core/end2end/tests/request_with_flags.cc', 'test/core/end2end/tests/request_with_payload.cc', 'test/core/end2end/tests/resource_quota_server.cc', + 'test/core/end2end/tests/retry.cc', + 'test/core/end2end/tests/retry_cancellation.cc', + 'test/core/end2end/tests/retry_disabled.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', + 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_recv_initial_metadata.cc', + 'test/core/end2end/tests/retry_recv_message.cc', + 'test/core/end2end/tests/retry_server_pushback_delay.cc', + 'test/core/end2end/tests/retry_server_pushback_disabled.cc', + 'test/core/end2end/tests/retry_streaming.cc', + 'test/core/end2end/tests/retry_streaming_after_commit.cc', + 'test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc', + 'test/core/end2end/tests/retry_throttled.cc', + 'test/core/end2end/tests/retry_too_many_attempts.cc', 'test/core/end2end/tests/server_finishes_request.cc', 'test/core/end2end/tests/shutdown_finishes_calls.cc', 'test/core/end2end/tests/shutdown_finishes_tags.cc', @@ -2555,6 +2578,21 @@ 'test/core/end2end/tests/request_with_flags.cc', 'test/core/end2end/tests/request_with_payload.cc', 'test/core/end2end/tests/resource_quota_server.cc', + 'test/core/end2end/tests/retry.cc', + 'test/core/end2end/tests/retry_cancellation.cc', + 'test/core/end2end/tests/retry_disabled.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', + 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', + 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_recv_initial_metadata.cc', + 'test/core/end2end/tests/retry_recv_message.cc', + 'test/core/end2end/tests/retry_server_pushback_delay.cc', + 'test/core/end2end/tests/retry_server_pushback_disabled.cc', + 'test/core/end2end/tests/retry_streaming.cc', + 'test/core/end2end/tests/retry_streaming_after_commit.cc', + 'test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc', + 'test/core/end2end/tests/retry_throttled.cc', + 'test/core/end2end/tests/retry_too_many_attempts.cc', 'test/core/end2end/tests/server_finishes_request.cc', 'test/core/end2end/tests/shutdown_finishes_calls.cc', 'test/core/end2end/tests/shutdown_finishes_tags.cc', diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index a03be05531..dcce2e7f9a 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -314,6 +314,14 @@ typedef struct { Defaults to "blend". In the current implementation "blend" is equivalent to "latency". */ #define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target" +/** If set to zero, disables retry behavior. Otherwise, transparent retries + are enabled for all RPCs, and configurable retries are enabled when they + are configured via the service config. For details, see: + https://github.com/grpc/proposal/blob/master/A6-client-retries.md + */ +#define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries" +/** Per-RPC retry buffer size, in bytes. Default is 256 KiB. */ +#define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size" /** Channel arg that carries the bridged objective c object for custom metrics * logging filter. */ #define GRPC_ARG_MOBILE_LOG_CONFIG "grpc.mobile_log_config" @@ -554,6 +562,8 @@ typedef struct grpc_op { } recv_initial_metadata; /** ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on this value, or reuse it in a future op. + The returned byte buffer will be NULL if trailing metadata was + received instead of a message. */ struct grpc_op_recv_message { struct grpc_byte_buffer** recv_message; diff --git a/package.xml b/package.xml index 705b91a2cd..99badc438f 100644 --- a/package.xml +++ b/package.xml @@ -249,6 +249,7 @@ + @@ -377,6 +378,7 @@ + @@ -531,6 +533,7 @@ + @@ -613,6 +616,7 @@ + diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index bfb064bc88..90b93fbe23 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -21,6 +21,7 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include +#include #include #include #include @@ -37,27 +38,42 @@ #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/filters/client_channel/retry_throttle.h" +#include "src/core/ext/filters/client_channel/status_util.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/deadline/deadline_filter.h" +#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/gpr/string.h" +#include "src/core/lib/gprpp/inlined_vector.h" +#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/connectivity_state.h" +#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/service_config.h" #include "src/core/lib/transport/static_metadata.h" +#include "src/core/lib/transport/status_metadata.h" using grpc_core::internal::ClientChannelMethodParams; /* Client channel implementation */ +// By default, we buffer 256 KiB per RPC for retries. +// TODO(roth): Do we have any data to suggest a better value? +#define DEFAULT_PER_RPC_RETRY_BUFFER_SIZE (256 << 10) + +// This value was picked arbitrarily. It can be changed if there is +// any even moderately compelling reason to do so. +#define RETRY_BACKOFF_JITTER 0.2 + grpc_core::TraceFlag grpc_client_channel_trace(false, "client_channel"); /************************************************************************* @@ -71,14 +87,12 @@ typedef grpc_core::SliceHashTable< MethodParamsTable; typedef struct client_channel_channel_data { - /** resolver for this channel */ grpc_core::OrphanablePtr resolver; - /** have we started resolving this channel */ bool started_resolving; - /** is deadline checking enabled? */ bool deadline_checking_enabled; - /** client channel factory */ grpc_client_channel_factory* client_channel_factory; + bool enable_retries; + size_t per_rpc_retry_buffer_size; /** combiner protecting all variables below in this data structure */ grpc_combiner* combiner; @@ -108,7 +122,7 @@ typedef struct client_channel_channel_data { gpr_mu external_connectivity_watcher_list_mu; struct external_connectivity_watcher* external_connectivity_watcher_list_head; - /* the following properties are guarded by a mutex since API's require them + /* the following properties are guarded by a mutex since APIs require them to be instantaneously available */ gpr_mu info_mu; char* info_lb_policy_name; @@ -295,7 +309,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { gpr_log(GPR_DEBUG, "chand=%p: got resolver result: error=%s", chand, grpc_error_string(error)); } - // Extract the following fields from the resolver result, if non-NULL. + // Extract the following fields from the resolver result, if non-nullptr. bool lb_policy_updated = false; bool lb_policy_created = false; char* lb_policy_name_dup = nullptr; @@ -338,7 +352,6 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { // Use pick_first if nothing was specified and we didn't select grpclb // above. if (lb_policy_name == nullptr) lb_policy_name = "pick_first"; - // Check to see if we're already using the right LB policy. // Note: It's safe to use chand->info_lb_policy_name here without // taking a lock on chand->info_mu, because this function is the @@ -376,6 +389,10 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { new_lb_policy->SetReresolutionClosureLocked(&args->closure); } } + // Before we clean up, save a copy of lb_policy_name, since it might + // be pointing to data inside chand->resolver_result. + // The copy will be saved in chand->lb_policy_name below. + lb_policy_name_dup = gpr_strdup(lb_policy_name); // Find service config. channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); @@ -385,28 +402,26 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { grpc_core::UniquePtr service_config = grpc_core::ServiceConfig::Create(service_config_json); if (service_config != nullptr) { - channel_arg = grpc_channel_args_find(chand->resolver_result, - GRPC_ARG_SERVER_URI); - const char* server_uri = grpc_channel_arg_get_string(channel_arg); - GPR_ASSERT(server_uri != nullptr); - grpc_uri* uri = grpc_uri_parse(server_uri, true); - GPR_ASSERT(uri->path[0] != '\0'); - service_config_parsing_state parsing_state; - memset(&parsing_state, 0, sizeof(parsing_state)); - parsing_state.server_name = - uri->path[0] == '/' ? uri->path + 1 : uri->path; - service_config->ParseGlobalParams(parse_retry_throttle_params, - &parsing_state); - grpc_uri_destroy(uri); - retry_throttle_data = parsing_state.retry_throttle_data; + if (chand->enable_retries) { + channel_arg = grpc_channel_args_find(chand->resolver_result, + GRPC_ARG_SERVER_URI); + const char* server_uri = grpc_channel_arg_get_string(channel_arg); + GPR_ASSERT(server_uri != nullptr); + grpc_uri* uri = grpc_uri_parse(server_uri, true); + GPR_ASSERT(uri->path[0] != '\0'); + service_config_parsing_state parsing_state; + memset(&parsing_state, 0, sizeof(parsing_state)); + parsing_state.server_name = + uri->path[0] == '/' ? uri->path + 1 : uri->path; + service_config->ParseGlobalParams(parse_retry_throttle_params, + &parsing_state); + grpc_uri_destroy(uri); + retry_throttle_data = parsing_state.retry_throttle_data; + } method_params_table = service_config->CreateMethodConfigTable( ClientChannelMethodParams::CreateFromJson); } } - // Before we clean up, save a copy of lb_policy_name, since it might - // be pointing to data inside chand->resolver_result. - // The copy will be saved in chand->lb_policy_name below. - lb_policy_name_dup = gpr_strdup(lb_policy_name); } grpc_channel_args_destroy(chand->resolver_result); chand->resolver_result = nullptr; @@ -419,7 +434,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { lb_policy_name_changed ? " (changed)" : "", service_config_json); } // Now swap out fields in chand. Note that the new values may still - // be NULL if (e.g.) the resolver failed to return results or the + // be nullptr if (e.g.) the resolver failed to return results or the // results did not contain the necessary data. // // First, swap out the data used by cc_get_channel_info(). @@ -441,11 +456,11 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) { // Swap out the method params table. chand->method_params_table = std::move(method_params_table); // If we have a new LB policy or are shutting down (in which case - // new_lb_policy will be NULL), swap out the LB policy, unreffing the old one - // and removing its fds from chand->interested_parties. Note that we do NOT do - // this if either (a) we updated the existing LB policy above or (b) we failed - // to create the new LB policy (in which case we want to continue using the - // most recent one we had). + // new_lb_policy will be nullptr), swap out the LB policy, unreffing the + // old one and removing its fds from chand->interested_parties. + // Note that we do NOT do this if either (a) we updated the existing + // LB policy above or (b) we failed to create the new LB policy (in + // which case we want to continue using the most recent one we had). if (new_lb_policy != nullptr || error != GRPC_ERROR_NONE || chand->resolver == nullptr) { if (chand->lb_policy != nullptr) { @@ -624,9 +639,17 @@ static grpc_error* cc_init_channel_elem(grpc_channel_element* elem, grpc_connectivity_state_init(&chand->state_tracker, GRPC_CHANNEL_IDLE, "client_channel"); grpc_client_channel_start_backup_polling(chand->interested_parties); + // Record max per-RPC retry buffer size. + const grpc_arg* arg = grpc_channel_args_find( + args->channel_args, GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE); + chand->per_rpc_retry_buffer_size = (size_t)grpc_channel_arg_get_integer( + arg, {DEFAULT_PER_RPC_RETRY_BUFFER_SIZE, 0, INT_MAX}); + // Record enable_retries. + arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_ENABLE_RETRIES); + chand->enable_retries = grpc_channel_arg_get_bool(arg, true); // Record client channel factory. - const grpc_arg* arg = grpc_channel_args_find(args->channel_args, - GRPC_ARG_CLIENT_CHANNEL_FACTORY); + arg = grpc_channel_args_find(args->channel_args, + GRPC_ARG_CLIENT_CHANNEL_FACTORY); if (arg == nullptr) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Missing client channel factory in args for client channel filter"); @@ -711,15 +734,122 @@ static void cc_destroy_channel_elem(grpc_channel_element* elem) { */ // Max number of batches that can be pending on a call at any given -// time. This includes: +// time. This includes one batch for each of the following ops: // recv_initial_metadata // send_initial_metadata // recv_message // send_message // recv_trailing_metadata // send_trailing_metadata -// We also add room for a single cancel_stream batch. -#define MAX_WAITING_BATCHES 7 +#define MAX_PENDING_BATCHES 6 + +// Retry support: +// +// In order to support retries, we act as a proxy for stream op batches. +// When we get a batch from the surface, we add it to our list of pending +// batches, and we then use those batches to construct separate "child" +// batches to be started on the subchannel call. When the child batches +// return, we then decide which pending batches have been completed and +// schedule their callbacks accordingly. If a subchannel call fails and +// we want to retry it, we do a new pick and start again, constructing +// new "child" batches for the new subchannel call. +// +// Note that retries are committed when receiving data from the server +// (except for Trailers-Only responses). However, there may be many +// send ops started before receiving any data, so we may have already +// completed some number of send ops (and returned the completions up to +// the surface) by the time we realize that we need to retry. To deal +// with this, we cache data for send ops, so that we can replay them on a +// different subchannel call even after we have completed the original +// batches. +// +// There are two sets of data to maintain: +// - In call_data (in the parent channel), we maintain a list of pending +// ops and cached data for send ops. +// - In the subchannel call, we maintain state to indicate what ops have +// already been sent down to that call. +// +// When constructing the "child" batches, we compare those two sets of +// data to see which batches need to be sent to the subchannel call. + +// TODO(roth): In subsequent PRs: +// - add support for transparent retries (including initial metadata) +// - figure out how to record stats in census for retries +// (census filter is on top of this one) +// - add census stats for retries + +// State used for starting a retryable batch on a subchannel call. +// This provides its own grpc_transport_stream_op_batch and other data +// structures needed to populate the ops in the batch. +// We allocate one struct on the arena for each attempt at starting a +// batch on a given subchannel call. +typedef struct { + gpr_refcount refs; + grpc_call_element* elem; + grpc_subchannel_call* subchannel_call; // Holds a ref. + // The batch to use in the subchannel call. + // Its payload field points to subchannel_call_retry_state.batch_payload. + grpc_transport_stream_op_batch batch; + // For send_initial_metadata. + // Note that we need to make a copy of the initial metadata for each + // subchannel call instead of just referring to the copy in call_data, + // because filters in the subchannel stack will probably add entries, + // so we need to start in a pristine state for each attempt of the call. + grpc_linked_mdelem* send_initial_metadata_storage; + grpc_metadata_batch send_initial_metadata; + // For send_message. + grpc_caching_byte_stream send_message; + // For send_trailing_metadata. + grpc_linked_mdelem* send_trailing_metadata_storage; + grpc_metadata_batch send_trailing_metadata; + // For intercepting recv_initial_metadata. + grpc_metadata_batch recv_initial_metadata; + grpc_closure recv_initial_metadata_ready; + bool trailing_metadata_available; + // For intercepting recv_message. + grpc_closure recv_message_ready; + grpc_byte_stream* recv_message; + // For intercepting recv_trailing_metadata. + grpc_metadata_batch recv_trailing_metadata; + grpc_transport_stream_stats collect_stats; + // For intercepting on_complete. + grpc_closure on_complete; +} subchannel_batch_data; + +// Retry state associated with a subchannel call. +// Stored in the parent_data of the subchannel call object. +typedef struct { + // subchannel_batch_data.batch.payload points to this. + grpc_transport_stream_op_batch_payload batch_payload; + // These fields indicate which ops have been started and completed on + // this subchannel call. + size_t started_send_message_count; + size_t completed_send_message_count; + size_t started_recv_message_count; + size_t completed_recv_message_count; + bool started_send_initial_metadata : 1; + bool completed_send_initial_metadata : 1; + bool started_send_trailing_metadata : 1; + bool completed_send_trailing_metadata : 1; + bool started_recv_initial_metadata : 1; + bool completed_recv_initial_metadata : 1; + bool started_recv_trailing_metadata : 1; + bool completed_recv_trailing_metadata : 1; + // State for callback processing. + bool retry_dispatched : 1; + bool recv_initial_metadata_ready_deferred : 1; + bool recv_message_ready_deferred : 1; + grpc_error* recv_initial_metadata_error; + grpc_error* recv_message_error; +} subchannel_call_retry_state; + +// Pending batches stored in call data. +typedef struct { + // The pending batch. If nullptr, this slot is empty. + grpc_transport_stream_op_batch* batch; + // Indicates whether payload for send ops has been cached in call data. + bool send_ops_cached; +} pending_batch; /** Call data. Holds a pointer to grpc_subchannel_call and the associated machinery to create such a pointer. @@ -746,155 +876,1589 @@ typedef struct client_channel_call_data { grpc_core::RefCountedPtr method_params; grpc_subchannel_call* subchannel_call; - grpc_error* error; + + // Set when we get a cancel_stream op. + grpc_error* cancel_error; grpc_core::LoadBalancingPolicy::PickState pick; - grpc_closure lb_pick_closure; - grpc_closure lb_pick_cancel_closure; + grpc_closure pick_closure; + grpc_closure pick_cancel_closure; grpc_polling_entity* pollent; - grpc_transport_stream_op_batch* waiting_for_pick_batches[MAX_WAITING_BATCHES]; - size_t waiting_for_pick_batches_count; - grpc_closure handle_pending_batch_in_call_combiner[MAX_WAITING_BATCHES]; + // Batches are added to this list when received from above. + // They are removed when we are done handling the batch (i.e., when + // either we have invoked all of the batch's callbacks or we have + // passed the batch down to the subchannel call and are not + // intercepting any of its callbacks). + pending_batch pending_batches[MAX_PENDING_BATCHES]; + bool pending_send_initial_metadata : 1; + bool pending_send_message : 1; + bool pending_send_trailing_metadata : 1; + + // Retry state. + bool enable_retries : 1; + bool retry_committed : 1; + bool last_attempt_got_server_pushback : 1; + int num_attempts_completed; + size_t bytes_buffered_for_retry; + grpc_core::ManualConstructor retry_backoff; + grpc_timer retry_timer; + + // Cached data for retrying send ops. + // send_initial_metadata + bool seen_send_initial_metadata; + grpc_linked_mdelem* send_initial_metadata_storage; + grpc_metadata_batch send_initial_metadata; + uint32_t send_initial_metadata_flags; + gpr_atm* peer_string; + // send_message + // When we get a send_message op, we replace the original byte stream + // with a grpc_caching_byte_stream that caches the slices to a + // local buffer for use in retries. + // Note: We inline the cache for the first 3 send_message ops and use + // dynamic allocation after that. This number was essentially picked + // at random; it could be changed in the future to tune performance. + grpc_core::InlinedVector send_messages; + // send_trailing_metadata + bool seen_send_trailing_metadata; + grpc_linked_mdelem* send_trailing_metadata_storage; + grpc_metadata_batch send_trailing_metadata; +} call_data; - grpc_transport_stream_op_batch* initial_metadata_batch; +// Forward declarations. +static void retry_commit(grpc_call_element* elem, + subchannel_call_retry_state* retry_state); +static void start_internal_recv_trailing_metadata(grpc_call_element* elem); +static void on_complete(void* arg, grpc_error* error); +static void start_retriable_subchannel_batches(void* arg, grpc_error* ignored); +static void pick_after_resolver_result_start_locked(grpc_call_element* elem); +static void start_pick_locked(void* arg, grpc_error* ignored); + +// +// send op data caching +// + +// Caches data for send ops so that it can be retried later, if not +// already cached. +static void maybe_cache_send_ops_for_batch(call_data* calld, + pending_batch* pending) { + if (pending->send_ops_cached) return; + pending->send_ops_cached = true; + grpc_transport_stream_op_batch* batch = pending->batch; + // Save a copy of metadata for send_initial_metadata ops. + if (batch->send_initial_metadata) { + calld->seen_send_initial_metadata = true; + GPR_ASSERT(calld->send_initial_metadata_storage == nullptr); + grpc_metadata_batch* send_initial_metadata = + batch->payload->send_initial_metadata.send_initial_metadata; + calld->send_initial_metadata_storage = (grpc_linked_mdelem*)gpr_arena_alloc( + calld->arena, + sizeof(grpc_linked_mdelem) * send_initial_metadata->list.count); + grpc_metadata_batch_copy(send_initial_metadata, + &calld->send_initial_metadata, + calld->send_initial_metadata_storage); + calld->send_initial_metadata_flags = + batch->payload->send_initial_metadata.send_initial_metadata_flags; + calld->peer_string = batch->payload->send_initial_metadata.peer_string; + } + // Set up cache for send_message ops. + if (batch->send_message) { + grpc_byte_stream_cache* cache = (grpc_byte_stream_cache*)gpr_arena_alloc( + calld->arena, sizeof(grpc_byte_stream_cache)); + grpc_byte_stream_cache_init(cache, + batch->payload->send_message.send_message); + calld->send_messages.push_back(cache); + } + // Save metadata batch for send_trailing_metadata ops. + if (batch->send_trailing_metadata) { + calld->seen_send_trailing_metadata = true; + GPR_ASSERT(calld->send_trailing_metadata_storage == nullptr); + grpc_metadata_batch* send_trailing_metadata = + batch->payload->send_trailing_metadata.send_trailing_metadata; + calld->send_trailing_metadata_storage = + (grpc_linked_mdelem*)gpr_arena_alloc( + calld->arena, + sizeof(grpc_linked_mdelem) * send_trailing_metadata->list.count); + grpc_metadata_batch_copy(send_trailing_metadata, + &calld->send_trailing_metadata, + calld->send_trailing_metadata_storage); + } +} - grpc_closure on_complete; - grpc_closure* original_on_complete; -} call_data; +// Frees cached send ops that have already been completed after +// committing the call. +static void free_cached_send_op_data_after_commit( + grpc_call_element* elem, subchannel_call_retry_state* retry_state) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (retry_state->completed_send_initial_metadata) { + grpc_metadata_batch_destroy(&calld->send_initial_metadata); + } + for (size_t i = 0; i < retry_state->completed_send_message_count; ++i) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR + "]", + chand, calld, i); + } + grpc_byte_stream_cache_destroy(calld->send_messages[i]); + } + if (retry_state->completed_send_trailing_metadata) { + grpc_metadata_batch_destroy(&calld->send_trailing_metadata); + } +} -grpc_subchannel_call* grpc_client_channel_get_subchannel_call( - grpc_call_element* elem) { +// Frees cached send ops that were completed by the completed batch in +// batch_data. Used when batches are completed after the call is committed. +static void free_cached_send_op_data_for_completed_batch( + grpc_call_element* elem, subchannel_batch_data* batch_data, + subchannel_call_retry_state* retry_state) { + channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); - return calld->subchannel_call; + if (batch_data->batch.send_initial_metadata) { + grpc_metadata_batch_destroy(&calld->send_initial_metadata); + } + if (batch_data->batch.send_message) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR + "]", + chand, calld, retry_state->completed_send_message_count - 1); + } + grpc_byte_stream_cache_destroy( + calld->send_messages[retry_state->completed_send_message_count - 1]); + } + if (batch_data->batch.send_trailing_metadata) { + grpc_metadata_batch_destroy(&calld->send_trailing_metadata); + } +} + +// +// pending_batches management +// + +// Returns the index into calld->pending_batches to be used for batch. +static size_t get_batch_index(grpc_transport_stream_op_batch* batch) { + // Note: It is important the send_initial_metadata be the first entry + // here, since the code in pick_subchannel_locked() assumes it will be. + if (batch->send_initial_metadata) return 0; + if (batch->send_message) return 1; + if (batch->send_trailing_metadata) return 2; + if (batch->recv_initial_metadata) return 3; + if (batch->recv_message) return 4; + if (batch->recv_trailing_metadata) return 5; + GPR_UNREACHABLE_CODE(return (size_t)-1); } // This is called via the call combiner, so access to calld is synchronized. -static void waiting_for_pick_batches_add( - call_data* calld, grpc_transport_stream_op_batch* batch) { - if (batch->send_initial_metadata) { - GPR_ASSERT(calld->initial_metadata_batch == nullptr); - calld->initial_metadata_batch = batch; - } else { - GPR_ASSERT(calld->waiting_for_pick_batches_count < MAX_WAITING_BATCHES); - calld->waiting_for_pick_batches[calld->waiting_for_pick_batches_count++] = - batch; +static void pending_batches_add(grpc_call_element* elem, + grpc_transport_stream_op_batch* batch) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + const size_t idx = get_batch_index(batch); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: adding pending batch at index %" PRIuPTR, chand, + calld, idx); + } + pending_batch* pending = &calld->pending_batches[idx]; + GPR_ASSERT(pending->batch == nullptr); + pending->batch = batch; + pending->send_ops_cached = false; + if (calld->enable_retries) { + // Update state in calld about pending batches. + // Also check if the batch takes us over the retry buffer limit. + // Note: We don't check the size of trailing metadata here, because + // gRPC clients do not send trailing metadata. + if (batch->send_initial_metadata) { + calld->pending_send_initial_metadata = true; + calld->bytes_buffered_for_retry += grpc_metadata_batch_size( + batch->payload->send_initial_metadata.send_initial_metadata); + } + if (batch->send_message) { + calld->pending_send_message = true; + calld->bytes_buffered_for_retry += + batch->payload->send_message.send_message->length; + } + if (batch->send_trailing_metadata) { + calld->pending_send_trailing_metadata = true; + } + if (calld->bytes_buffered_for_retry > chand->per_rpc_retry_buffer_size) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: exceeded retry buffer size, committing", + chand, calld); + } + subchannel_call_retry_state* retry_state = + calld->subchannel_call == nullptr + ? nullptr + : static_cast( + grpc_connected_subchannel_call_get_parent_data( + calld->subchannel_call)); + retry_commit(elem, retry_state); + // If we are not going to retry and have not yet started, pretend + // retries are disabled so that we don't bother with retry overhead. + if (calld->num_attempts_completed == 0) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: disabling retries before first attempt", + chand, calld); + } + calld->enable_retries = false; + } + } } } +static void pending_batch_clear(call_data* calld, pending_batch* pending) { + if (calld->enable_retries) { + if (pending->batch->send_initial_metadata) { + calld->pending_send_initial_metadata = false; + } + if (pending->batch->send_message) { + calld->pending_send_message = false; + } + if (pending->batch->send_trailing_metadata) { + calld->pending_send_trailing_metadata = false; + } + } + pending->batch = nullptr; +} + // This is called via the call combiner, so access to calld is synchronized. static void fail_pending_batch_in_call_combiner(void* arg, grpc_error* error) { - call_data* calld = static_cast(arg); - if (calld->waiting_for_pick_batches_count > 0) { - --calld->waiting_for_pick_batches_count; - grpc_transport_stream_op_batch_finish_with_failure( - calld->waiting_for_pick_batches[calld->waiting_for_pick_batches_count], - GRPC_ERROR_REF(error), calld->call_combiner); - } + grpc_transport_stream_op_batch* batch = + static_cast(arg); + call_data* calld = static_cast(batch->handler_private.extra_arg); + // Note: This will release the call combiner. + grpc_transport_stream_op_batch_finish_with_failure( + batch, GRPC_ERROR_REF(error), calld->call_combiner); } // This is called via the call combiner, so access to calld is synchronized. -static void waiting_for_pick_batches_fail(grpc_call_element* elem, - grpc_error* error) { +// If yield_call_combiner is true, assumes responsibility for yielding +// the call combiner. +static void pending_batches_fail(grpc_call_element* elem, grpc_error* error, + bool yield_call_combiner) { + GPR_ASSERT(error != GRPC_ERROR_NONE); call_data* calld = static_cast(elem->call_data); if (grpc_client_channel_trace.enabled()) { + size_t num_batches = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + if (calld->pending_batches[i].batch != nullptr) ++num_batches; + } gpr_log(GPR_DEBUG, "chand=%p calld=%p: failing %" PRIuPTR " pending batches: %s", - elem->channel_data, calld, calld->waiting_for_pick_batches_count, - grpc_error_string(error)); + elem->channel_data, calld, num_batches, grpc_error_string(error)); + } + grpc_transport_stream_op_batch* + batches[GPR_ARRAY_SIZE(calld->pending_batches)]; + size_t num_batches = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + grpc_transport_stream_op_batch* batch = pending->batch; + if (batch != nullptr) { + batches[num_batches++] = batch; + pending_batch_clear(calld, pending); + } } - for (size_t i = 0; i < calld->waiting_for_pick_batches_count; ++i) { - GRPC_CLOSURE_INIT(&calld->handle_pending_batch_in_call_combiner[i], - fail_pending_batch_in_call_combiner, calld, + for (size_t i = yield_call_combiner ? 1 : 0; i < num_batches; ++i) { + grpc_transport_stream_op_batch* batch = batches[i]; + batch->handler_private.extra_arg = calld; + GRPC_CLOSURE_INIT(&batch->handler_private.closure, + fail_pending_batch_in_call_combiner, batch, grpc_schedule_on_exec_ctx); - GRPC_CALL_COMBINER_START( - calld->call_combiner, &calld->handle_pending_batch_in_call_combiner[i], - GRPC_ERROR_REF(error), "waiting_for_pick_batches_fail"); - } - if (calld->initial_metadata_batch != nullptr) { - grpc_transport_stream_op_batch_finish_with_failure( - calld->initial_metadata_batch, GRPC_ERROR_REF(error), - calld->call_combiner); - } else { - GRPC_CALL_COMBINER_STOP(calld->call_combiner, - "waiting_for_pick_batches_fail"); + GRPC_CALL_COMBINER_START(calld->call_combiner, + &batch->handler_private.closure, + GRPC_ERROR_REF(error), "pending_batches_fail"); + } + if (yield_call_combiner) { + if (num_batches > 0) { + // Note: This will release the call combiner. + grpc_transport_stream_op_batch_finish_with_failure( + batches[0], GRPC_ERROR_REF(error), calld->call_combiner); + } else { + GRPC_CALL_COMBINER_STOP(calld->call_combiner, "pending_batches_fail"); + } } GRPC_ERROR_UNREF(error); } // This is called via the call combiner, so access to calld is synchronized. -static void run_pending_batch_in_call_combiner(void* arg, grpc_error* ignored) { - call_data* calld = static_cast(arg); - if (calld->waiting_for_pick_batches_count > 0) { - --calld->waiting_for_pick_batches_count; - grpc_subchannel_call_process_op( - calld->subchannel_call, - calld->waiting_for_pick_batches[calld->waiting_for_pick_batches_count]); - } +static void resume_pending_batch_in_call_combiner(void* arg, + grpc_error* ignored) { + grpc_transport_stream_op_batch* batch = + static_cast(arg); + grpc_subchannel_call* subchannel_call = + static_cast(batch->handler_private.extra_arg); + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(subchannel_call, batch); } // This is called via the call combiner, so access to calld is synchronized. -static void waiting_for_pick_batches_resume(grpc_call_element* elem) { +static void pending_batches_resume(grpc_call_element* elem) { channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); + if (calld->enable_retries) { + start_retriable_subchannel_batches(elem, GRPC_ERROR_NONE); + return; + } + // Retries not enabled; send down batches as-is. if (grpc_client_channel_trace.enabled()) { + size_t num_batches = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + if (calld->pending_batches[i].batch != nullptr) ++num_batches; + } gpr_log(GPR_DEBUG, - "chand=%p calld=%p: sending %" PRIuPTR - " pending batches to subchannel_call=%p", - chand, calld, calld->waiting_for_pick_batches_count, - calld->subchannel_call); - } - for (size_t i = 0; i < calld->waiting_for_pick_batches_count; ++i) { - GRPC_CLOSURE_INIT(&calld->handle_pending_batch_in_call_combiner[i], - run_pending_batch_in_call_combiner, calld, + "chand=%p calld=%p: starting %" PRIuPTR + " pending batches on subchannel_call=%p", + chand, calld, num_batches, calld->subchannel_call); + } + grpc_transport_stream_op_batch* + batches[GPR_ARRAY_SIZE(calld->pending_batches)]; + size_t num_batches = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + grpc_transport_stream_op_batch* batch = pending->batch; + if (batch != nullptr) { + batches[num_batches++] = batch; + pending_batch_clear(calld, pending); + } + } + for (size_t i = 1; i < num_batches; ++i) { + grpc_transport_stream_op_batch* batch = batches[i]; + batch->handler_private.extra_arg = calld->subchannel_call; + GRPC_CLOSURE_INIT(&batch->handler_private.closure, + resume_pending_batch_in_call_combiner, batch, grpc_schedule_on_exec_ctx); - GRPC_CALL_COMBINER_START( - calld->call_combiner, &calld->handle_pending_batch_in_call_combiner[i], - GRPC_ERROR_NONE, "waiting_for_pick_batches_resume"); + GRPC_CALL_COMBINER_START(calld->call_combiner, + &batch->handler_private.closure, GRPC_ERROR_NONE, + "pending_batches_resume"); } - GPR_ASSERT(calld->initial_metadata_batch != nullptr); - grpc_subchannel_call_process_op(calld->subchannel_call, - calld->initial_metadata_batch); + GPR_ASSERT(num_batches > 0); + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(calld->subchannel_call, batches[0]); } -// Applies service config to the call. Must be invoked once we know -// that the resolver has returned results to the channel. -static void apply_service_config_to_call_locked(grpc_call_element* elem) { +static void maybe_clear_pending_batch(grpc_call_element* elem, + pending_batch* pending) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + grpc_transport_stream_op_batch* batch = pending->batch; + // We clear the pending batch if all of its callbacks have been + // scheduled and reset to nullptr. + if (batch->on_complete == nullptr && + (!batch->recv_initial_metadata || + batch->payload->recv_initial_metadata.recv_initial_metadata_ready == + nullptr) && + (!batch->recv_message || + batch->payload->recv_message.recv_message_ready == nullptr)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: clearing pending batch", chand, + calld); + } + pending_batch_clear(calld, pending); + } +} + +// Returns true if all ops in the pending batch have been completed. +static bool pending_batch_is_completed( + pending_batch* pending, call_data* calld, + subchannel_call_retry_state* retry_state) { + if (pending->batch == nullptr || pending->batch->on_complete == nullptr) { + return false; + } + if (pending->batch->send_initial_metadata && + !retry_state->completed_send_initial_metadata) { + return false; + } + if (pending->batch->send_message && + retry_state->completed_send_message_count < calld->send_messages.size()) { + return false; + } + if (pending->batch->send_trailing_metadata && + !retry_state->completed_send_trailing_metadata) { + return false; + } + if (pending->batch->recv_initial_metadata && + !retry_state->completed_recv_initial_metadata) { + return false; + } + if (pending->batch->recv_message && + retry_state->completed_recv_message_count < + retry_state->started_recv_message_count) { + return false; + } + if (pending->batch->recv_trailing_metadata && + !retry_state->completed_recv_trailing_metadata) { + return false; + } + return true; +} + +// Returns true if any op in the batch was not yet started. +static bool pending_batch_is_unstarted( + pending_batch* pending, call_data* calld, + subchannel_call_retry_state* retry_state) { + if (pending->batch == nullptr || pending->batch->on_complete == nullptr) { + return false; + } + if (pending->batch->send_initial_metadata && + !retry_state->started_send_initial_metadata) { + return true; + } + if (pending->batch->send_message && + retry_state->started_send_message_count < calld->send_messages.size()) { + return true; + } + if (pending->batch->send_trailing_metadata && + !retry_state->started_send_trailing_metadata) { + return true; + } + if (pending->batch->recv_initial_metadata && + !retry_state->started_recv_initial_metadata) { + return true; + } + if (pending->batch->recv_message && + retry_state->completed_recv_message_count == + retry_state->started_recv_message_count) { + return true; + } + if (pending->batch->recv_trailing_metadata && + !retry_state->started_recv_trailing_metadata) { + return true; + } + return false; +} + +// +// retry code +// + +// Commits the call so that no further retry attempts will be performed. +static void retry_commit(grpc_call_element* elem, + subchannel_call_retry_state* retry_state) { channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); + if (calld->retry_committed) return; + calld->retry_committed = true; if (grpc_client_channel_trace.enabled()) { - gpr_log(GPR_DEBUG, "chand=%p calld=%p: applying service config to call", + gpr_log(GPR_DEBUG, "chand=%p calld=%p: committing retries", chand, calld); + } + if (retry_state != nullptr) { + free_cached_send_op_data_after_commit(elem, retry_state); + } +} + +// Starts a retry after appropriate back-off. +static void do_retry(grpc_call_element* elem, + subchannel_call_retry_state* retry_state, + grpc_millis server_pushback_ms) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + GPR_ASSERT(calld->method_params != nullptr); + const ClientChannelMethodParams::RetryPolicy* retry_policy = + calld->method_params->retry_policy(); + GPR_ASSERT(retry_policy != nullptr); + // Reset subchannel call and connected subchannel. + if (calld->subchannel_call != nullptr) { + GRPC_SUBCHANNEL_CALL_UNREF(calld->subchannel_call, + "client_channel_call_retry"); + calld->subchannel_call = nullptr; + } + if (calld->pick.connected_subchannel != nullptr) { + calld->pick.connected_subchannel.reset(); + } + // Compute backoff delay. + grpc_millis next_attempt_time; + if (server_pushback_ms >= 0) { + next_attempt_time = grpc_core::ExecCtx::Get()->Now() + server_pushback_ms; + calld->last_attempt_got_server_pushback = true; + } else { + if (calld->num_attempts_completed == 1 || + calld->last_attempt_got_server_pushback) { + calld->retry_backoff.Init( + grpc_core::BackOff::Options() + .set_initial_backoff(retry_policy->initial_backoff) + .set_multiplier(retry_policy->backoff_multiplier) + .set_jitter(RETRY_BACKOFF_JITTER) + .set_max_backoff(retry_policy->max_backoff)); + calld->last_attempt_got_server_pushback = false; + } + next_attempt_time = calld->retry_backoff->NextAttemptTime(); + } + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: retrying failed call in %" PRIuPTR " ms", chand, + calld, next_attempt_time - grpc_core::ExecCtx::Get()->Now()); + } + // Schedule retry after computed delay. + GRPC_CLOSURE_INIT(&calld->pick_closure, start_pick_locked, elem, + grpc_combiner_scheduler(chand->combiner)); + grpc_timer_init(&calld->retry_timer, next_attempt_time, &calld->pick_closure); + // Update bookkeeping. + if (retry_state != nullptr) retry_state->retry_dispatched = true; +} + +// Returns true if the call is being retried. +static bool maybe_retry(grpc_call_element* elem, + subchannel_batch_data* batch_data, + grpc_status_code status, + grpc_mdelem* server_pushback_md) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + // Get retry policy. + if (calld->method_params == nullptr) return false; + const ClientChannelMethodParams::RetryPolicy* retry_policy = + calld->method_params->retry_policy(); + if (retry_policy == nullptr) return false; + // If we've already dispatched a retry from this call, return true. + // This catches the case where the batch has multiple callbacks + // (i.e., it includes either recv_message or recv_initial_metadata). + subchannel_call_retry_state* retry_state = nullptr; + if (batch_data != nullptr) { + retry_state = static_cast( + grpc_connected_subchannel_call_get_parent_data( + batch_data->subchannel_call)); + if (retry_state->retry_dispatched) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: retry already dispatched", chand, + calld); + } + return true; + } + } + // Check status. + if (status == GRPC_STATUS_OK) { + grpc_server_retry_throttle_data_record_success(calld->retry_throttle_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: call succeeded", chand, calld); + } + return false; + } + // Status is not OK. Check whether the status is retryable. + if (!retry_policy->retryable_status_codes.Contains(status)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: status %s not configured as retryable", chand, + calld, grpc_status_code_to_string(status)); + } + return false; + } + // Record the failure and check whether retries are throttled. + // Note that it's important for this check to come after the status + // code check above, since we should only record failures whose statuses + // match the configured retryable status codes, so that we don't count + // things like failures due to malformed requests (INVALID_ARGUMENT). + // Conversely, it's important for this to come before the remaining + // checks, so that we don't fail to record failures due to other factors. + if (!grpc_server_retry_throttle_data_record_failure( + calld->retry_throttle_data)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: retries throttled", chand, calld); + } + return false; + } + // Check whether the call is committed. + if (calld->retry_committed) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: retries already committed", chand, + calld); + } + return false; + } + // Check whether we have retries remaining. + ++calld->num_attempts_completed; + if (calld->num_attempts_completed >= retry_policy->max_attempts) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: exceeded %d retry attempts", chand, + calld, retry_policy->max_attempts); + } + return false; + } + // If the call was cancelled from the surface, don't retry. + if (calld->cancel_error != GRPC_ERROR_NONE) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: call cancelled from surface, not retrying", + chand, calld); + } + return false; + } + // Check server push-back. + grpc_millis server_pushback_ms = -1; + if (server_pushback_md != nullptr) { + // If the value is "-1" or any other unparseable string, we do not retry. + uint32_t ms; + if (!grpc_parse_slice_to_uint32(GRPC_MDVALUE(*server_pushback_md), &ms)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: not retrying due to server push-back", + chand, calld); + } + return false; + } else { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: server push-back: retry in %u ms", chand, + calld, ms); + } + server_pushback_ms = (grpc_millis)ms; + } + } + do_retry(elem, retry_state, server_pushback_ms); + return true; +} + +// +// subchannel_batch_data +// + +static subchannel_batch_data* batch_data_create(grpc_call_element* elem, + int refcount) { + call_data* calld = static_cast(elem->call_data); + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + calld->subchannel_call)); + subchannel_batch_data* batch_data = static_cast( + gpr_arena_alloc(calld->arena, sizeof(*batch_data))); + batch_data->elem = elem; + batch_data->subchannel_call = + GRPC_SUBCHANNEL_CALL_REF(calld->subchannel_call, "batch_data_create"); + batch_data->batch.payload = &retry_state->batch_payload; + gpr_ref_init(&batch_data->refs, refcount); + GRPC_CLOSURE_INIT(&batch_data->on_complete, on_complete, batch_data, + grpc_schedule_on_exec_ctx); + batch_data->batch.on_complete = &batch_data->on_complete; + GRPC_CALL_STACK_REF(calld->owning_call, "batch_data"); + return batch_data; +} + +static void batch_data_unref(subchannel_batch_data* batch_data) { + if (gpr_unref(&batch_data->refs)) { + if (batch_data->send_initial_metadata_storage != nullptr) { + grpc_metadata_batch_destroy(&batch_data->send_initial_metadata); + } + if (batch_data->send_trailing_metadata_storage != nullptr) { + grpc_metadata_batch_destroy(&batch_data->send_trailing_metadata); + } + if (batch_data->batch.recv_initial_metadata) { + grpc_metadata_batch_destroy(&batch_data->recv_initial_metadata); + } + if (batch_data->batch.recv_trailing_metadata) { + grpc_metadata_batch_destroy(&batch_data->recv_trailing_metadata); + } + GRPC_SUBCHANNEL_CALL_UNREF(batch_data->subchannel_call, "batch_data_unref"); + call_data* calld = static_cast(batch_data->elem->call_data); + GRPC_CALL_STACK_UNREF(calld->owning_call, "batch_data"); + } +} + +// +// recv_initial_metadata callback handling +// + +// Invokes recv_initial_metadata_ready for a subchannel batch. +static void invoke_recv_initial_metadata_callback(void* arg, + grpc_error* error) { + subchannel_batch_data* batch_data = static_cast(arg); + channel_data* chand = + static_cast(batch_data->elem->channel_data); + call_data* calld = static_cast(batch_data->elem->call_data); + // Find pending batch. + pending_batch* pending = nullptr; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + grpc_transport_stream_op_batch* batch = calld->pending_batches[i].batch; + if (batch != nullptr && batch->recv_initial_metadata && + batch->payload->recv_initial_metadata.recv_initial_metadata_ready != + nullptr) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: invoking recv_initial_metadata_ready for " + "pending batch at index %" PRIuPTR, + chand, calld, i); + } + pending = &calld->pending_batches[i]; + break; + } + } + GPR_ASSERT(pending != nullptr); + // Return metadata. + grpc_metadata_batch_move( + &batch_data->recv_initial_metadata, + pending->batch->payload->recv_initial_metadata.recv_initial_metadata); + // Update bookkeeping. + // Note: Need to do this before invoking the callback, since invoking + // the callback will result in yielding the call combiner. + grpc_closure* recv_initial_metadata_ready = + pending->batch->payload->recv_initial_metadata + .recv_initial_metadata_ready; + pending->batch->payload->recv_initial_metadata.recv_initial_metadata_ready = + nullptr; + maybe_clear_pending_batch(batch_data->elem, pending); + batch_data_unref(batch_data); + // Invoke callback. + GRPC_CLOSURE_RUN(recv_initial_metadata_ready, GRPC_ERROR_REF(error)); +} + +// Intercepts recv_initial_metadata_ready callback for retries. +// Commits the call and returns the initial metadata up the stack. +static void recv_initial_metadata_ready(void* arg, grpc_error* error) { + subchannel_batch_data* batch_data = static_cast(arg); + grpc_call_element* elem = batch_data->elem; + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: got recv_initial_metadata_ready, error=%s", + chand, calld, grpc_error_string(error)); + } + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + batch_data->subchannel_call)); + // If we got an error or a Trailers-Only response and have not yet gotten + // the recv_trailing_metadata on_complete callback, then defer + // propagating this callback back to the surface. We can evaluate whether + // to retry when recv_trailing_metadata comes back. + if ((batch_data->trailing_metadata_available || error != GRPC_ERROR_NONE) && + !retry_state->completed_recv_trailing_metadata) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: deferring recv_initial_metadata_ready " + "(Trailers-Only)", + chand, calld); + } + retry_state->recv_initial_metadata_ready_deferred = true; + retry_state->recv_initial_metadata_error = GRPC_ERROR_REF(error); + if (!retry_state->started_recv_trailing_metadata) { + // recv_trailing_metadata not yet started by application; start it + // ourselves to get status. + start_internal_recv_trailing_metadata(elem); + } else { + GRPC_CALL_COMBINER_STOP( + calld->call_combiner, + "recv_initial_metadata_ready trailers-only or error"); + } + return; + } + // Received valid initial metadata, so commit the call. + retry_commit(elem, retry_state); + // Manually invoking a callback function; it does not take ownership of error. + invoke_recv_initial_metadata_callback(batch_data, error); + GRPC_ERROR_UNREF(error); +} + +// +// recv_message callback handling +// + +// Invokes recv_message_ready for a subchannel batch. +static void invoke_recv_message_callback(void* arg, grpc_error* error) { + subchannel_batch_data* batch_data = static_cast(arg); + channel_data* chand = + static_cast(batch_data->elem->channel_data); + call_data* calld = static_cast(batch_data->elem->call_data); + // Find pending op. + pending_batch* pending = nullptr; + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + grpc_transport_stream_op_batch* batch = calld->pending_batches[i].batch; + if (batch != nullptr && batch->recv_message && + batch->payload->recv_message.recv_message_ready != nullptr) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: invoking recv_message_ready for " + "pending batch at index %" PRIuPTR, + chand, calld, i); + } + pending = &calld->pending_batches[i]; + break; + } + } + GPR_ASSERT(pending != nullptr); + // Return payload. + *pending->batch->payload->recv_message.recv_message = + batch_data->recv_message; + // Update bookkeeping. + // Note: Need to do this before invoking the callback, since invoking + // the callback will result in yielding the call combiner. + grpc_closure* recv_message_ready = + pending->batch->payload->recv_message.recv_message_ready; + pending->batch->payload->recv_message.recv_message_ready = nullptr; + maybe_clear_pending_batch(batch_data->elem, pending); + batch_data_unref(batch_data); + // Invoke callback. + GRPC_CLOSURE_RUN(recv_message_ready, GRPC_ERROR_REF(error)); +} + +// Intercepts recv_message_ready callback for retries. +// Commits the call and returns the message up the stack. +static void recv_message_ready(void* arg, grpc_error* error) { + subchannel_batch_data* batch_data = static_cast(arg); + grpc_call_element* elem = batch_data->elem; + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: got recv_message_ready, error=%s", + chand, calld, grpc_error_string(error)); + } + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + batch_data->subchannel_call)); + // If we got an error or the payload was nullptr and we have not yet gotten + // the recv_trailing_metadata on_complete callback, then defer + // propagating this callback back to the surface. We can evaluate whether + // to retry when recv_trailing_metadata comes back. + if ((batch_data->recv_message == nullptr || error != GRPC_ERROR_NONE) && + !retry_state->completed_recv_trailing_metadata) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: deferring recv_message_ready (nullptr " + "message and recv_trailing_metadata pending)", + chand, calld); + } + retry_state->recv_message_ready_deferred = true; + retry_state->recv_message_error = GRPC_ERROR_REF(error); + if (!retry_state->started_recv_trailing_metadata) { + // recv_trailing_metadata not yet started by application; start it + // ourselves to get status. + start_internal_recv_trailing_metadata(elem); + } else { + GRPC_CALL_COMBINER_STOP(calld->call_combiner, "recv_message_ready null"); + } + return; + } + // Received a valid message, so commit the call. + retry_commit(elem, retry_state); + // Manually invoking a callback function; it does not take ownership of error. + invoke_recv_message_callback(batch_data, error); + GRPC_ERROR_UNREF(error); +} + +// +// on_complete callback handling +// + +// Updates retry_state to reflect the ops completed in batch_data. +static void update_retry_state_for_completed_batch( + subchannel_batch_data* batch_data, + subchannel_call_retry_state* retry_state) { + if (batch_data->batch.send_initial_metadata) { + retry_state->completed_send_initial_metadata = true; + } + if (batch_data->batch.send_message) { + ++retry_state->completed_send_message_count; + } + if (batch_data->batch.send_trailing_metadata) { + retry_state->completed_send_trailing_metadata = true; + } + if (batch_data->batch.recv_initial_metadata) { + retry_state->completed_recv_initial_metadata = true; + } + if (batch_data->batch.recv_message) { + ++retry_state->completed_recv_message_count; + } + if (batch_data->batch.recv_trailing_metadata) { + retry_state->completed_recv_trailing_metadata = true; + } +} + +// Represents a closure that needs to run as a result of a completed batch. +typedef struct { + grpc_closure* closure; + grpc_error* error; + const char* reason; +} closure_to_execute; + +// Adds any necessary closures for deferred recv_initial_metadata and +// recv_message callbacks to closures, updating *num_closures as needed. +static void add_closures_for_deferred_recv_callbacks( + subchannel_batch_data* batch_data, subchannel_call_retry_state* retry_state, + closure_to_execute* closures, size_t* num_closures) { + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_initial_metadata_ready_deferred) { + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = + GRPC_CLOSURE_INIT(&batch_data->recv_initial_metadata_ready, + invoke_recv_initial_metadata_callback, batch_data, + grpc_schedule_on_exec_ctx); + closure->error = retry_state->recv_initial_metadata_error; + closure->reason = "resuming recv_initial_metadata_ready"; + } + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_message_ready_deferred) { + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = GRPC_CLOSURE_INIT(&batch_data->recv_message_ready, + invoke_recv_message_callback, + batch_data, grpc_schedule_on_exec_ctx); + closure->error = retry_state->recv_message_error; + closure->reason = "resuming recv_message_ready"; + } +} + +// If there are any cached ops to replay or pending ops to start on the +// subchannel call, adds a closure to closures to invoke +// start_retriable_subchannel_batches(), updating *num_closures as needed. +static void add_closures_for_replay_or_pending_send_ops( + grpc_call_element* elem, subchannel_batch_data* batch_data, + subchannel_call_retry_state* retry_state, closure_to_execute* closures, + size_t* num_closures) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + bool have_pending_send_message_ops = + retry_state->started_send_message_count < calld->send_messages.size(); + bool have_pending_send_trailing_metadata_op = + calld->seen_send_trailing_metadata && + !retry_state->started_send_trailing_metadata; + if (!have_pending_send_message_ops && + !have_pending_send_trailing_metadata_op) { + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + grpc_transport_stream_op_batch* batch = pending->batch; + if (batch == nullptr || pending->send_ops_cached) continue; + if (batch->send_message) have_pending_send_message_ops = true; + if (batch->send_trailing_metadata) { + have_pending_send_trailing_metadata_op = true; + } + } + } + if (have_pending_send_message_ops || have_pending_send_trailing_metadata_op) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: starting next batch for pending send op(s)", + chand, calld); + } + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = GRPC_CLOSURE_INIT( + &batch_data->batch.handler_private.closure, + start_retriable_subchannel_batches, elem, grpc_schedule_on_exec_ctx); + closure->error = GRPC_ERROR_NONE; + closure->reason = "starting next batch for send_* op(s)"; + } +} + +// For any pending batch completed in batch_data, adds the necessary +// completion closures to closures, updating *num_closures as needed. +static void add_closures_for_completed_pending_batches( + grpc_call_element* elem, subchannel_batch_data* batch_data, + subchannel_call_retry_state* retry_state, grpc_error* error, + closure_to_execute* closures, size_t* num_closures) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + if (pending_batch_is_completed(pending, calld, retry_state)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: pending batch completed at index %" PRIuPTR, + chand, calld, i); + } + // Copy the trailing metadata to return it to the surface. + if (batch_data->batch.recv_trailing_metadata) { + grpc_metadata_batch_move(&batch_data->recv_trailing_metadata, + pending->batch->payload->recv_trailing_metadata + .recv_trailing_metadata); + } + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = pending->batch->on_complete; + closure->error = GRPC_ERROR_REF(error); + closure->reason = "on_complete for pending batch"; + pending->batch->on_complete = nullptr; + maybe_clear_pending_batch(elem, pending); + } + } + GRPC_ERROR_UNREF(error); +} + +// For any pending batch containing an op that has not yet been started, +// adds the pending batch's completion closures to closures, updating +// *num_closures as needed. +static void add_closures_to_fail_unstarted_pending_batches( + grpc_call_element* elem, subchannel_call_retry_state* retry_state, + grpc_error* error, closure_to_execute* closures, size_t* num_closures) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + if (pending_batch_is_unstarted(pending, calld, retry_state)) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: failing unstarted pending batch at index " + "%" PRIuPTR, + chand, calld, i); + } + if (pending->batch->recv_initial_metadata) { + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = pending->batch->payload->recv_initial_metadata + .recv_initial_metadata_ready; + closure->error = GRPC_ERROR_REF(error); + closure->reason = + "failing recv_initial_metadata_ready for pending batch"; + pending->batch->payload->recv_initial_metadata + .recv_initial_metadata_ready = nullptr; + } + if (pending->batch->recv_message) { + *pending->batch->payload->recv_message.recv_message = nullptr; + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = + pending->batch->payload->recv_message.recv_message_ready; + closure->error = GRPC_ERROR_REF(error); + closure->reason = "failing recv_message_ready for pending batch"; + pending->batch->payload->recv_message.recv_message_ready = nullptr; + } + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = pending->batch->on_complete; + closure->error = GRPC_ERROR_REF(error); + closure->reason = "failing on_complete for pending batch"; + pending->batch->on_complete = nullptr; + maybe_clear_pending_batch(elem, pending); + } + } + GRPC_ERROR_UNREF(error); +} + +// Callback used to intercept on_complete from subchannel calls. +// Called only when retries are enabled. +static void on_complete(void* arg, grpc_error* error) { + subchannel_batch_data* batch_data = static_cast(arg); + grpc_call_element* elem = batch_data->elem; + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + char* batch_str = grpc_transport_stream_op_batch_string(&batch_data->batch); + gpr_log(GPR_DEBUG, "chand=%p calld=%p: got on_complete, error=%s, batch=%s", + chand, calld, grpc_error_string(error), batch_str); + gpr_free(batch_str); + } + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + batch_data->subchannel_call)); + // If we have previously completed recv_trailing_metadata, then the + // call is finished. + bool call_finished = retry_state->completed_recv_trailing_metadata; + // Update bookkeeping in retry_state. + update_retry_state_for_completed_batch(batch_data, retry_state); + if (call_finished) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: call already finished", chand, + calld); + } + } else { + // Check if this batch finished the call, and if so, get its status. + // The call is finished if either (a) this callback was invoked with + // an error or (b) we receive status. + grpc_status_code status = GRPC_STATUS_OK; + grpc_mdelem* server_pushback_md = nullptr; + if (error != GRPC_ERROR_NONE) { // Case (a). + call_finished = true; + grpc_error_get_status(error, calld->deadline, &status, nullptr, nullptr, + nullptr); + } else if (batch_data->batch.recv_trailing_metadata) { // Case (b). + call_finished = true; + grpc_metadata_batch* md_batch = + batch_data->batch.payload->recv_trailing_metadata + .recv_trailing_metadata; + GPR_ASSERT(md_batch->idx.named.grpc_status != nullptr); + status = grpc_get_status_code_from_metadata( + md_batch->idx.named.grpc_status->md); + if (md_batch->idx.named.grpc_retry_pushback_ms != nullptr) { + server_pushback_md = &md_batch->idx.named.grpc_retry_pushback_ms->md; + } + } else if (retry_state->completed_recv_trailing_metadata) { + call_finished = true; + } + if (call_finished && grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: call finished, status=%s", chand, + calld, grpc_status_code_to_string(status)); + } + // If the call is finished, check if we should retry. + if (call_finished && + maybe_retry(elem, batch_data, status, server_pushback_md)) { + // Unref batch_data for deferred recv_initial_metadata_ready or + // recv_message_ready callbacks, if any. + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_initial_metadata_ready_deferred) { + batch_data_unref(batch_data); + GRPC_ERROR_UNREF(retry_state->recv_initial_metadata_error); + } + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_message_ready_deferred) { + batch_data_unref(batch_data); + GRPC_ERROR_UNREF(retry_state->recv_message_error); + } + batch_data_unref(batch_data); + return; + } + } + // If the call is finished or retries are committed, free cached data for + // send ops that we've just completed. + if (call_finished || calld->retry_committed) { + free_cached_send_op_data_for_completed_batch(elem, batch_data, retry_state); + } + // Call not being retried. + // Construct list of closures to execute. + // Max number of closures is number of pending batches plus one for + // each of: + // - recv_initial_metadata_ready (either deferred or unstarted) + // - recv_message_ready (either deferred or unstarted) + // - starting a new batch for pending send ops + closure_to_execute closures[GPR_ARRAY_SIZE(calld->pending_batches) + 3]; + size_t num_closures = 0; + // If there are deferred recv_initial_metadata_ready or recv_message_ready + // callbacks, add them to closures. + add_closures_for_deferred_recv_callbacks(batch_data, retry_state, closures, + &num_closures); + // Find pending batches whose ops are now complete and add their + // on_complete callbacks to closures. + add_closures_for_completed_pending_batches(elem, batch_data, retry_state, + GRPC_ERROR_REF(error), closures, + &num_closures); + // Add closures to handle any pending batches that have not yet been started. + // If the call is finished, we fail these batches; otherwise, we add a + // callback to start_retriable_subchannel_batches() to start them on + // the subchannel call. + if (call_finished) { + add_closures_to_fail_unstarted_pending_batches( + elem, retry_state, GRPC_ERROR_REF(error), closures, &num_closures); + } else { + add_closures_for_replay_or_pending_send_ops(elem, batch_data, retry_state, + closures, &num_closures); + } + // Don't need batch_data anymore. + batch_data_unref(batch_data); + // Schedule all of the closures identified above. + // Note that the call combiner will be yielded for each closure that + // we schedule. We're already running in the call combiner, so one of + // the closures can be scheduled directly, but the others will + // have to re-enter the call combiner. + if (num_closures > 0) { + GRPC_CLOSURE_SCHED(closures[0].closure, closures[0].error); + for (size_t i = 1; i < num_closures; ++i) { + GRPC_CALL_COMBINER_START(calld->call_combiner, closures[i].closure, + closures[i].error, closures[i].reason); + } + } else { + GRPC_CALL_COMBINER_STOP(calld->call_combiner, + "no closures to run for on_complete"); + } +} + +// +// subchannel batch construction +// + +// Helper function used to start a subchannel batch in the call combiner. +static void start_batch_in_call_combiner(void* arg, grpc_error* ignored) { + grpc_transport_stream_op_batch* batch = + static_cast(arg); + grpc_subchannel_call* subchannel_call = + static_cast(batch->handler_private.extra_arg); + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(subchannel_call, batch); +} + +// Adds retriable send_initial_metadata op to batch_data. +static void add_retriable_send_initial_metadata_op( + call_data* calld, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + // Maps the number of retries to the corresponding metadata value slice. + static const grpc_slice* retry_count_strings[] = { + &GRPC_MDSTR_1, &GRPC_MDSTR_2, &GRPC_MDSTR_3, &GRPC_MDSTR_4}; + // We need to make a copy of the metadata batch for each attempt, since + // the filters in the subchannel stack may modify this batch, and we don't + // want those modifications to be passed forward to subsequent attempts. + // + // If we've already completed one or more attempts, add the + // grpc-retry-attempts header. + batch_data->send_initial_metadata_storage = + static_cast(gpr_arena_alloc( + calld->arena, sizeof(grpc_linked_mdelem) * + (calld->send_initial_metadata.list.count + + (calld->num_attempts_completed > 0)))); + grpc_metadata_batch_copy(&calld->send_initial_metadata, + &batch_data->send_initial_metadata, + batch_data->send_initial_metadata_storage); + if (batch_data->send_initial_metadata.idx.named.grpc_previous_rpc_attempts != + nullptr) { + grpc_metadata_batch_remove( + &batch_data->send_initial_metadata, + batch_data->send_initial_metadata.idx.named.grpc_previous_rpc_attempts); + } + if (calld->num_attempts_completed > 0) { + grpc_mdelem retry_md = grpc_mdelem_from_slices( + GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS, + *retry_count_strings[calld->num_attempts_completed - 1]); + grpc_error* error = grpc_metadata_batch_add_tail( + &batch_data->send_initial_metadata, + &batch_data->send_initial_metadata_storage[calld->send_initial_metadata + .list.count], + retry_md); + if (error != GRPC_ERROR_NONE) { + gpr_log(GPR_ERROR, "error adding retry metadata: %s", + grpc_error_string(error)); + GPR_ASSERT(false); + } + } + retry_state->started_send_initial_metadata = true; + batch_data->batch.send_initial_metadata = true; + batch_data->batch.payload->send_initial_metadata.send_initial_metadata = + &batch_data->send_initial_metadata; + batch_data->batch.payload->send_initial_metadata.send_initial_metadata_flags = + calld->send_initial_metadata_flags; + batch_data->batch.payload->send_initial_metadata.peer_string = + calld->peer_string; +} + +// Adds retriable send_message op to batch_data. +static void add_retriable_send_message_op( + grpc_call_element* elem, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: starting calld->send_messages[%" PRIuPTR "]", + chand, calld, retry_state->started_send_message_count); + } + grpc_byte_stream_cache* cache = + calld->send_messages[retry_state->started_send_message_count]; + ++retry_state->started_send_message_count; + grpc_caching_byte_stream_init(&batch_data->send_message, cache); + batch_data->batch.send_message = true; + batch_data->batch.payload->send_message.send_message = + &batch_data->send_message.base; +} + +// Adds retriable send_trailing_metadata op to batch_data. +static void add_retriable_send_trailing_metadata_op( + call_data* calld, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + // We need to make a copy of the metadata batch for each attempt, since + // the filters in the subchannel stack may modify this batch, and we don't + // want those modifications to be passed forward to subsequent attempts. + batch_data->send_trailing_metadata_storage = + static_cast(gpr_arena_alloc( + calld->arena, sizeof(grpc_linked_mdelem) * + calld->send_trailing_metadata.list.count)); + grpc_metadata_batch_copy(&calld->send_trailing_metadata, + &batch_data->send_trailing_metadata, + batch_data->send_trailing_metadata_storage); + retry_state->started_send_trailing_metadata = true; + batch_data->batch.send_trailing_metadata = true; + batch_data->batch.payload->send_trailing_metadata.send_trailing_metadata = + &batch_data->send_trailing_metadata; +} + +// Adds retriable recv_initial_metadata op to batch_data. +static void add_retriable_recv_initial_metadata_op( + call_data* calld, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + retry_state->started_recv_initial_metadata = true; + batch_data->batch.recv_initial_metadata = true; + grpc_metadata_batch_init(&batch_data->recv_initial_metadata); + batch_data->batch.payload->recv_initial_metadata.recv_initial_metadata = + &batch_data->recv_initial_metadata; + batch_data->batch.payload->recv_initial_metadata.trailing_metadata_available = + &batch_data->trailing_metadata_available; + GRPC_CLOSURE_INIT(&batch_data->recv_initial_metadata_ready, + recv_initial_metadata_ready, batch_data, + grpc_schedule_on_exec_ctx); + batch_data->batch.payload->recv_initial_metadata.recv_initial_metadata_ready = + &batch_data->recv_initial_metadata_ready; +} + +// Adds retriable recv_message op to batch_data. +static void add_retriable_recv_message_op( + call_data* calld, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + ++retry_state->started_recv_message_count; + batch_data->batch.recv_message = true; + batch_data->batch.payload->recv_message.recv_message = + &batch_data->recv_message; + GRPC_CLOSURE_INIT(&batch_data->recv_message_ready, recv_message_ready, + batch_data, grpc_schedule_on_exec_ctx); + batch_data->batch.payload->recv_message.recv_message_ready = + &batch_data->recv_message_ready; +} + +// Adds retriable recv_trailing_metadata op to batch_data. +static void add_retriable_recv_trailing_metadata_op( + call_data* calld, subchannel_call_retry_state* retry_state, + subchannel_batch_data* batch_data) { + retry_state->started_recv_trailing_metadata = true; + batch_data->batch.recv_trailing_metadata = true; + grpc_metadata_batch_init(&batch_data->recv_trailing_metadata); + batch_data->batch.payload->recv_trailing_metadata.recv_trailing_metadata = + &batch_data->recv_trailing_metadata; + batch_data->batch.collect_stats = true; + batch_data->batch.payload->collect_stats.collect_stats = + &batch_data->collect_stats; +} + +// Helper function used to start a recv_trailing_metadata batch. This +// is used in the case where a recv_initial_metadata or recv_message +// op fails in a way that we know the call is over but when the application +// has not yet started its own recv_trailing_metadata op. +static void start_internal_recv_trailing_metadata(grpc_call_element* elem) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: call failed but recv_trailing_metadata not " + "started; starting it internally", chand, calld); } - if (chand->retry_throttle_data != nullptr) { - calld->retry_throttle_data = - grpc_server_retry_throttle_data_ref(chand->retry_throttle_data); + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + calld->subchannel_call)); + subchannel_batch_data* batch_data = batch_data_create(elem, 1); + add_retriable_recv_trailing_metadata_op(calld, retry_state, batch_data); + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(calld->subchannel_call, &batch_data->batch); +} + +// If there are any cached send ops that need to be replayed on the +// current subchannel call, creates and returns a new subchannel batch +// to replay those ops. Otherwise, returns nullptr. +static subchannel_batch_data* maybe_create_subchannel_batch_for_replay( + grpc_call_element* elem, subchannel_call_retry_state* retry_state) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + subchannel_batch_data* replay_batch_data = nullptr; + // send_initial_metadata. + if (calld->seen_send_initial_metadata && + !retry_state->started_send_initial_metadata && + !calld->pending_send_initial_metadata) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: replaying previously completed " + "send_initial_metadata op", + chand, calld); + } + replay_batch_data = batch_data_create(elem, 1); + add_retriable_send_initial_metadata_op(calld, retry_state, + replay_batch_data); + } + // send_message. + // Note that we can only have one send_message op in flight at a time. + if (retry_state->started_send_message_count < calld->send_messages.size() && + retry_state->started_send_message_count == + retry_state->completed_send_message_count && + !calld->pending_send_message) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: replaying previously completed " + "send_message op", + chand, calld); + } + if (replay_batch_data == nullptr) { + replay_batch_data = batch_data_create(elem, 1); + } + add_retriable_send_message_op(elem, retry_state, replay_batch_data); + } + // send_trailing_metadata. + // Note that we only add this op if we have no more send_message ops + // to start, since we can't send down any more send_message ops after + // send_trailing_metadata. + if (calld->seen_send_trailing_metadata && + retry_state->started_send_message_count == calld->send_messages.size() && + !retry_state->started_send_trailing_metadata && + !calld->pending_send_trailing_metadata) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: replaying previously completed " + "send_trailing_metadata op", + chand, calld); + } + if (replay_batch_data == nullptr) { + replay_batch_data = batch_data_create(elem, 1); + } + add_retriable_send_trailing_metadata_op(calld, retry_state, + replay_batch_data); } - if (chand->method_params_table != nullptr) { - calld->method_params = grpc_core::ServiceConfig::MethodConfigTableLookup( - *chand->method_params_table, calld->path); - if (calld->method_params != nullptr) { - // If the deadline from the service config is shorter than the one - // from the client API, reset the deadline timer. - if (chand->deadline_checking_enabled && - calld->method_params->timeout() != 0) { - const grpc_millis per_method_deadline = - grpc_timespec_to_millis_round_up(calld->call_start_time) + - calld->method_params->timeout(); - if (per_method_deadline < calld->deadline) { - calld->deadline = per_method_deadline; - grpc_deadline_state_reset(elem, calld->deadline); - } + return replay_batch_data; +} + +// Adds subchannel batches for pending batches to batches, updating +// *num_batches as needed. +static void add_subchannel_batches_for_pending_batches( + grpc_call_element* elem, subchannel_call_retry_state* retry_state, + grpc_transport_stream_op_batch** batches, size_t* num_batches) { + call_data* calld = static_cast(elem->call_data); + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + pending_batch* pending = &calld->pending_batches[i]; + grpc_transport_stream_op_batch* batch = pending->batch; + if (batch == nullptr) continue; + // Skip any batch that either (a) has already been started on this + // subchannel call or (b) we can't start yet because we're still + // replaying send ops that need to be completed first. + // TODO(roth): Note that if any one op in the batch can't be sent + // yet due to ops that we're replaying, we don't start any of the ops + // in the batch. This is probably okay, but it could conceivably + // lead to increased latency in some cases -- e.g., we could delay + // starting a recv op due to it being in the same batch with a send + // op. If/when we revamp the callback protocol in + // transport_stream_op_batch, we may be able to fix this. + if (batch->send_initial_metadata && + retry_state->started_send_initial_metadata) { + continue; + } + if (batch->send_message && retry_state->completed_send_message_count < + retry_state->started_send_message_count) { + continue; + } + // Note that we only start send_trailing_metadata if we have no more + // send_message ops to start, since we can't send down any more + // send_message ops after send_trailing_metadata. + if (batch->send_trailing_metadata && + (retry_state->started_send_message_count + batch->send_message < + calld->send_messages.size() || + retry_state->started_send_trailing_metadata)) { + continue; + } + if (batch->recv_initial_metadata && + retry_state->started_recv_initial_metadata) { + continue; + } + if (batch->recv_message && retry_state->completed_recv_message_count < + retry_state->started_recv_message_count) { + continue; + } + if (batch->recv_trailing_metadata && + retry_state->started_recv_trailing_metadata) { + continue; + } + // If we're not retrying, just send the batch as-is. + if (calld->method_params == nullptr || + calld->method_params->retry_policy() == nullptr || + calld->retry_committed) { + batches[(*num_batches)++] = batch; + pending_batch_clear(calld, pending); + continue; + } + // Create batch with the right number of callbacks. + const int num_callbacks = + 1 + batch->recv_initial_metadata + batch->recv_message; + subchannel_batch_data* batch_data = batch_data_create(elem, num_callbacks); + // Cache send ops if needed. + maybe_cache_send_ops_for_batch(calld, pending); + // send_initial_metadata. + if (batch->send_initial_metadata) { + add_retriable_send_initial_metadata_op(calld, retry_state, batch_data); + } + // send_message. + if (batch->send_message) { + add_retriable_send_message_op(elem, retry_state, batch_data); + } + // send_trailing_metadata. + if (batch->send_trailing_metadata) { + add_retriable_send_trailing_metadata_op(calld, retry_state, batch_data); + } + // recv_initial_metadata. + if (batch->recv_initial_metadata) { + // recv_flags is only used on the server side. + GPR_ASSERT(batch->payload->recv_initial_metadata.recv_flags == nullptr); + add_retriable_recv_initial_metadata_op(calld, retry_state, batch_data); + } + // recv_message. + if (batch->recv_message) { + add_retriable_recv_message_op(calld, retry_state, batch_data); + } + // recv_trailing_metadata. + if (batch->recv_trailing_metadata) { + GPR_ASSERT(batch->collect_stats); + add_retriable_recv_trailing_metadata_op(calld, retry_state, batch_data); + } + batches[(*num_batches)++] = &batch_data->batch; + } +} + +// Constructs and starts whatever subchannel batches are needed on the +// subchannel call. +static void start_retriable_subchannel_batches(void* arg, grpc_error* ignored) { + grpc_call_element* elem = static_cast(arg); + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: constructing retriable batches", + chand, calld); + } + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + calld->subchannel_call)); + // We can start up to 6 batches. + grpc_transport_stream_op_batch* + batches[GPR_ARRAY_SIZE(calld->pending_batches)]; + size_t num_batches = 0; + // Replay previously-returned send_* ops if needed. + subchannel_batch_data* replay_batch_data = + maybe_create_subchannel_batch_for_replay(elem, retry_state); + if (replay_batch_data != nullptr) { + batches[num_batches++] = &replay_batch_data->batch; + } + // Now add pending batches. + add_subchannel_batches_for_pending_batches(elem, retry_state, batches, + &num_batches); + // Start batches on subchannel call. + // Note that the call combiner will be yielded for each batch that we + // send down. We're already running in the call combiner, so one of + // the batches can be started directly, but the others will have to + // re-enter the call combiner. + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: starting %" PRIuPTR + " retriable batches on subchannel_call=%p", + chand, calld, num_batches, calld->subchannel_call); + } + if (num_batches == 0) { + // This should be fairly rare, but it can happen when (e.g.) an + // attempt completes before it has finished replaying all + // previously sent messages. + GRPC_CALL_COMBINER_STOP(calld->call_combiner, + "no retriable subchannel batches to start"); + } else { + for (size_t i = 1; i < num_batches; ++i) { + if (grpc_client_channel_trace.enabled()) { + char* batch_str = grpc_transport_stream_op_batch_string(batches[i]); + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: starting batch in call combiner: %s", chand, + calld, batch_str); + gpr_free(batch_str); } + batches[i]->handler_private.extra_arg = calld->subchannel_call; + GRPC_CLOSURE_INIT(&batches[i]->handler_private.closure, + start_batch_in_call_combiner, batches[i], + grpc_schedule_on_exec_ctx); + GRPC_CALL_COMBINER_START(calld->call_combiner, + &batches[i]->handler_private.closure, + GRPC_ERROR_NONE, "start_subchannel_batch"); } + if (grpc_client_channel_trace.enabled()) { + char* batch_str = grpc_transport_stream_op_batch_string(batches[0]); + gpr_log(GPR_DEBUG, "chand=%p calld=%p: starting batch: %s", chand, calld, + batch_str); + gpr_free(batch_str); + } + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(calld->subchannel_call, batches[0]); } } -static void create_subchannel_call_locked(grpc_call_element* elem, - grpc_error* error) { +// +// LB pick +// + +static void create_subchannel_call(grpc_call_element* elem, grpc_error* error) { channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); + const size_t parent_data_size = + calld->enable_retries ? sizeof(subchannel_call_retry_state) : 0; const grpc_core::ConnectedSubchannel::CallArgs call_args = { calld->pollent, // pollent calld->path, // path @@ -902,7 +2466,8 @@ static void create_subchannel_call_locked(grpc_call_element* elem, calld->deadline, // deadline calld->arena, // arena calld->pick.subchannel_call_context, // context - calld->call_combiner // call_combiner + calld->call_combiner, // call_combiner + parent_data_size // parent_data_size }; grpc_error* new_error = calld->pick.connected_subchannel->CreateCall( call_args, &calld->subchannel_call); @@ -912,36 +2477,61 @@ static void create_subchannel_call_locked(grpc_call_element* elem, } if (new_error != GRPC_ERROR_NONE) { new_error = grpc_error_add_child(new_error, error); - waiting_for_pick_batches_fail(elem, new_error); + pending_batches_fail(elem, new_error, true /* yield_call_combiner */); } else { - waiting_for_pick_batches_resume(elem); + if (parent_data_size > 0) { + subchannel_call_retry_state* retry_state = + static_cast( + grpc_connected_subchannel_call_get_parent_data( + calld->subchannel_call)); + retry_state->batch_payload.context = calld->pick.subchannel_call_context; + } + pending_batches_resume(elem); } GRPC_ERROR_UNREF(error); } // Invoked when a pick is completed, on both success or failure. -static void pick_done_locked(grpc_call_element* elem, grpc_error* error) { - call_data* calld = static_cast(elem->call_data); +static void pick_done(void* arg, grpc_error* error) { + grpc_call_element* elem = static_cast(arg); channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); if (calld->pick.connected_subchannel == nullptr) { // Failed to create subchannel. - GRPC_ERROR_UNREF(calld->error); - calld->error = error == GRPC_ERROR_NONE - ? GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Call dropped by load balancing policy") - : GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( - "Failed to create subchannel", &error, 1); - if (grpc_client_channel_trace.enabled()) { - gpr_log(GPR_DEBUG, - "chand=%p calld=%p: failed to create subchannel: error=%s", chand, - calld, grpc_error_string(calld->error)); + // If there was no error, this is an LB policy drop, in which case + // we return an error; otherwise, we may retry. + grpc_status_code status = GRPC_STATUS_OK; + grpc_error_get_status(error, calld->deadline, &status, nullptr, nullptr, + nullptr); + if (error == GRPC_ERROR_NONE || !calld->enable_retries || + !maybe_retry(elem, nullptr /* batch_data */, status, + nullptr /* server_pushback_md */)) { + grpc_error* new_error = + error == GRPC_ERROR_NONE + ? GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Call dropped by load balancing policy") + : GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( + "Failed to create subchannel", &error, 1); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: failed to create subchannel: error=%s", + chand, calld, grpc_error_string(new_error)); + } + pending_batches_fail(elem, new_error, true /* yield_call_combiner */); } - waiting_for_pick_batches_fail(elem, GRPC_ERROR_REF(calld->error)); } else { /* Create call on subchannel. */ - create_subchannel_call_locked(elem, GRPC_ERROR_REF(error)); + create_subchannel_call(elem, GRPC_ERROR_REF(error)); } - GRPC_ERROR_UNREF(error); +} + +// Invoked when a pick is completed to leave the client_channel combiner +// and continue processing in the call combiner. +static void pick_done_locked(grpc_call_element* elem, grpc_error* error) { + call_data* calld = static_cast(elem->call_data); + GRPC_CLOSURE_INIT(&calld->pick_closure, pick_done, elem, + grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_SCHED(&calld->pick_closure, error); } // A wrapper around pick_done_locked() that is used in cases where @@ -989,6 +2579,45 @@ static void pick_callback_done_locked(void* arg, grpc_error* error) { GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback"); } +// Applies service config to the call. Must be invoked once we know +// that the resolver has returned results to the channel. +static void apply_service_config_to_call_locked(grpc_call_element* elem) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: applying service config to call", + chand, calld); + } + if (chand->retry_throttle_data != nullptr) { + calld->retry_throttle_data = + grpc_server_retry_throttle_data_ref(chand->retry_throttle_data); + } + if (chand->method_params_table != nullptr) { + calld->method_params = grpc_core::ServiceConfig::MethodConfigTableLookup( + *chand->method_params_table, calld->path); + if (calld->method_params != nullptr) { + // If the deadline from the service config is shorter than the one + // from the client API, reset the deadline timer. + if (chand->deadline_checking_enabled && + calld->method_params->timeout() != 0) { + const grpc_millis per_method_deadline = + grpc_timespec_to_millis_round_up(calld->call_start_time) + + calld->method_params->timeout(); + if (per_method_deadline < calld->deadline) { + calld->deadline = per_method_deadline; + grpc_deadline_state_reset(elem, calld->deadline); + } + } + } + } + // If no retry policy, disable retries. + // TODO(roth): Remove this when adding support for transparent retries. + if (calld->method_params == nullptr || + calld->method_params->retry_policy() == nullptr) { + calld->enable_retries = false; + } +} + // Starts a pick on chand->lb_policy. // Returns true if pick is completed synchronously. static bool pick_callback_start_locked(grpc_call_element* elem) { @@ -998,15 +2627,29 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: starting pick on lb_policy=%p", chand, calld, chand->lb_policy.get()); } - apply_service_config_to_call_locked(elem); + // Only get service config data on the first attempt. + if (calld->num_attempts_completed == 0) { + apply_service_config_to_call_locked(elem); + } // If the application explicitly set wait_for_ready, use that. // Otherwise, if the service config specified a value for this // method, use that. - uint32_t initial_metadata_flags = - calld->initial_metadata_batch->payload->send_initial_metadata - .send_initial_metadata_flags; + // + // The send_initial_metadata batch will be the first one in the list, + // as set by get_batch_index() above. + calld->pick.initial_metadata = + calld->seen_send_initial_metadata + ? &calld->send_initial_metadata + : calld->pending_batches[0] + .batch->payload->send_initial_metadata.send_initial_metadata; + uint32_t send_initial_metadata_flags = + calld->seen_send_initial_metadata + ? calld->send_initial_metadata_flags + : calld->pending_batches[0] + .batch->payload->send_initial_metadata + .send_initial_metadata_flags; const bool wait_for_ready_set_from_api = - initial_metadata_flags & + send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET; const bool wait_for_ready_set_from_service_config = calld->method_params != nullptr && @@ -1015,18 +2658,15 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { if (!wait_for_ready_set_from_api && wait_for_ready_set_from_service_config) { if (calld->method_params->wait_for_ready() == ClientChannelMethodParams::WAIT_FOR_READY_TRUE) { - initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; + send_initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; } else { - initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; + send_initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; } } - calld->pick.initial_metadata = - calld->initial_metadata_batch->payload->send_initial_metadata - .send_initial_metadata; - calld->pick.initial_metadata_flags = initial_metadata_flags; - GRPC_CLOSURE_INIT(&calld->lb_pick_closure, pick_callback_done_locked, elem, + calld->pick.initial_metadata_flags = send_initial_metadata_flags; + GRPC_CLOSURE_INIT(&calld->pick_closure, pick_callback_done_locked, elem, grpc_combiner_scheduler(chand->combiner)); - calld->pick.on_complete = &calld->lb_pick_closure; + calld->pick.on_complete = &calld->pick_closure; GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback"); const bool pick_done = chand->lb_policy->PickLocked(&calld->pick); if (pick_done) { @@ -1040,7 +2680,7 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback_cancel"); grpc_call_combiner_set_notify_on_cancel( calld->call_combiner, - GRPC_CLOSURE_INIT(&calld->lb_pick_cancel_closure, + GRPC_CLOSURE_INIT(&calld->pick_cancel_closure, pick_callback_cancel_locked, elem, grpc_combiner_scheduler(chand->combiner))); } @@ -1089,8 +2729,6 @@ static void pick_after_resolver_result_cancel_locked(void* arg, "Pick cancelled", &error, 1)); } -static void pick_after_resolver_result_start_locked(grpc_call_element* elem); - static void pick_after_resolver_result_done_locked(void* arg, grpc_error* error) { pick_after_resolver_result_args* args = @@ -1127,7 +2765,7 @@ static void pick_after_resolver_result_done_locked(void* arg, async_pick_done_locked(elem, GRPC_ERROR_NONE); } } - // TODO(roth): It should be impossible for chand->lb_policy to be NULL + // TODO(roth): It should be impossible for chand->lb_policy to be nullptr // here, so the rest of this code should never actually be executed. // However, we have reports of a crash on iOS that triggers this case, // so we are temporarily adding this to restore branches that were @@ -1180,6 +2818,7 @@ static void start_pick_locked(void* arg, grpc_error* ignored) { call_data* calld = static_cast(elem->call_data); channel_data* chand = static_cast(elem->channel_data); GPR_ASSERT(calld->pick.connected_subchannel == nullptr); + GPR_ASSERT(calld->subchannel_call == nullptr); if (chand->lb_policy != nullptr) { // We already have an LB policy, so ask it for a pick. if (pick_callback_start_locked(elem)) { @@ -1208,24 +2847,9 @@ static void start_pick_locked(void* arg, grpc_error* ignored) { chand->interested_parties); } -static void on_complete(void* arg, grpc_error* error) { - grpc_call_element* elem = static_cast(arg); - call_data* calld = static_cast(elem->call_data); - if (calld->retry_throttle_data != nullptr) { - if (error == GRPC_ERROR_NONE) { - grpc_server_retry_throttle_data_record_success( - calld->retry_throttle_data); - } else { - // TODO(roth): In a subsequent PR, check the return value here and - // decide whether or not to retry. Note that we should only - // record failures whose statuses match the configured retryable - // or non-fatal status codes. - grpc_server_retry_throttle_data_record_failure( - calld->retry_throttle_data); - } - } - GRPC_CLOSURE_RUN(calld->original_on_complete, GRPC_ERROR_REF(error)); -} +// +// filter call vtable functions +// static void cc_start_transport_stream_op_batch( grpc_call_element* elem, grpc_transport_stream_op_batch* batch) { @@ -1236,46 +2860,47 @@ static void cc_start_transport_stream_op_batch( grpc_deadline_state_client_start_transport_stream_op_batch(elem, batch); } // If we've previously been cancelled, immediately fail any new batches. - if (calld->error != GRPC_ERROR_NONE) { + if (calld->cancel_error != GRPC_ERROR_NONE) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: failing batch with error: %s", - chand, calld, grpc_error_string(calld->error)); + chand, calld, grpc_error_string(calld->cancel_error)); } + // Note: This will release the call combiner. grpc_transport_stream_op_batch_finish_with_failure( - batch, GRPC_ERROR_REF(calld->error), calld->call_combiner); + batch, GRPC_ERROR_REF(calld->cancel_error), calld->call_combiner); return; } + // Handle cancellation. if (batch->cancel_stream) { // Stash a copy of cancel_error in our call data, so that we can use // it for subsequent operations. This ensures that if the call is // cancelled before any batches are passed down (e.g., if the deadline // is in the past when the call starts), we can return the right // error to the caller when the first batch does get passed down. - GRPC_ERROR_UNREF(calld->error); - calld->error = GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error); + GRPC_ERROR_UNREF(calld->cancel_error); + calld->cancel_error = + GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error); if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: recording cancel_error=%s", chand, - calld, grpc_error_string(calld->error)); + calld, grpc_error_string(calld->cancel_error)); } - // If we have a subchannel call, send the cancellation batch down. - // Otherwise, fail all pending batches. - if (calld->subchannel_call != nullptr) { - grpc_subchannel_call_process_op(calld->subchannel_call, batch); + // If we do not have a subchannel call (i.e., a pick has not yet + // been started), fail all pending batches. Otherwise, send the + // cancellation down to the subchannel call. + if (calld->subchannel_call == nullptr) { + pending_batches_fail(elem, GRPC_ERROR_REF(calld->cancel_error), + false /* yield_call_combiner */); + // Note: This will release the call combiner. + grpc_transport_stream_op_batch_finish_with_failure( + batch, GRPC_ERROR_REF(calld->cancel_error), calld->call_combiner); } else { - waiting_for_pick_batches_add(calld, batch); - waiting_for_pick_batches_fail(elem, GRPC_ERROR_REF(calld->error)); + // Note: This will release the call combiner. + grpc_subchannel_call_process_op(calld->subchannel_call, batch); } return; } - // Intercept on_complete for recv_trailing_metadata so that we can - // check retry throttle status. - if (batch->recv_trailing_metadata) { - GPR_ASSERT(batch->on_complete != nullptr); - calld->original_on_complete = batch->on_complete; - GRPC_CLOSURE_INIT(&calld->on_complete, on_complete, elem, - grpc_schedule_on_exec_ctx); - batch->on_complete = &calld->on_complete; - } + // Add the batch to the pending list. + pending_batches_add(elem, batch); // Check if we've already gotten a subchannel call. // Note that once we have completed the pick, we do not need to enter // the channel combiner, which is more efficient (especially for @@ -1283,15 +2908,13 @@ static void cc_start_transport_stream_op_batch( if (calld->subchannel_call != nullptr) { if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, - "chand=%p calld=%p: sending batch to subchannel_call=%p", chand, + "chand=%p calld=%p: starting batch on subchannel_call=%p", chand, calld, calld->subchannel_call); } - grpc_subchannel_call_process_op(calld->subchannel_call, batch); + pending_batches_resume(elem); return; } // We do not yet have a subchannel call. - // Add the batch to the waiting-for-pick list. - waiting_for_pick_batches_add(calld, batch); // For batches containing a send_initial_metadata op, enter the channel // combiner to start a pick. if (batch->send_initial_metadata) { @@ -1331,6 +2954,7 @@ static grpc_error* cc_init_call_elem(grpc_call_element* elem, grpc_deadline_state_init(elem, args->call_stack, args->call_combiner, calld->deadline); } + calld->enable_retries = chand->enable_retries; return GRPC_ERROR_NONE; } @@ -1345,7 +2969,7 @@ static void cc_destroy_call_elem(grpc_call_element* elem, } grpc_slice_unref_internal(calld->path); calld->method_params.reset(); - GRPC_ERROR_UNREF(calld->error); + GRPC_ERROR_UNREF(calld->cancel_error); if (calld->subchannel_call != nullptr) { grpc_subchannel_call_set_cleanup_closure(calld->subchannel_call, then_schedule_closure); @@ -1353,7 +2977,9 @@ static void cc_destroy_call_elem(grpc_call_element* elem, GRPC_SUBCHANNEL_CALL_UNREF(calld->subchannel_call, "client_channel_destroy_call"); } - GPR_ASSERT(calld->waiting_for_pick_batches_count == 0); + for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { + GPR_ASSERT(calld->pending_batches[i].batch == nullptr); + } if (calld->pick.connected_subchannel != nullptr) { calld->pick.connected_subchannel.reset(); } @@ -1553,3 +3179,9 @@ void grpc_client_channel_watch_connectivity_state( grpc_combiner_scheduler(chand->combiner)), GRPC_ERROR_NONE); } + +grpc_subchannel_call* grpc_client_channel_get_subchannel_call( + grpc_call_element* elem) { + call_data* calld = static_cast(elem->call_data); + return calld->subchannel_call; +} diff --git a/src/core/ext/filters/client_channel/method_params.cc b/src/core/ext/filters/client_channel/method_params.cc index 72456160b1..374b87e170 100644 --- a/src/core/ext/filters/client_channel/method_params.cc +++ b/src/core/ext/filters/client_channel/method_params.cc @@ -26,9 +26,13 @@ #include #include "src/core/ext/filters/client_channel/method_params.h" +#include "src/core/ext/filters/client_channel/status_util.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/memory.h" +// As per the retry design, we do not allow more than 5 retry attempts. +#define MAX_MAX_RETRY_ATTEMPTS 5 + namespace grpc_core { namespace internal { @@ -46,7 +50,8 @@ bool ParseWaitForReady( } // Parses a JSON field of the form generated for a google.proto.Duration -// proto message. +// proto message, as per: +// https://developers.google.com/protocol-buffers/docs/proto3#json bool ParseDuration(grpc_json* field, grpc_millis* duration) { if (field->type != GRPC_JSON_STRING) return false; size_t len = strlen(field->value); @@ -61,7 +66,7 @@ bool ParseDuration(grpc_json* field, grpc_millis* duration) { if (nanos == -1) { return false; } - int num_digits = (int)strlen(decimal_point + 1); + int num_digits = static_cast(strlen(decimal_point + 1)); if (num_digits > 9) { // We don't accept greater precision than nanos. return false; } @@ -76,6 +81,70 @@ bool ParseDuration(grpc_json* field, grpc_millis* duration) { return true; } +UniquePtr ParseRetryPolicy( + grpc_json* field) { + auto retry_policy = MakeUnique(); + if (field->type != GRPC_JSON_OBJECT) return nullptr; + for (grpc_json* sub_field = field->child; sub_field != nullptr; + sub_field = sub_field->next) { + if (sub_field->key == nullptr) return nullptr; + if (strcmp(sub_field->key, "maxAttempts") == 0) { + if (retry_policy->max_attempts != 0) return nullptr; // Duplicate. + if (sub_field->type != GRPC_JSON_NUMBER) return nullptr; + retry_policy->max_attempts = gpr_parse_nonnegative_int(sub_field->value); + if (retry_policy->max_attempts <= 1) return nullptr; + if (retry_policy->max_attempts > MAX_MAX_RETRY_ATTEMPTS) { + gpr_log(GPR_ERROR, + "service config: clamped retryPolicy.maxAttempts at %d", + MAX_MAX_RETRY_ATTEMPTS); + retry_policy->max_attempts = MAX_MAX_RETRY_ATTEMPTS; + } + } else if (strcmp(sub_field->key, "initialBackoff") == 0) { + if (retry_policy->initial_backoff > 0) return nullptr; // Duplicate. + if (!ParseDuration(sub_field, &retry_policy->initial_backoff)) { + return nullptr; + } + if (retry_policy->initial_backoff == 0) return nullptr; + } else if (strcmp(sub_field->key, "maxBackoff") == 0) { + if (retry_policy->max_backoff > 0) return nullptr; // Duplicate. + if (!ParseDuration(sub_field, &retry_policy->max_backoff)) { + return nullptr; + } + if (retry_policy->max_backoff == 0) return nullptr; + } else if (strcmp(sub_field->key, "backoffMultiplier") == 0) { + if (retry_policy->backoff_multiplier != 0) return nullptr; // Duplicate. + if (sub_field->type != GRPC_JSON_NUMBER) return nullptr; + if (sscanf(sub_field->value, "%f", &retry_policy->backoff_multiplier) != + 1) { + return nullptr; + } + if (retry_policy->backoff_multiplier <= 0) return nullptr; + } else if (strcmp(sub_field->key, "retryableStatusCodes") == 0) { + if (!retry_policy->retryable_status_codes.Empty()) { + return nullptr; // Duplicate. + } + if (sub_field->type != GRPC_JSON_ARRAY) return nullptr; + for (grpc_json* element = sub_field->child; element != nullptr; + element = element->next) { + if (element->type != GRPC_JSON_STRING) return nullptr; + grpc_status_code status; + if (!grpc_status_code_from_string(element->value, &status)) { + return nullptr; + } + retry_policy->retryable_status_codes.Add(status); + } + if (retry_policy->retryable_status_codes.Empty()) return nullptr; + } + } + // Make sure required fields are set. + if (retry_policy->max_attempts == 0 || retry_policy->initial_backoff == 0 || + retry_policy->max_backoff == 0 || retry_policy->backoff_multiplier == 0 || + retry_policy->retryable_status_codes.Empty()) { + return nullptr; + } + return retry_policy; +} + } // namespace RefCountedPtr @@ -94,6 +163,12 @@ ClientChannelMethodParams::CreateFromJson(const grpc_json* json) { } else if (strcmp(field->key, "timeout") == 0) { if (method_params->timeout_ > 0) return nullptr; // Duplicate. if (!ParseDuration(field, &method_params->timeout_)) return nullptr; + } else if (strcmp(field->key, "retryPolicy") == 0) { + if (method_params->retry_policy_ != nullptr) { + return nullptr; // Duplicate. + } + method_params->retry_policy_ = ParseRetryPolicy(field); + if (method_params->retry_policy_ == nullptr) return nullptr; } } return method_params; diff --git a/src/core/ext/filters/client_channel/method_params.h b/src/core/ext/filters/client_channel/method_params.h index b003d53eeb..48ece29867 100644 --- a/src/core/ext/filters/client_channel/method_params.h +++ b/src/core/ext/filters/client_channel/method_params.h @@ -21,6 +21,7 @@ #include +#include "src/core/ext/filters/client_channel/status_util.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" // for grpc_millis @@ -37,6 +38,14 @@ class ClientChannelMethodParams : public RefCounted { WAIT_FOR_READY_TRUE }; + struct RetryPolicy { + int max_attempts = 0; + grpc_millis initial_backoff = 0; + grpc_millis max_backoff = 0; + float backoff_multiplier = 0; + StatusCodeSet retryable_status_codes; + }; + /// Creates a method_parameters object from \a json. /// Intended for use with ServiceConfig::CreateMethodConfigTable(). static RefCountedPtr CreateFromJson( @@ -44,6 +53,7 @@ class ClientChannelMethodParams : public RefCounted { grpc_millis timeout() const { return timeout_; } WaitForReady wait_for_ready() const { return wait_for_ready_; } + const RetryPolicy* retry_policy() const { return retry_policy_.get(); } private: // So New() can call our private ctor. @@ -55,6 +65,7 @@ class ClientChannelMethodParams : public RefCounted { grpc_millis timeout_ = 0; WaitForReady wait_for_ready_ = WAIT_FOR_READY_UNSET; + UniquePtr retry_policy_; }; } // namespace internal diff --git a/src/core/ext/filters/client_channel/retry_throttle.cc b/src/core/ext/filters/client_channel/retry_throttle.cc index 450a332342..45de6667c8 100644 --- a/src/core/ext/filters/client_channel/retry_throttle.cc +++ b/src/core/ext/filters/client_channel/retry_throttle.cc @@ -40,7 +40,7 @@ struct grpc_server_retry_throttle_data { int milli_token_ratio; gpr_atm milli_tokens; // A pointer to the replacement for this grpc_server_retry_throttle_data - // entry. If non-NULL, then this entry is stale and must not be used. + // entry. If non-nullptr, then this entry is stale and must not be used. // We hold a reference to the replacement. gpr_atm replacement; }; @@ -58,6 +58,7 @@ static void get_replacement_throttle_data_if_needed( bool grpc_server_retry_throttle_data_record_failure( grpc_server_retry_throttle_data* throttle_data) { + if (throttle_data == nullptr) return true; // First, check if we are stale and need to be replaced. get_replacement_throttle_data_if_needed(&throttle_data); // We decrement milli_tokens by 1000 (1 token) for each failure. @@ -72,6 +73,7 @@ bool grpc_server_retry_throttle_data_record_failure( void grpc_server_retry_throttle_data_record_success( grpc_server_retry_throttle_data* throttle_data) { + if (throttle_data == nullptr) return; // First, check if we are stale and need to be replaced. get_replacement_throttle_data_if_needed(&throttle_data); // We increment milli_tokens by milli_token_ratio for each success. diff --git a/src/core/ext/filters/client_channel/status_util.cc b/src/core/ext/filters/client_channel/status_util.cc new file mode 100644 index 0000000000..11f732ab44 --- /dev/null +++ b/src/core/ext/filters/client_channel/status_util.cc @@ -0,0 +1,100 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include "src/core/ext/filters/client_channel/status_util.h" + +#include "src/core/lib/gpr/useful.h" + +typedef struct { + const char* str; + grpc_status_code status; +} status_string_entry; + +static const status_string_entry g_status_string_entries[] = { + {"OK", GRPC_STATUS_OK}, + {"CANCELLED", GRPC_STATUS_CANCELLED}, + {"UNKNOWN", GRPC_STATUS_UNKNOWN}, + {"INVALID_ARGUMENT", GRPC_STATUS_INVALID_ARGUMENT}, + {"DEADLINE_EXCEEDED", GRPC_STATUS_DEADLINE_EXCEEDED}, + {"NOT_FOUND", GRPC_STATUS_NOT_FOUND}, + {"ALREADY_EXISTS", GRPC_STATUS_ALREADY_EXISTS}, + {"PERMISSION_DENIED", GRPC_STATUS_PERMISSION_DENIED}, + {"UNAUTHENTICATED", GRPC_STATUS_UNAUTHENTICATED}, + {"RESOURCE_EXHAUSTED", GRPC_STATUS_RESOURCE_EXHAUSTED}, + {"FAILED_PRECONDITION", GRPC_STATUS_FAILED_PRECONDITION}, + {"ABORTED", GRPC_STATUS_ABORTED}, + {"OUT_OF_RANGE", GRPC_STATUS_OUT_OF_RANGE}, + {"UNIMPLEMENTED", GRPC_STATUS_UNIMPLEMENTED}, + {"INTERNAL", GRPC_STATUS_INTERNAL}, + {"UNAVAILABLE", GRPC_STATUS_UNAVAILABLE}, + {"DATA_LOSS", GRPC_STATUS_DATA_LOSS}, +}; + +bool grpc_status_code_from_string(const char* status_str, + grpc_status_code* status) { + for (size_t i = 0; i < GPR_ARRAY_SIZE(g_status_string_entries); ++i) { + if (strcmp(status_str, g_status_string_entries[i].str) == 0) { + *status = g_status_string_entries[i].status; + return true; + } + } + return false; +} + +const char* grpc_status_code_to_string(grpc_status_code status) { + switch (status) { + case GRPC_STATUS_OK: + return "OK"; + case GRPC_STATUS_CANCELLED: + return "CANCELLED"; + case GRPC_STATUS_UNKNOWN: + return "UNKNOWN"; + case GRPC_STATUS_INVALID_ARGUMENT: + return "INVALID_ARGUMENT"; + case GRPC_STATUS_DEADLINE_EXCEEDED: + return "DEADLINE_EXCEEDED"; + case GRPC_STATUS_NOT_FOUND: + return "NOT_FOUND"; + case GRPC_STATUS_ALREADY_EXISTS: + return "ALREADY_EXISTS"; + case GRPC_STATUS_PERMISSION_DENIED: + return "PERMISSION_DENIED"; + case GRPC_STATUS_UNAUTHENTICATED: + return "UNAUTHENTICATED"; + case GRPC_STATUS_RESOURCE_EXHAUSTED: + return "RESOURCE_EXHAUSTED"; + case GRPC_STATUS_FAILED_PRECONDITION: + return "FAILED_PRECONDITION"; + case GRPC_STATUS_ABORTED: + return "ABORTED"; + case GRPC_STATUS_OUT_OF_RANGE: + return "OUT_OF_RANGE"; + case GRPC_STATUS_UNIMPLEMENTED: + return "UNIMPLEMENTED"; + case GRPC_STATUS_INTERNAL: + return "INTERNAL"; + case GRPC_STATUS_UNAVAILABLE: + return "UNAVAILABLE"; + case GRPC_STATUS_DATA_LOSS: + return "DATA_LOSS"; + default: + return "UNKNOWN"; + } +} diff --git a/src/core/ext/filters/client_channel/status_util.h b/src/core/ext/filters/client_channel/status_util.h new file mode 100644 index 0000000000..e018709730 --- /dev/null +++ b/src/core/ext/filters/client_channel/status_util.h @@ -0,0 +1,58 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_STATUS_UTIL_H +#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_STATUS_UTIL_H + +#include + +#include + +#include +#include + +/// If \a status_str is a valid status string, sets \a status to the +/// corresponding status value and returns true. +bool grpc_status_code_from_string(const char* status_str, + grpc_status_code* status); + +/// Returns the string form of \a status, or "UNKNOWN" if invalid. +const char* grpc_status_code_to_string(grpc_status_code status); + +namespace grpc_core { +namespace internal { + +/// A set of grpc_status_code values. +class StatusCodeSet { + public: + bool Empty() const { return status_code_mask_ == 0; } + + void Add(grpc_status_code status) { status_code_mask_ |= (1 << status); } + + bool Contains(grpc_status_code status) const { + return status_code_mask_ & (1 << status); + } + + private: + int status_code_mask_ = 0; // A bitfield of status codes in the set. +}; + +} // namespace internal +} // namespace grpc_core + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_STATUS_UTIL_H */ diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index 1304b4a6ad..cae7cc35e3 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -659,7 +659,6 @@ static void on_subchannel_connected(void* arg, grpc_error* error) { static void subchannel_call_destroy(void* call, grpc_error* error) { GPR_TIMER_SCOPE("grpc_subchannel_call_unref.destroy", 0); grpc_subchannel_call* c = static_cast(call); - GPR_ASSERT(c->schedule_closure_after_destroy != nullptr); grpc_core::ConnectedSubchannel* connection = c->connection; grpc_call_stack_destroy(SUBCHANNEL_CALL_TO_CALL_STACK(c), nullptr, c->schedule_closure_after_destroy); @@ -673,9 +672,10 @@ void grpc_subchannel_call_set_cleanup_closure(grpc_subchannel_call* call, call->schedule_closure_after_destroy = closure; } -void grpc_subchannel_call_ref( +grpc_subchannel_call* grpc_subchannel_call_ref( grpc_subchannel_call* c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { GRPC_CALL_STACK_REF(SUBCHANNEL_CALL_TO_CALL_STACK(c), REF_REASON); + return c; } void grpc_subchannel_call_unref( @@ -705,6 +705,13 @@ const grpc_subchannel_key* grpc_subchannel_get_key( return subchannel->key; } +void* grpc_connected_subchannel_call_get_parent_data( + grpc_subchannel_call* subchannel_call) { + grpc_channel_stack* chanstk = subchannel_call->connection->channel_stack(); + return (char*)subchannel_call + sizeof(grpc_subchannel_call) + + chanstk->call_stack_size; +} + grpc_call_stack* grpc_subchannel_call_get_call_stack( grpc_subchannel_call* subchannel_call) { return SUBCHANNEL_CALL_TO_CALL_STACK(subchannel_call); @@ -776,8 +783,8 @@ void ConnectedSubchannel::Ping(grpc_closure* on_initiate, grpc_error* ConnectedSubchannel::CreateCall(const CallArgs& args, grpc_subchannel_call** call) { *call = static_cast(gpr_arena_alloc( - args.arena, - sizeof(grpc_subchannel_call) + channel_stack_->call_stack_size)); + args.arena, sizeof(grpc_subchannel_call) + + channel_stack_->call_stack_size + args.parent_data_size)); grpc_call_stack* callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call); RefCountedPtr connection = Ref(DEBUG_LOCATION, "subchannel_call"); diff --git a/src/core/ext/filters/client_channel/subchannel.h b/src/core/ext/filters/client_channel/subchannel.h index 7f997d9924..e23aec12df 100644 --- a/src/core/ext/filters/client_channel/subchannel.h +++ b/src/core/ext/filters/client_channel/subchannel.h @@ -81,6 +81,7 @@ class ConnectedSubchannel : public RefCountedWithTracing { gpr_arena* arena; grpc_call_context_element* context; grpc_call_combiner* call_combiner; + size_t parent_data_size; }; explicit ConnectedSubchannel(grpc_channel_stack* channel_stack); @@ -109,11 +110,17 @@ grpc_subchannel* grpc_subchannel_weak_ref( grpc_subchannel* channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_weak_unref( grpc_subchannel* channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -void grpc_subchannel_call_ref( +grpc_subchannel_call* grpc_subchannel_call_ref( grpc_subchannel_call* call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_call_unref( grpc_subchannel_call* call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +/** Returns a pointer to the parent data associated with \a subchannel_call. + The data will be of the size specified in \a parent_data_size + field of the args passed to \a grpc_connected_subchannel_create_call(). */ +void* grpc_connected_subchannel_call_get_parent_data( + grpc_subchannel_call* subchannel_call); + /** poll the current connectivity state of a channel */ grpc_connectivity_state grpc_subchannel_check_connectivity( grpc_subchannel* channel, grpc_error** error); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 89115b66ed..df3fb8c68c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -1456,8 +1456,10 @@ static void perform_stream_op_locked(void* stream_op, } } if (op_payload->send_initial_metadata.peer_string != nullptr) { - gpr_atm_rel_store(op_payload->send_initial_metadata.peer_string, - (gpr_atm)gpr_strdup(t->peer_string)); + char* old_peer_string = (char*)gpr_atm_full_xchg( + op_payload->send_initial_metadata.peer_string, + (gpr_atm)gpr_strdup(t->peer_string)); + gpr_free(old_peer_string); } } @@ -1571,8 +1573,10 @@ static void perform_stream_op_locked(void* stream_op, s->trailing_metadata_available = op_payload->recv_initial_metadata.trailing_metadata_available; if (op_payload->recv_initial_metadata.peer_string != nullptr) { - gpr_atm_rel_store(op_payload->recv_initial_metadata.peer_string, - (gpr_atm)gpr_strdup(t->peer_string)); + char* old_peer_string = (char*)gpr_atm_full_xchg( + op_payload->recv_initial_metadata.peer_string, + (gpr_atm)gpr_strdup(t->peer_string)); + gpr_free(old_peer_string); } grpc_chttp2_maybe_complete_recv_initial_metadata(t, s); } diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.cc b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc index 58d77b932f..4d7dfd900f 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc @@ -69,6 +69,5 @@ void grpc_chttp2_incoming_metadata_buffer_set_deadline( void grpc_chttp2_incoming_metadata_buffer_publish( grpc_chttp2_incoming_metadata_buffer* buffer, grpc_metadata_batch* batch) { - *batch = buffer->batch; - grpc_metadata_batch_init(&buffer->batch); + grpc_metadata_batch_move(&buffer->batch, batch); } diff --git a/src/core/lib/gpr/arena.cc b/src/core/lib/gpr/arena.cc index 444bb3d719..b02c5b9fb6 100644 --- a/src/core/lib/gpr/arena.cc +++ b/src/core/lib/gpr/arena.cc @@ -26,6 +26,49 @@ #include #include +// Uncomment this to use a simple arena that simply allocates the +// requested amount of memory for each call to gpr_arena_alloc(). This +// effectively eliminates the efficiency gain of using an arena, but it +// may be useful for debugging purposes. +//#define SIMPLE_ARENA_FOR_DEBUGGING + +#ifdef SIMPLE_ARENA_FOR_DEBUGGING + +#include + +struct gpr_arena { + gpr_mu mu; + void** ptrs; + size_t num_ptrs; +}; + +gpr_arena* gpr_arena_create(size_t ignored_initial_size) { + gpr_arena* arena = (gpr_arena*)gpr_zalloc(sizeof(*arena)); + gpr_mu_init(&arena->mu); + return arena; +} + +size_t gpr_arena_destroy(gpr_arena* arena) { + gpr_mu_destroy(&arena->mu); + for (size_t i = 0; i < arena->num_ptrs; ++i) { + gpr_free(arena->ptrs[i]); + } + gpr_free(arena->ptrs); + gpr_free(arena); + return 1; // Value doesn't matter, since it won't be used. +} + +void* gpr_arena_alloc(gpr_arena* arena, size_t size) { + gpr_mu_lock(&arena->mu); + arena->ptrs = + (void**)gpr_realloc(arena->ptrs, sizeof(void*) * (arena->num_ptrs + 1)); + void* retval = arena->ptrs[arena->num_ptrs++] = gpr_zalloc(size); + gpr_mu_unlock(&arena->mu); + return retval; +} + +#else // SIMPLE_ARENA_FOR_DEBUGGING + // TODO(roth): We currently assume that all callers need alignment of 16 // bytes, which may be wrong in some cases. As part of converting the // arena API to C++, we should consider replacing gpr_arena_alloc() with a @@ -105,3 +148,5 @@ void* gpr_arena_alloc(gpr_arena* arena, size_t size) { ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(zone)); return ptr + start - z->size_begin; } + +#endif // SIMPLE_ARENA_FOR_DEBUGGING diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 3df745652a..c4844da318 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -50,6 +50,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" +#include "src/core/lib/transport/status_metadata.h" #include "src/core/lib/transport/transport.h" /** The maximum number of concurrent batches possible. @@ -976,32 +977,6 @@ static int prepare_application_metadata(grpc_call* call, int count, return 1; } -/* we offset status by a small amount when storing it into transport metadata - as metadata cannot store a 0 value (which is used as OK for grpc_status_codes - */ -#define STATUS_OFFSET 1 -static void destroy_status(void* ignored) {} - -static uint32_t decode_status(grpc_mdelem md) { - uint32_t status; - void* user_data; - if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_0)) return 0; - if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_1)) return 1; - if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_2)) return 2; - user_data = grpc_mdelem_get_user_data(md, destroy_status); - if (user_data != nullptr) { - status = (static_cast((intptr_t)user_data)) - STATUS_OFFSET; - } else { - if (!grpc_parse_slice_to_uint32(GRPC_MDVALUE(md), &status)) { - status = GRPC_STATUS_UNKNOWN; /* could not parse status code */ - } - grpc_mdelem_set_user_data( - md, destroy_status, - (void*)static_cast(status + STATUS_OFFSET)); - } - return status; -} - static grpc_message_compression_algorithm decode_message_compression( grpc_mdelem md) { grpc_message_compression_algorithm algorithm = @@ -1093,7 +1068,8 @@ static void recv_initial_filter(grpc_call* call, grpc_metadata_batch* b) { static void recv_trailing_filter(void* args, grpc_metadata_batch* b) { grpc_call* call = static_cast(args); if (b->idx.named.grpc_status != nullptr) { - uint32_t status_code = decode_status(b->idx.named.grpc_status->md); + grpc_status_code status_code = + grpc_get_status_code_from_metadata(b->idx.named.grpc_status->md); grpc_error* error = status_code == GRPC_STATUS_OK ? GRPC_ERROR_NONE diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc index b23f516516..49740fcd1e 100644 --- a/src/core/lib/transport/metadata_batch.cc +++ b/src/core/lib/transport/metadata_batch.cc @@ -303,3 +303,27 @@ grpc_error* grpc_metadata_batch_filter(grpc_metadata_batch* batch, } return error; } + +void grpc_metadata_batch_copy(grpc_metadata_batch* src, + grpc_metadata_batch* dst, + grpc_linked_mdelem* storage) { + grpc_metadata_batch_init(dst); + dst->deadline = src->deadline; + size_t i = 0; + for (grpc_linked_mdelem* elem = src->list.head; elem != nullptr; + elem = elem->next) { + grpc_error* error = grpc_metadata_batch_add_tail(dst, &storage[i++], + GRPC_MDELEM_REF(elem->md)); + // The only way that grpc_metadata_batch_add_tail() can fail is if + // there's a duplicate entry for a callout. However, that can't be + // the case here, because we would not have been allowed to create + // a source batch that had that kind of conflict. + GPR_ASSERT(error == GRPC_ERROR_NONE); + } +} + +void grpc_metadata_batch_move(grpc_metadata_batch* src, + grpc_metadata_batch* dst) { + *dst = *src; + grpc_metadata_batch_init(src); +} diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 06fc9ade7e..3876063b52 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -137,4 +137,13 @@ void grpc_metadata_batch_assert_ok(grpc_metadata_batch* comd); } while (0) #endif +/// Copies \a src to \a dst. \a storage must point to an array of +/// \a grpc_linked_mdelem structs of at least the same size as \a src. +void grpc_metadata_batch_copy(grpc_metadata_batch* src, + grpc_metadata_batch* dst, + grpc_linked_mdelem* storage); + +void grpc_metadata_batch_move(grpc_metadata_batch* src, + grpc_metadata_batch* dst); + #endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */ diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index 0e11b6e4e4..6a5144f21a 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -50,61 +50,64 @@ static uint8_t g_bytes[] = { 114, 110, 97, 108, 45, 115, 116, 114, 101, 97, 109, 45, 101, 110, 99, 111, 100, 105, 110, 103, 45, 114, 101, 113, 117, 101, 115, 116, 117, 115, 101, 114, 45, 97, 103, 101, 110, 116, 104, 111, 115, 116, 108, 98, 45, - 116, 111, 107, 101, 110, 103, 114, 112, 99, 45, 116, 105, 109, 101, 111, - 117, 116, 103, 114, 112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, - 95, 114, 101, 97, 100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, - 111, 117, 116, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, - 117, 101, 115, 116, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, - 116, 101, 115, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, - 112, 111, 110, 115, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, - 121, 116, 101, 115, 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, - 46, 76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, - 97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 100, 101, 102, 108, 97, - 116, 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, - 105, 112, 48, 49, 50, 105, 100, 101, 110, 116, 105, 116, 121, 116, 114, - 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, 105, - 111, 110, 47, 103, 114, 112, 99, 80, 79, 83, 84, 50, 48, 48, 52, - 48, 52, 104, 116, 116, 112, 104, 116, 116, 112, 115, 103, 114, 112, 99, - 71, 69, 84, 80, 85, 84, 47, 47, 105, 110, 100, 101, 120, 46, 104, - 116, 109, 108, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, - 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, 115, - 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, 101, - 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, - 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, 99, - 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, 116, - 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, 105, - 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, 114, - 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, 111, - 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, 105, - 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, - 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, 101, - 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, 110, - 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, 101, - 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, 100, - 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, 120, - 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, 116, - 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, - 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, 116, - 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, 110, - 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 108, - 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 98, 45, - 99, 111, 115, 116, 45, 98, 105, 110, 108, 105, 110, 107, 108, 111, 99, - 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, - 100, 115, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116, - 105, 99, 97, 116, 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, - 111, 114, 105, 122, 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114, - 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, - 116, 114, 121, 45, 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114, - 115, 101, 116, 45, 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99, - 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, - 117, 114, 105, 116, 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, - 110, 99, 111, 100, 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119, - 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, - 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, - 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, - 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, - 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, - 105, 112}; + 116, 111, 107, 101, 110, 103, 114, 112, 99, 45, 112, 114, 101, 118, 105, + 111, 117, 115, 45, 114, 112, 99, 45, 97, 116, 116, 101, 109, 112, 116, + 115, 103, 114, 112, 99, 45, 114, 101, 116, 114, 121, 45, 112, 117, 115, + 104, 98, 97, 99, 107, 45, 109, 115, 103, 114, 112, 99, 45, 116, 105, + 109, 101, 111, 117, 116, 49, 50, 51, 52, 103, 114, 112, 99, 46, 119, + 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97, 100, 121, 103, 114, + 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103, 114, 112, 99, 46, + 109, 97, 120, 95, 114, 101, 113, 117, 101, 115, 116, 95, 109, 101, 115, + 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 103, 114, 112, 99, 46, + 109, 97, 120, 95, 114, 101, 115, 112, 111, 110, 115, 101, 95, 109, 101, + 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 47, 103, 114, 112, + 99, 46, 108, 98, 46, 118, 49, 46, 76, 111, 97, 100, 66, 97, 108, + 97, 110, 99, 101, 114, 47, 66, 97, 108, 97, 110, 99, 101, 76, 111, + 97, 100, 100, 101, 102, 108, 97, 116, 101, 103, 122, 105, 112, 115, 116, + 114, 101, 97, 109, 47, 103, 122, 105, 112, 48, 105, 100, 101, 110, 116, + 105, 116, 121, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, + 105, 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 80, 79, 83, + 84, 50, 48, 48, 52, 48, 52, 104, 116, 116, 112, 104, 116, 116, 112, + 115, 103, 114, 112, 99, 71, 69, 84, 80, 85, 84, 47, 47, 105, 110, + 100, 101, 120, 46, 104, 116, 109, 108, 50, 48, 52, 50, 48, 54, 51, + 48, 52, 52, 48, 48, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, + 99, 104, 97, 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, + 102, 108, 97, 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, + 103, 117, 97, 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, + 103, 101, 115, 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, + 45, 99, 111, 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, + 111, 114, 105, 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, + 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, + 104, 101, 45, 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, + 110, 116, 45, 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, + 111, 110, 116, 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, + 99, 111, 110, 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, + 111, 110, 116, 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, + 99, 111, 110, 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, + 111, 107, 105, 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, + 101, 99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, + 102, 45, 109, 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, + 105, 101, 100, 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, + 101, 45, 109, 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, + 105, 102, 45, 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, + 105, 110, 99, 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, + 101, 100, 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 108, 105, + 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, + 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, 117, + 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, 121, + 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 114, + 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, + 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 115, + 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, 101, + 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, + 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, 115, + 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, 114, + 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, + 105, 99, 97, 116, 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, + 101, 102, 108, 97, 116, 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, + 103, 122, 105, 112, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, + 112, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, + 116, 101, 44, 103, 122, 105, 112}; static void static_ref(void* unused) {} static void static_unref(void* unused) {} @@ -217,6 +220,10 @@ grpc_slice_refcount grpc_static_metadata_refcounts[GRPC_STATIC_MDSTR_COUNT] = { {&grpc_static_metadata_vtable, &static_sub_refcnt}, {&grpc_static_metadata_vtable, &static_sub_refcnt}, {&grpc_static_metadata_vtable, &static_sub_refcnt}, + {&grpc_static_metadata_vtable, &static_sub_refcnt}, + {&grpc_static_metadata_vtable, &static_sub_refcnt}, + {&grpc_static_metadata_vtable, &static_sub_refcnt}, + {&grpc_static_metadata_vtable, &static_sub_refcnt}, }; const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = { @@ -242,85 +249,89 @@ const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = { {&grpc_static_metadata_refcounts[19], {{g_bytes + 268, 10}}}, {&grpc_static_metadata_refcounts[20], {{g_bytes + 278, 4}}}, {&grpc_static_metadata_refcounts[21], {{g_bytes + 282, 8}}}, - {&grpc_static_metadata_refcounts[22], {{g_bytes + 290, 12}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}, - {&grpc_static_metadata_refcounts[24], {{g_bytes + 302, 19}}}, - {&grpc_static_metadata_refcounts[25], {{g_bytes + 321, 12}}}, - {&grpc_static_metadata_refcounts[26], {{g_bytes + 333, 30}}}, - {&grpc_static_metadata_refcounts[27], {{g_bytes + 363, 31}}}, - {&grpc_static_metadata_refcounts[28], {{g_bytes + 394, 36}}}, - {&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}}, - {&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}, - {&grpc_static_metadata_refcounts[31], {{g_bytes + 441, 11}}}, - {&grpc_static_metadata_refcounts[32], {{g_bytes + 452, 1}}}, - {&grpc_static_metadata_refcounts[33], {{g_bytes + 453, 1}}}, - {&grpc_static_metadata_refcounts[34], {{g_bytes + 454, 1}}}, - {&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}, - {&grpc_static_metadata_refcounts[36], {{g_bytes + 463, 8}}}, - {&grpc_static_metadata_refcounts[37], {{g_bytes + 471, 16}}}, - {&grpc_static_metadata_refcounts[38], {{g_bytes + 487, 4}}}, - {&grpc_static_metadata_refcounts[39], {{g_bytes + 491, 3}}}, - {&grpc_static_metadata_refcounts[40], {{g_bytes + 494, 3}}}, - {&grpc_static_metadata_refcounts[41], {{g_bytes + 497, 4}}}, - {&grpc_static_metadata_refcounts[42], {{g_bytes + 501, 5}}}, - {&grpc_static_metadata_refcounts[43], {{g_bytes + 506, 4}}}, - {&grpc_static_metadata_refcounts[44], {{g_bytes + 510, 3}}}, - {&grpc_static_metadata_refcounts[45], {{g_bytes + 513, 3}}}, - {&grpc_static_metadata_refcounts[46], {{g_bytes + 516, 1}}}, - {&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 11}}}, - {&grpc_static_metadata_refcounts[48], {{g_bytes + 528, 3}}}, - {&grpc_static_metadata_refcounts[49], {{g_bytes + 531, 3}}}, - {&grpc_static_metadata_refcounts[50], {{g_bytes + 534, 3}}}, - {&grpc_static_metadata_refcounts[51], {{g_bytes + 537, 3}}}, - {&grpc_static_metadata_refcounts[52], {{g_bytes + 540, 3}}}, - {&grpc_static_metadata_refcounts[53], {{g_bytes + 543, 14}}}, - {&grpc_static_metadata_refcounts[54], {{g_bytes + 557, 13}}}, - {&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 15}}}, - {&grpc_static_metadata_refcounts[56], {{g_bytes + 585, 13}}}, - {&grpc_static_metadata_refcounts[57], {{g_bytes + 598, 6}}}, - {&grpc_static_metadata_refcounts[58], {{g_bytes + 604, 27}}}, - {&grpc_static_metadata_refcounts[59], {{g_bytes + 631, 3}}}, - {&grpc_static_metadata_refcounts[60], {{g_bytes + 634, 5}}}, - {&grpc_static_metadata_refcounts[61], {{g_bytes + 639, 13}}}, - {&grpc_static_metadata_refcounts[62], {{g_bytes + 652, 13}}}, - {&grpc_static_metadata_refcounts[63], {{g_bytes + 665, 19}}}, - {&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 16}}}, - {&grpc_static_metadata_refcounts[65], {{g_bytes + 700, 14}}}, - {&grpc_static_metadata_refcounts[66], {{g_bytes + 714, 16}}}, - {&grpc_static_metadata_refcounts[67], {{g_bytes + 730, 13}}}, - {&grpc_static_metadata_refcounts[68], {{g_bytes + 743, 6}}}, - {&grpc_static_metadata_refcounts[69], {{g_bytes + 749, 4}}}, - {&grpc_static_metadata_refcounts[70], {{g_bytes + 753, 4}}}, - {&grpc_static_metadata_refcounts[71], {{g_bytes + 757, 6}}}, - {&grpc_static_metadata_refcounts[72], {{g_bytes + 763, 7}}}, - {&grpc_static_metadata_refcounts[73], {{g_bytes + 770, 4}}}, - {&grpc_static_metadata_refcounts[74], {{g_bytes + 774, 8}}}, - {&grpc_static_metadata_refcounts[75], {{g_bytes + 782, 17}}}, - {&grpc_static_metadata_refcounts[76], {{g_bytes + 799, 13}}}, - {&grpc_static_metadata_refcounts[77], {{g_bytes + 812, 8}}}, - {&grpc_static_metadata_refcounts[78], {{g_bytes + 820, 19}}}, - {&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 13}}}, - {&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 11}}}, - {&grpc_static_metadata_refcounts[81], {{g_bytes + 863, 4}}}, - {&grpc_static_metadata_refcounts[82], {{g_bytes + 867, 8}}}, - {&grpc_static_metadata_refcounts[83], {{g_bytes + 875, 12}}}, - {&grpc_static_metadata_refcounts[84], {{g_bytes + 887, 18}}}, - {&grpc_static_metadata_refcounts[85], {{g_bytes + 905, 19}}}, - {&grpc_static_metadata_refcounts[86], {{g_bytes + 924, 5}}}, - {&grpc_static_metadata_refcounts[87], {{g_bytes + 929, 7}}}, - {&grpc_static_metadata_refcounts[88], {{g_bytes + 936, 7}}}, - {&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 11}}}, - {&grpc_static_metadata_refcounts[90], {{g_bytes + 954, 6}}}, - {&grpc_static_metadata_refcounts[91], {{g_bytes + 960, 10}}}, - {&grpc_static_metadata_refcounts[92], {{g_bytes + 970, 25}}}, - {&grpc_static_metadata_refcounts[93], {{g_bytes + 995, 17}}}, - {&grpc_static_metadata_refcounts[94], {{g_bytes + 1012, 4}}}, - {&grpc_static_metadata_refcounts[95], {{g_bytes + 1016, 3}}}, - {&grpc_static_metadata_refcounts[96], {{g_bytes + 1019, 16}}}, - {&grpc_static_metadata_refcounts[97], {{g_bytes + 1035, 16}}}, - {&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}}, - {&grpc_static_metadata_refcounts[99], {{g_bytes + 1064, 12}}}, - {&grpc_static_metadata_refcounts[100], {{g_bytes + 1076, 21}}}, + {&grpc_static_metadata_refcounts[22], {{g_bytes + 290, 26}}}, + {&grpc_static_metadata_refcounts[23], {{g_bytes + 316, 22}}}, + {&grpc_static_metadata_refcounts[24], {{g_bytes + 338, 12}}}, + {&grpc_static_metadata_refcounts[25], {{g_bytes + 350, 1}}}, + {&grpc_static_metadata_refcounts[26], {{g_bytes + 351, 1}}}, + {&grpc_static_metadata_refcounts[27], {{g_bytes + 352, 1}}}, + {&grpc_static_metadata_refcounts[28], {{g_bytes + 353, 1}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}, + {&grpc_static_metadata_refcounts[30], {{g_bytes + 354, 19}}}, + {&grpc_static_metadata_refcounts[31], {{g_bytes + 373, 12}}}, + {&grpc_static_metadata_refcounts[32], {{g_bytes + 385, 30}}}, + {&grpc_static_metadata_refcounts[33], {{g_bytes + 415, 31}}}, + {&grpc_static_metadata_refcounts[34], {{g_bytes + 446, 36}}}, + {&grpc_static_metadata_refcounts[35], {{g_bytes + 482, 7}}}, + {&grpc_static_metadata_refcounts[36], {{g_bytes + 489, 4}}}, + {&grpc_static_metadata_refcounts[37], {{g_bytes + 493, 11}}}, + {&grpc_static_metadata_refcounts[38], {{g_bytes + 504, 1}}}, + {&grpc_static_metadata_refcounts[39], {{g_bytes + 505, 8}}}, + {&grpc_static_metadata_refcounts[40], {{g_bytes + 513, 8}}}, + {&grpc_static_metadata_refcounts[41], {{g_bytes + 521, 16}}}, + {&grpc_static_metadata_refcounts[42], {{g_bytes + 537, 4}}}, + {&grpc_static_metadata_refcounts[43], {{g_bytes + 541, 3}}}, + {&grpc_static_metadata_refcounts[44], {{g_bytes + 544, 3}}}, + {&grpc_static_metadata_refcounts[45], {{g_bytes + 547, 4}}}, + {&grpc_static_metadata_refcounts[46], {{g_bytes + 551, 5}}}, + {&grpc_static_metadata_refcounts[47], {{g_bytes + 556, 4}}}, + {&grpc_static_metadata_refcounts[48], {{g_bytes + 560, 3}}}, + {&grpc_static_metadata_refcounts[49], {{g_bytes + 563, 3}}}, + {&grpc_static_metadata_refcounts[50], {{g_bytes + 566, 1}}}, + {&grpc_static_metadata_refcounts[51], {{g_bytes + 567, 11}}}, + {&grpc_static_metadata_refcounts[52], {{g_bytes + 578, 3}}}, + {&grpc_static_metadata_refcounts[53], {{g_bytes + 581, 3}}}, + {&grpc_static_metadata_refcounts[54], {{g_bytes + 584, 3}}}, + {&grpc_static_metadata_refcounts[55], {{g_bytes + 587, 3}}}, + {&grpc_static_metadata_refcounts[56], {{g_bytes + 590, 3}}}, + {&grpc_static_metadata_refcounts[57], {{g_bytes + 593, 14}}}, + {&grpc_static_metadata_refcounts[58], {{g_bytes + 607, 13}}}, + {&grpc_static_metadata_refcounts[59], {{g_bytes + 620, 15}}}, + {&grpc_static_metadata_refcounts[60], {{g_bytes + 635, 13}}}, + {&grpc_static_metadata_refcounts[61], {{g_bytes + 648, 6}}}, + {&grpc_static_metadata_refcounts[62], {{g_bytes + 654, 27}}}, + {&grpc_static_metadata_refcounts[63], {{g_bytes + 681, 3}}}, + {&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 5}}}, + {&grpc_static_metadata_refcounts[65], {{g_bytes + 689, 13}}}, + {&grpc_static_metadata_refcounts[66], {{g_bytes + 702, 13}}}, + {&grpc_static_metadata_refcounts[67], {{g_bytes + 715, 19}}}, + {&grpc_static_metadata_refcounts[68], {{g_bytes + 734, 16}}}, + {&grpc_static_metadata_refcounts[69], {{g_bytes + 750, 14}}}, + {&grpc_static_metadata_refcounts[70], {{g_bytes + 764, 16}}}, + {&grpc_static_metadata_refcounts[71], {{g_bytes + 780, 13}}}, + {&grpc_static_metadata_refcounts[72], {{g_bytes + 793, 6}}}, + {&grpc_static_metadata_refcounts[73], {{g_bytes + 799, 4}}}, + {&grpc_static_metadata_refcounts[74], {{g_bytes + 803, 4}}}, + {&grpc_static_metadata_refcounts[75], {{g_bytes + 807, 6}}}, + {&grpc_static_metadata_refcounts[76], {{g_bytes + 813, 7}}}, + {&grpc_static_metadata_refcounts[77], {{g_bytes + 820, 4}}}, + {&grpc_static_metadata_refcounts[78], {{g_bytes + 824, 8}}}, + {&grpc_static_metadata_refcounts[79], {{g_bytes + 832, 17}}}, + {&grpc_static_metadata_refcounts[80], {{g_bytes + 849, 13}}}, + {&grpc_static_metadata_refcounts[81], {{g_bytes + 862, 8}}}, + {&grpc_static_metadata_refcounts[82], {{g_bytes + 870, 19}}}, + {&grpc_static_metadata_refcounts[83], {{g_bytes + 889, 13}}}, + {&grpc_static_metadata_refcounts[84], {{g_bytes + 902, 11}}}, + {&grpc_static_metadata_refcounts[85], {{g_bytes + 913, 4}}}, + {&grpc_static_metadata_refcounts[86], {{g_bytes + 917, 8}}}, + {&grpc_static_metadata_refcounts[87], {{g_bytes + 925, 12}}}, + {&grpc_static_metadata_refcounts[88], {{g_bytes + 937, 18}}}, + {&grpc_static_metadata_refcounts[89], {{g_bytes + 955, 19}}}, + {&grpc_static_metadata_refcounts[90], {{g_bytes + 974, 5}}}, + {&grpc_static_metadata_refcounts[91], {{g_bytes + 979, 7}}}, + {&grpc_static_metadata_refcounts[92], {{g_bytes + 986, 7}}}, + {&grpc_static_metadata_refcounts[93], {{g_bytes + 993, 11}}}, + {&grpc_static_metadata_refcounts[94], {{g_bytes + 1004, 6}}}, + {&grpc_static_metadata_refcounts[95], {{g_bytes + 1010, 10}}}, + {&grpc_static_metadata_refcounts[96], {{g_bytes + 1020, 25}}}, + {&grpc_static_metadata_refcounts[97], {{g_bytes + 1045, 17}}}, + {&grpc_static_metadata_refcounts[98], {{g_bytes + 1062, 4}}}, + {&grpc_static_metadata_refcounts[99], {{g_bytes + 1066, 3}}}, + {&grpc_static_metadata_refcounts[100], {{g_bytes + 1069, 16}}}, + {&grpc_static_metadata_refcounts[101], {{g_bytes + 1085, 16}}}, + {&grpc_static_metadata_refcounts[102], {{g_bytes + 1101, 13}}}, + {&grpc_static_metadata_refcounts[103], {{g_bytes + 1114, 12}}}, + {&grpc_static_metadata_refcounts[104], {{g_bytes + 1126, 21}}}, }; uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { @@ -330,50 +341,51 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4}; static const int8_t elems_r[] = { - 13, 2, 1, 0, 15, 4, 0, 21, 0, 23, -3, 0, 0, 0, 10, 19, -4, - 0, 0, 1, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -52, 0, -55, -36, -57, -58, -58, -58, 0, 40, 39, 38, 37, 36, 35, - 34, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, - 18, 17, 16, 15, 18, 17, 16, 15, 14, 13, 12, 11, 11, 0}; + 16, 11, -1, 0, 15, 2, -78, 24, 0, 18, -5, 0, 0, 0, 17, 14, -8, 0, + 0, 27, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -64, 0, -44, -43, -70, 0, 34, 33, 33, 32, 31, 30, 29, 28, 27, + 27, 26, 25, 24, 23, 22, 21, 20, 20, 19, 19, 18, 17, 16, 15, 14, 13, 12, + 11, 14, 13, 12, 11, 10, 9, 9, 8, 7, 6, 5, 0}; static uint32_t elems_phash(uint32_t i) { - i -= 46; - uint32_t x = i % 99; - uint32_t y = i / 99; + i -= 50; + uint32_t x = i % 103; + uint32_t y = i / 103; uint32_t h = x; if (y < GPR_ARRAY_SIZE(elems_r)) { - uint32_t delta = static_cast(elems_r[y]); + uint32_t delta = (uint32_t)elems_r[y]; h += delta; } return h; } static const uint16_t elem_keys[] = { - 1039, 1040, 145, 146, 541, 1639, 1045, 250, 251, 252, 253, 254, - 1646, 46, 47, 1437, 1942, 1651, 445, 446, 447, 739, 740, 741, - 938, 939, 1538, 2043, 2144, 1451, 944, 5376, 5578, 1545, 5780, 5881, - 1670, 5982, 1550, 6083, 6184, 6285, 6386, 6487, 6588, 6689, 6790, 6891, - 6992, 7093, 7194, 7295, 7396, 5679, 7497, 7598, 7699, 7800, 7901, 8002, - 8103, 8204, 8305, 8406, 8507, 8608, 8709, 8810, 1107, 1108, 1109, 1110, - 8911, 9012, 9113, 9214, 9315, 9416, 9517, 9618, 1714, 9719, 0, 326, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 241, 242, 0, 0, 0, 0, 0, 0, 139, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0}; + 1085, 1086, 565, 1709, 1089, 262, 263, 264, 265, 266, 1716, + 153, 154, 1719, 760, 761, 50, 51, 465, 466, 467, 980, + 981, 1604, 1499, 984, 773, 2129, 2234, 6014, 1611, 6434, 1738, + 1614, 6539, 6644, 1511, 6749, 6854, 6959, 7064, 7169, 7274, 7379, + 2024, 7484, 7589, 7694, 7799, 7904, 8009, 8114, 8219, 6224, 8324, + 8429, 6329, 8534, 8639, 8744, 8849, 8954, 9059, 9164, 9269, 9374, + 1151, 1152, 1153, 1154, 9479, 9584, 9689, 9794, 9899, 10004, 1782, + 10109, 10214, 10319, 10424, 10529, 0, 0, 0, 0, 0, 344, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 253, 254, 147, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0}; static const uint8_t elem_idxs[] = { - 77, 79, 15, 16, 6, 25, 76, 19, 20, 21, 22, 23, 84, 17, - 18, 43, 72, 83, 11, 12, 13, 0, 1, 2, 5, 4, 38, 50, - 57, 7, 3, 24, 27, 37, 29, 30, 26, 31, 36, 32, 33, 34, - 35, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 28, 51, 52, - 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 78, 80, - 81, 82, 66, 67, 68, 69, 70, 71, 73, 74, 85, 75, 255, 14, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 9, 10, 255, 255, 255, 255, 255, 255, 8}; + 77, 79, 6, 25, 76, 19, 20, 21, 22, 23, 84, 15, 16, 83, 1, + 2, 17, 18, 11, 12, 13, 5, 4, 38, 43, 3, 0, 50, 57, 24, + 37, 29, 26, 36, 30, 31, 7, 32, 33, 34, 35, 39, 40, 41, 72, + 42, 44, 45, 46, 47, 48, 49, 51, 27, 52, 53, 28, 54, 55, 56, + 58, 59, 60, 61, 62, 63, 78, 80, 81, 82, 64, 65, 66, 67, 68, + 69, 85, 70, 71, 73, 74, 75, 255, 255, 255, 255, 255, 14, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 9, 10, 8}; grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) { if (a == -1 || b == -1) return GRPC_MDNULL; - uint32_t k = static_cast(a * 101 + b); + uint32_t k = (uint32_t)(a * 105 + b); uint32_t h = elems_phash(k); return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 @@ -384,177 +396,177 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) { grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { {{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}}, - {&grpc_static_metadata_refcounts[32], {{g_bytes + 452, 1}}}}, + {&grpc_static_metadata_refcounts[38], {{g_bytes + 504, 1}}}}, {{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}}, - {&grpc_static_metadata_refcounts[33], {{g_bytes + 453, 1}}}}, + {&grpc_static_metadata_refcounts[25], {{g_bytes + 350, 1}}}}, {{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}}, - {&grpc_static_metadata_refcounts[34], {{g_bytes + 454, 1}}}}, + {&grpc_static_metadata_refcounts[26], {{g_bytes + 351, 1}}}}, {{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}}, - {&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}}, + {&grpc_static_metadata_refcounts[39], {{g_bytes + 505, 8}}}}, {{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}}, - {&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}}, + {&grpc_static_metadata_refcounts[36], {{g_bytes + 489, 4}}}}, {{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}}, - {&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}}}, + {&grpc_static_metadata_refcounts[35], {{g_bytes + 482, 7}}}}, {{&grpc_static_metadata_refcounts[5], {{g_bytes + 36, 2}}}, - {&grpc_static_metadata_refcounts[36], {{g_bytes + 463, 8}}}}, + {&grpc_static_metadata_refcounts[40], {{g_bytes + 513, 8}}}}, {{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}}, - {&grpc_static_metadata_refcounts[37], {{g_bytes + 471, 16}}}}, + {&grpc_static_metadata_refcounts[41], {{g_bytes + 521, 16}}}}, {{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}}, - {&grpc_static_metadata_refcounts[38], {{g_bytes + 487, 4}}}}, + {&grpc_static_metadata_refcounts[42], {{g_bytes + 537, 4}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[39], {{g_bytes + 491, 3}}}}, + {&grpc_static_metadata_refcounts[43], {{g_bytes + 541, 3}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[40], {{g_bytes + 494, 3}}}}, + {&grpc_static_metadata_refcounts[44], {{g_bytes + 544, 3}}}}, {{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}}, - {&grpc_static_metadata_refcounts[41], {{g_bytes + 497, 4}}}}, + {&grpc_static_metadata_refcounts[45], {{g_bytes + 547, 4}}}}, {{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}}, - {&grpc_static_metadata_refcounts[42], {{g_bytes + 501, 5}}}}, + {&grpc_static_metadata_refcounts[46], {{g_bytes + 551, 5}}}}, {{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}}, - {&grpc_static_metadata_refcounts[43], {{g_bytes + 506, 4}}}}, + {&grpc_static_metadata_refcounts[47], {{g_bytes + 556, 4}}}}, {{&grpc_static_metadata_refcounts[3], {{g_bytes + 19, 10}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}}, - {&grpc_static_metadata_refcounts[44], {{g_bytes + 510, 3}}}}, + {&grpc_static_metadata_refcounts[48], {{g_bytes + 560, 3}}}}, {{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}}, - {&grpc_static_metadata_refcounts[45], {{g_bytes + 513, 3}}}}, + {&grpc_static_metadata_refcounts[49], {{g_bytes + 563, 3}}}}, {{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}}, - {&grpc_static_metadata_refcounts[46], {{g_bytes + 516, 1}}}}, + {&grpc_static_metadata_refcounts[50], {{g_bytes + 566, 1}}}}, {{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}}, - {&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 11}}}}, + {&grpc_static_metadata_refcounts[51], {{g_bytes + 567, 11}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[48], {{g_bytes + 528, 3}}}}, + {&grpc_static_metadata_refcounts[52], {{g_bytes + 578, 3}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[49], {{g_bytes + 531, 3}}}}, + {&grpc_static_metadata_refcounts[53], {{g_bytes + 581, 3}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[50], {{g_bytes + 534, 3}}}}, + {&grpc_static_metadata_refcounts[54], {{g_bytes + 584, 3}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[51], {{g_bytes + 537, 3}}}}, + {&grpc_static_metadata_refcounts[55], {{g_bytes + 587, 3}}}}, {{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}}, - {&grpc_static_metadata_refcounts[52], {{g_bytes + 540, 3}}}}, - {{&grpc_static_metadata_refcounts[53], {{g_bytes + 543, 14}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[56], {{g_bytes + 590, 3}}}}, + {{&grpc_static_metadata_refcounts[57], {{g_bytes + 593, 14}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}}, - {&grpc_static_metadata_refcounts[54], {{g_bytes + 557, 13}}}}, - {{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 15}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[56], {{g_bytes + 585, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[57], {{g_bytes + 598, 6}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[58], {{g_bytes + 604, 27}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[59], {{g_bytes + 631, 3}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[60], {{g_bytes + 634, 5}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[61], {{g_bytes + 639, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[62], {{g_bytes + 652, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[63], {{g_bytes + 665, 19}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[58], {{g_bytes + 607, 13}}}}, + {{&grpc_static_metadata_refcounts[59], {{g_bytes + 620, 15}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[60], {{g_bytes + 635, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[61], {{g_bytes + 648, 6}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[62], {{g_bytes + 654, 27}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[63], {{g_bytes + 681, 3}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 5}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[65], {{g_bytes + 689, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[66], {{g_bytes + 702, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[67], {{g_bytes + 715, 19}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}}, - {&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}}, + {&grpc_static_metadata_refcounts[39], {{g_bytes + 505, 8}}}}, {{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}}, - {&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}}, + {&grpc_static_metadata_refcounts[36], {{g_bytes + 489, 4}}}}, {{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[64], {{g_bytes + 684, 16}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[65], {{g_bytes + 700, 14}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[66], {{g_bytes + 714, 16}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[67], {{g_bytes + 730, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[68], {{g_bytes + 734, 16}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[69], {{g_bytes + 750, 14}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[70], {{g_bytes + 764, 16}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[71], {{g_bytes + 780, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[68], {{g_bytes + 743, 6}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[69], {{g_bytes + 749, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[70], {{g_bytes + 753, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[71], {{g_bytes + 757, 6}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[72], {{g_bytes + 763, 7}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[73], {{g_bytes + 770, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[72], {{g_bytes + 793, 6}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[73], {{g_bytes + 799, 4}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[74], {{g_bytes + 803, 4}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[75], {{g_bytes + 807, 6}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[76], {{g_bytes + 813, 7}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[77], {{g_bytes + 820, 4}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[20], {{g_bytes + 278, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[74], {{g_bytes + 774, 8}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[75], {{g_bytes + 782, 17}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[76], {{g_bytes + 799, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[77], {{g_bytes + 812, 8}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[78], {{g_bytes + 820, 19}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 13}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[78], {{g_bytes + 824, 8}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[79], {{g_bytes + 832, 17}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[80], {{g_bytes + 849, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[81], {{g_bytes + 862, 8}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[82], {{g_bytes + 870, 19}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[83], {{g_bytes + 889, 13}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[21], {{g_bytes + 282, 8}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 11}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[81], {{g_bytes + 863, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[82], {{g_bytes + 867, 8}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[83], {{g_bytes + 875, 12}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[84], {{g_bytes + 887, 18}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[85], {{g_bytes + 905, 19}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[86], {{g_bytes + 924, 5}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[87], {{g_bytes + 929, 7}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[88], {{g_bytes + 936, 7}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 11}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[90], {{g_bytes + 954, 6}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[91], {{g_bytes + 960, 10}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[92], {{g_bytes + 970, 25}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[93], {{g_bytes + 995, 17}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[84], {{g_bytes + 902, 11}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[85], {{g_bytes + 913, 4}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[86], {{g_bytes + 917, 8}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[87], {{g_bytes + 925, 12}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[88], {{g_bytes + 937, 18}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[89], {{g_bytes + 955, 19}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[90], {{g_bytes + 974, 5}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[91], {{g_bytes + 979, 7}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[92], {{g_bytes + 986, 7}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[93], {{g_bytes + 993, 11}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[94], {{g_bytes + 1004, 6}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[95], {{g_bytes + 1010, 10}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[96], {{g_bytes + 1020, 25}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[97], {{g_bytes + 1045, 17}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[19], {{g_bytes + 268, 10}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[94], {{g_bytes + 1012, 4}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[95], {{g_bytes + 1016, 3}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, - {{&grpc_static_metadata_refcounts[96], {{g_bytes + 1019, 16}}}, - {&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[98], {{g_bytes + 1062, 4}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[99], {{g_bytes + 1066, 3}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, + {{&grpc_static_metadata_refcounts[100], {{g_bytes + 1069, 16}}}, + {&grpc_static_metadata_refcounts[29], {{g_bytes + 354, 0}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}}, + {&grpc_static_metadata_refcounts[39], {{g_bytes + 505, 8}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 7}}}}, + {&grpc_static_metadata_refcounts[35], {{g_bytes + 482, 7}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[97], {{g_bytes + 1035, 16}}}}, + {&grpc_static_metadata_refcounts[101], {{g_bytes + 1085, 16}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}}, + {&grpc_static_metadata_refcounts[36], {{g_bytes + 489, 4}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}}}, + {&grpc_static_metadata_refcounts[102], {{g_bytes + 1101, 13}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[99], {{g_bytes + 1064, 12}}}}, + {&grpc_static_metadata_refcounts[103], {{g_bytes + 1114, 12}}}}, {{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}}, - {&grpc_static_metadata_refcounts[100], {{g_bytes + 1076, 21}}}}, + {&grpc_static_metadata_refcounts[104], {{g_bytes + 1126, 21}}}}, {{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}}, - {&grpc_static_metadata_refcounts[35], {{g_bytes + 455, 8}}}}, + {&grpc_static_metadata_refcounts[39], {{g_bytes + 505, 8}}}}, {{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}}, - {&grpc_static_metadata_refcounts[30], {{g_bytes + 437, 4}}}}, + {&grpc_static_metadata_refcounts[36], {{g_bytes + 489, 4}}}}, {{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}}, - {&grpc_static_metadata_refcounts[98], {{g_bytes + 1051, 13}}}}, + {&grpc_static_metadata_refcounts[102], {{g_bytes + 1101, 13}}}}, }; bool grpc_static_callout_is_default[GRPC_BATCH_CALLOUTS_COUNT] = { true, // :path @@ -579,6 +591,8 @@ bool grpc_static_callout_is_default[GRPC_BATCH_CALLOUTS_COUNT] = { true, // user-agent true, // host true, // lb-token + true, // grpc-previous-rpc-attempts + true, // grpc-retry-pushback-ms }; const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 76, 77, 78, diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 88d9f9f52c..b3a10f5873 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -31,7 +31,7 @@ #include "src/core/lib/transport/metadata.h" -#define GRPC_STATIC_MDSTR_COUNT 101 +#define GRPC_STATIC_MDSTR_COUNT 105 extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT]; /* ":path" */ #define GRPC_MDSTR_PATH (grpc_static_slice_table[0]) @@ -78,168 +78,176 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_HOST (grpc_static_slice_table[20]) /* "lb-token" */ #define GRPC_MDSTR_LB_TOKEN (grpc_static_slice_table[21]) +/* "grpc-previous-rpc-attempts" */ +#define GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS (grpc_static_slice_table[22]) +/* "grpc-retry-pushback-ms" */ +#define GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS (grpc_static_slice_table[23]) /* "grpc-timeout" */ -#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table[22]) +#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table[24]) +/* "1" */ +#define GRPC_MDSTR_1 (grpc_static_slice_table[25]) +/* "2" */ +#define GRPC_MDSTR_2 (grpc_static_slice_table[26]) +/* "3" */ +#define GRPC_MDSTR_3 (grpc_static_slice_table[27]) +/* "4" */ +#define GRPC_MDSTR_4 (grpc_static_slice_table[28]) /* "" */ -#define GRPC_MDSTR_EMPTY (grpc_static_slice_table[23]) +#define GRPC_MDSTR_EMPTY (grpc_static_slice_table[29]) /* "grpc.wait_for_ready" */ -#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table[24]) +#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table[30]) /* "grpc.timeout" */ -#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table[25]) +#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table[31]) /* "grpc.max_request_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \ - (grpc_static_slice_table[26]) + (grpc_static_slice_table[32]) /* "grpc.max_response_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \ - (grpc_static_slice_table[27]) + (grpc_static_slice_table[33]) /* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ - (grpc_static_slice_table[28]) + (grpc_static_slice_table[34]) /* "deflate" */ -#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[29]) +#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[35]) /* "gzip" */ -#define GRPC_MDSTR_GZIP (grpc_static_slice_table[30]) +#define GRPC_MDSTR_GZIP (grpc_static_slice_table[36]) /* "stream/gzip" */ -#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[31]) +#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[37]) /* "0" */ -#define GRPC_MDSTR_0 (grpc_static_slice_table[32]) -/* "1" */ -#define GRPC_MDSTR_1 (grpc_static_slice_table[33]) -/* "2" */ -#define GRPC_MDSTR_2 (grpc_static_slice_table[34]) +#define GRPC_MDSTR_0 (grpc_static_slice_table[38]) /* "identity" */ -#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[35]) +#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[39]) /* "trailers" */ -#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[36]) +#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[40]) /* "application/grpc" */ -#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[37]) +#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[41]) /* "POST" */ -#define GRPC_MDSTR_POST (grpc_static_slice_table[38]) +#define GRPC_MDSTR_POST (grpc_static_slice_table[42]) /* "200" */ -#define GRPC_MDSTR_200 (grpc_static_slice_table[39]) +#define GRPC_MDSTR_200 (grpc_static_slice_table[43]) /* "404" */ -#define GRPC_MDSTR_404 (grpc_static_slice_table[40]) +#define GRPC_MDSTR_404 (grpc_static_slice_table[44]) /* "http" */ -#define GRPC_MDSTR_HTTP (grpc_static_slice_table[41]) +#define GRPC_MDSTR_HTTP (grpc_static_slice_table[45]) /* "https" */ -#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[42]) +#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[46]) /* "grpc" */ -#define GRPC_MDSTR_GRPC (grpc_static_slice_table[43]) +#define GRPC_MDSTR_GRPC (grpc_static_slice_table[47]) /* "GET" */ -#define GRPC_MDSTR_GET (grpc_static_slice_table[44]) +#define GRPC_MDSTR_GET (grpc_static_slice_table[48]) /* "PUT" */ -#define GRPC_MDSTR_PUT (grpc_static_slice_table[45]) +#define GRPC_MDSTR_PUT (grpc_static_slice_table[49]) /* "/" */ -#define GRPC_MDSTR_SLASH (grpc_static_slice_table[46]) +#define GRPC_MDSTR_SLASH (grpc_static_slice_table[50]) /* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[47]) +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[51]) /* "204" */ -#define GRPC_MDSTR_204 (grpc_static_slice_table[48]) +#define GRPC_MDSTR_204 (grpc_static_slice_table[52]) /* "206" */ -#define GRPC_MDSTR_206 (grpc_static_slice_table[49]) +#define GRPC_MDSTR_206 (grpc_static_slice_table[53]) /* "304" */ -#define GRPC_MDSTR_304 (grpc_static_slice_table[50]) +#define GRPC_MDSTR_304 (grpc_static_slice_table[54]) /* "400" */ -#define GRPC_MDSTR_400 (grpc_static_slice_table[51]) +#define GRPC_MDSTR_400 (grpc_static_slice_table[55]) /* "500" */ -#define GRPC_MDSTR_500 (grpc_static_slice_table[52]) +#define GRPC_MDSTR_500 (grpc_static_slice_table[56]) /* "accept-charset" */ -#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[53]) +#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[57]) /* "gzip, deflate" */ -#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[54]) +#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[58]) /* "accept-language" */ -#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[55]) +#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[59]) /* "accept-ranges" */ -#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[56]) +#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[60]) /* "accept" */ -#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[57]) +#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[61]) /* "access-control-allow-origin" */ -#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[58]) +#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[62]) /* "age" */ -#define GRPC_MDSTR_AGE (grpc_static_slice_table[59]) +#define GRPC_MDSTR_AGE (grpc_static_slice_table[63]) /* "allow" */ -#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[60]) +#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[64]) /* "authorization" */ -#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[61]) +#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[65]) /* "cache-control" */ -#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[62]) +#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[66]) /* "content-disposition" */ -#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[63]) +#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[67]) /* "content-language" */ -#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[64]) +#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[68]) /* "content-length" */ -#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[65]) +#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[69]) /* "content-location" */ -#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[66]) +#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[70]) /* "content-range" */ -#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[67]) +#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[71]) /* "cookie" */ -#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[68]) +#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[72]) /* "date" */ -#define GRPC_MDSTR_DATE (grpc_static_slice_table[69]) +#define GRPC_MDSTR_DATE (grpc_static_slice_table[73]) /* "etag" */ -#define GRPC_MDSTR_ETAG (grpc_static_slice_table[70]) +#define GRPC_MDSTR_ETAG (grpc_static_slice_table[74]) /* "expect" */ -#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[71]) +#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[75]) /* "expires" */ -#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[72]) +#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[76]) /* "from" */ -#define GRPC_MDSTR_FROM (grpc_static_slice_table[73]) +#define GRPC_MDSTR_FROM (grpc_static_slice_table[77]) /* "if-match" */ -#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[74]) +#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[78]) /* "if-modified-since" */ -#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[75]) +#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[79]) /* "if-none-match" */ -#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[76]) +#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[80]) /* "if-range" */ -#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[77]) +#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[81]) /* "if-unmodified-since" */ -#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[78]) +#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[82]) /* "last-modified" */ -#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[79]) +#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[83]) /* "lb-cost-bin" */ -#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[80]) +#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[84]) /* "link" */ -#define GRPC_MDSTR_LINK (grpc_static_slice_table[81]) +#define GRPC_MDSTR_LINK (grpc_static_slice_table[85]) /* "location" */ -#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[82]) +#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[86]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[83]) +#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[87]) /* "proxy-authenticate" */ -#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[84]) +#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[88]) /* "proxy-authorization" */ -#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[85]) +#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[89]) /* "range" */ -#define GRPC_MDSTR_RANGE (grpc_static_slice_table[86]) +#define GRPC_MDSTR_RANGE (grpc_static_slice_table[90]) /* "referer" */ -#define GRPC_MDSTR_REFERER (grpc_static_slice_table[87]) +#define GRPC_MDSTR_REFERER (grpc_static_slice_table[91]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[88]) +#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[92]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[89]) +#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[93]) /* "server" */ -#define GRPC_MDSTR_SERVER (grpc_static_slice_table[90]) +#define GRPC_MDSTR_SERVER (grpc_static_slice_table[94]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[91]) +#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[95]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[92]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[96]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[93]) +#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[97]) /* "vary" */ -#define GRPC_MDSTR_VARY (grpc_static_slice_table[94]) +#define GRPC_MDSTR_VARY (grpc_static_slice_table[98]) /* "via" */ -#define GRPC_MDSTR_VIA (grpc_static_slice_table[95]) +#define GRPC_MDSTR_VIA (grpc_static_slice_table[99]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[96]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[100]) /* "identity,deflate" */ -#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[97]) +#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[101]) /* "identity,gzip" */ -#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[98]) +#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[102]) /* "deflate,gzip" */ -#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[99]) +#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[103]) /* "identity,deflate,gzip" */ #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (grpc_static_slice_table[100]) + (grpc_static_slice_table[104]) extern const grpc_slice_refcount_vtable grpc_static_metadata_vtable; extern grpc_slice_refcount @@ -537,6 +545,8 @@ typedef enum { GRPC_BATCH_USER_AGENT, GRPC_BATCH_HOST, GRPC_BATCH_LB_TOKEN, + GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS, + GRPC_BATCH_GRPC_RETRY_PUSHBACK_MS, GRPC_BATCH_CALLOUTS_COUNT } grpc_metadata_batch_callouts_index; @@ -565,6 +575,8 @@ typedef union { struct grpc_linked_mdelem* user_agent; struct grpc_linked_mdelem* host; struct grpc_linked_mdelem* lb_token; + struct grpc_linked_mdelem* grpc_previous_rpc_attempts; + struct grpc_linked_mdelem* grpc_retry_pushback_ms; } named; } grpc_metadata_batch_callouts; diff --git a/src/core/lib/transport/status_metadata.cc b/src/core/lib/transport/status_metadata.cc new file mode 100644 index 0000000000..f896053e4d --- /dev/null +++ b/src/core/lib/transport/status_metadata.cc @@ -0,0 +1,54 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include "src/core/lib/transport/status_metadata.h" + +#include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/lib/transport/static_metadata.h" + +/* we offset status by a small amount when storing it into transport metadata + as metadata cannot store a 0 value (which is used as OK for grpc_status_codes + */ +#define STATUS_OFFSET 1 + +static void destroy_status(void* ignored) {} + +grpc_status_code grpc_get_status_code_from_metadata(grpc_mdelem md) { + if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_0)) { + return GRPC_STATUS_OK; + } + if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_1)) { + return GRPC_STATUS_CANCELLED; + } + if (grpc_mdelem_eq(md, GRPC_MDELEM_GRPC_STATUS_2)) { + return GRPC_STATUS_UNKNOWN; + } + void* user_data = grpc_mdelem_get_user_data(md, destroy_status); + if (user_data != nullptr) { + return static_cast((intptr_t)user_data - STATUS_OFFSET); + } + uint32_t status; + if (!grpc_parse_slice_to_uint32(GRPC_MDVALUE(md), &status)) { + status = GRPC_STATUS_UNKNOWN; /* could not parse status code */ + } + grpc_mdelem_set_user_data( + md, destroy_status, (void*)static_cast(status + STATUS_OFFSET)); + return static_cast(status); +} diff --git a/src/core/lib/transport/status_metadata.h b/src/core/lib/transport/status_metadata.h new file mode 100644 index 0000000000..aed9c7ac20 --- /dev/null +++ b/src/core/lib/transport/status_metadata.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_TRANSPORT_STATUS_METADATA_H +#define GRPC_CORE_LIB_TRANSPORT_STATUS_METADATA_H + +#include + +#include + +#include "src/core/lib/transport/metadata.h" + +grpc_status_code grpc_get_status_code_from_metadata(grpc_mdelem md); + +#endif /* GRPC_CORE_LIB_TRANSPORT_STATUS_METADATA_H */ diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index b279ce8c80..37e50344c4 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -98,6 +98,19 @@ void grpc_transport_move_one_way_stats(grpc_transport_one_way_stats* from, void grpc_transport_move_stats(grpc_transport_stream_stats* from, grpc_transport_stream_stats* to); +// This struct (which is present in both grpc_transport_stream_op_batch +// and grpc_transport_op_batch) is a convenience to allow filters or +// transports to schedule a closure related to a particular batch without +// having to allocate memory. The general pattern is to initialize the +// closure with the callback arg set to the batch and extra_arg set to +// whatever state is associated with the handler (e.g., the call element +// or the transport stream object). +// +// Note that this can only be used by the current handler of a given +// batch on the way down the stack (i.e., whichever filter or transport is +// currently handling the batch). Once a filter or transport passes control +// of the batch to the next handler, it cannot depend on the contents of +// this struct anymore, because the next handler may reuse it. typedef struct { void* extra_arg; grpc_closure closure; @@ -157,6 +170,11 @@ struct grpc_transport_stream_op_batch_payload { uint32_t send_initial_metadata_flags; // If non-NULL, will be set by the transport to the peer string // (a char*, which the caller takes ownership of). + // Note: This pointer may be used by the transport after the + // send_initial_metadata op is completed. It must remain valid + // until the call is destroyed. + // Note: When a transport sets this, it must free the previous + // value, if any. gpr_atm* peer_string; } send_initial_metadata; @@ -175,6 +193,9 @@ struct grpc_transport_stream_op_batch_payload { struct { grpc_metadata_batch* recv_initial_metadata; + // Flags are used only on the server side. If non-null, will be set to + // a bitfield of the GRPC_INITIAL_METADATA_xxx macros (e.g., to + // indicate if the call is idempotent). uint32_t* recv_flags; /** Should be enqueued when initial metadata is ready to be processed. */ grpc_closure* recv_initial_metadata_ready; @@ -184,6 +205,11 @@ struct grpc_transport_stream_op_batch_payload { bool* trailing_metadata_available; // If non-NULL, will be set by the transport to the peer string // (a char*, which the caller takes ownership of). + // Note: This pointer may be used by the transport after the + // recv_initial_metadata op is completed. It must remain valid + // until the call is destroyed. + // Note: When a transport sets this, it must free the previous + // value, if any. gpr_atm* peer_string; } recv_initial_metadata; @@ -192,6 +218,7 @@ struct grpc_transport_stream_op_batch_payload { // containing a received message. // The caller is responsible for calling grpc_byte_stream_destroy() // on this byte stream. + // Will be NULL if trailing metadata is received instead of a message. grpc_byte_stream** recv_message; /** Should be enqueued when one message is ready to be processed. */ grpc_closure* recv_message_ready; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 79ebed5f46..8ba52ab3a0 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -186,6 +186,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/service_config.cc', 'src/core/lib/transport/static_metadata.cc', 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/status_metadata.cc', 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', @@ -268,6 +269,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/resolver.cc', 'src/core/ext/filters/client_channel/resolver_registry.cc', 'src/core/ext/filters/client_channel/retry_throttle.cc', + 'src/core/ext/filters/client_channel/status_util.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_index.cc', 'src/core/ext/filters/client_channel/uri_parser.cc', diff --git a/test/core/client_channel/BUILD b/test/core/client_channel/BUILD index c4d12fe3a1..d430b722df 100644 --- a/test/core/client_channel/BUILD +++ b/test/core/client_channel/BUILD @@ -54,3 +54,14 @@ grpc_cc_test( ], ) +grpc_cc_test( + name = "status_util_test", + srcs = ["status_util_test.cc"], + language = "C++", + deps = [ + "//:grpc", + ], + external_deps = [ + "gtest", + ], +) diff --git a/test/core/client_channel/status_util_test.cc b/test/core/client_channel/status_util_test.cc new file mode 100644 index 0000000000..f944990ad2 --- /dev/null +++ b/test/core/client_channel/status_util_test.cc @@ -0,0 +1,49 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "src/core/ext/filters/client_channel/status_util.h" + +#include + +namespace grpc_core { +namespace internal { +namespace { + +TEST(StatusCodeSet, Basic) { + StatusCodeSet set; + EXPECT_TRUE(set.Empty()); + EXPECT_FALSE(set.Contains(GRPC_STATUS_OK)); + EXPECT_FALSE(set.Contains(GRPC_STATUS_UNAVAILABLE)); + set.Add(GRPC_STATUS_OK); + EXPECT_FALSE(set.Empty()); + EXPECT_TRUE(set.Contains(GRPC_STATUS_OK)); + EXPECT_FALSE(set.Contains(GRPC_STATUS_UNAVAILABLE)); + set.Add(GRPC_STATUS_UNAVAILABLE); + EXPECT_FALSE(set.Empty()); + EXPECT_TRUE(set.Contains(GRPC_STATUS_OK)); + EXPECT_TRUE(set.Contains(GRPC_STATUS_UNAVAILABLE)); +} + +} // namespace +} // namespace internal +} // namespace grpc_core + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/core/end2end/end2end_nosec_tests.cc b/test/core/end2end/end2end_nosec_tests.cc index 6318550ad8..78ddcdb8f6 100644 --- a/test/core/end2end/end2end_nosec_tests.cc +++ b/test/core/end2end/end2end_nosec_tests.cc @@ -118,6 +118,36 @@ extern void request_with_payload(grpc_end2end_test_config config); extern void request_with_payload_pre_init(void); extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); +extern void retry(grpc_end2end_test_config config); +extern void retry_pre_init(void); +extern void retry_cancellation(grpc_end2end_test_config config); +extern void retry_cancellation_pre_init(void); +extern void retry_disabled(grpc_end2end_test_config config); +extern void retry_disabled_pre_init(void); +extern void retry_exceeds_buffer_size_in_initial_batch(grpc_end2end_test_config config); +extern void retry_exceeds_buffer_size_in_initial_batch_pre_init(void); +extern void retry_exceeds_buffer_size_in_subsequent_batch(grpc_end2end_test_config config); +extern void retry_exceeds_buffer_size_in_subsequent_batch_pre_init(void); +extern void retry_non_retriable_status(grpc_end2end_test_config config); +extern void retry_non_retriable_status_pre_init(void); +extern void retry_recv_initial_metadata(grpc_end2end_test_config config); +extern void retry_recv_initial_metadata_pre_init(void); +extern void retry_recv_message(grpc_end2end_test_config config); +extern void retry_recv_message_pre_init(void); +extern void retry_server_pushback_delay(grpc_end2end_test_config config); +extern void retry_server_pushback_delay_pre_init(void); +extern void retry_server_pushback_disabled(grpc_end2end_test_config config); +extern void retry_server_pushback_disabled_pre_init(void); +extern void retry_streaming(grpc_end2end_test_config config); +extern void retry_streaming_pre_init(void); +extern void retry_streaming_after_commit(grpc_end2end_test_config config); +extern void retry_streaming_after_commit_pre_init(void); +extern void retry_streaming_succeeds_before_replay_finished(grpc_end2end_test_config config); +extern void retry_streaming_succeeds_before_replay_finished_pre_init(void); +extern void retry_throttled(grpc_end2end_test_config config); +extern void retry_throttled_pre_init(void); +extern void retry_too_many_attempts(grpc_end2end_test_config config); +extern void retry_too_many_attempts_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); @@ -197,6 +227,21 @@ void grpc_end2end_tests_pre_init(void) { request_with_flags_pre_init(); request_with_payload_pre_init(); resource_quota_server_pre_init(); + retry_pre_init(); + retry_cancellation_pre_init(); + retry_disabled_pre_init(); + retry_exceeds_buffer_size_in_initial_batch_pre_init(); + retry_exceeds_buffer_size_in_subsequent_batch_pre_init(); + retry_non_retriable_status_pre_init(); + retry_recv_initial_metadata_pre_init(); + retry_recv_message_pre_init(); + retry_server_pushback_delay_pre_init(); + retry_server_pushback_disabled_pre_init(); + retry_streaming_pre_init(); + retry_streaming_after_commit_pre_init(); + retry_streaming_succeeds_before_replay_finished_pre_init(); + retry_throttled_pre_init(); + retry_too_many_attempts_pre_init(); server_finishes_request_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); @@ -265,6 +310,21 @@ void grpc_end2end_tests(int argc, char **argv, request_with_flags(config); request_with_payload(config); resource_quota_server(config); + retry(config); + retry_cancellation(config); + retry_disabled(config); + retry_exceeds_buffer_size_in_initial_batch(config); + retry_exceeds_buffer_size_in_subsequent_batch(config); + retry_non_retriable_status(config); + retry_recv_initial_metadata(config); + retry_recv_message(config); + retry_server_pushback_delay(config); + retry_server_pushback_disabled(config); + retry_streaming(config); + retry_streaming_after_commit(config); + retry_streaming_succeeds_before_replay_finished(config); + retry_throttled(config); + retry_too_many_attempts(config); server_finishes_request(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); @@ -460,6 +520,66 @@ void grpc_end2end_tests(int argc, char **argv, resource_quota_server(config); continue; } + if (0 == strcmp("retry", argv[i])) { + retry(config); + continue; + } + if (0 == strcmp("retry_cancellation", argv[i])) { + retry_cancellation(config); + continue; + } + if (0 == strcmp("retry_disabled", argv[i])) { + retry_disabled(config); + continue; + } + if (0 == strcmp("retry_exceeds_buffer_size_in_initial_batch", argv[i])) { + retry_exceeds_buffer_size_in_initial_batch(config); + continue; + } + if (0 == strcmp("retry_exceeds_buffer_size_in_subsequent_batch", argv[i])) { + retry_exceeds_buffer_size_in_subsequent_batch(config); + continue; + } + if (0 == strcmp("retry_non_retriable_status", argv[i])) { + retry_non_retriable_status(config); + continue; + } + if (0 == strcmp("retry_recv_initial_metadata", argv[i])) { + retry_recv_initial_metadata(config); + continue; + } + if (0 == strcmp("retry_recv_message", argv[i])) { + retry_recv_message(config); + continue; + } + if (0 == strcmp("retry_server_pushback_delay", argv[i])) { + retry_server_pushback_delay(config); + continue; + } + if (0 == strcmp("retry_server_pushback_disabled", argv[i])) { + retry_server_pushback_disabled(config); + continue; + } + if (0 == strcmp("retry_streaming", argv[i])) { + retry_streaming(config); + continue; + } + if (0 == strcmp("retry_streaming_after_commit", argv[i])) { + retry_streaming_after_commit(config); + continue; + } + if (0 == strcmp("retry_streaming_succeeds_before_replay_finished", argv[i])) { + retry_streaming_succeeds_before_replay_finished(config); + continue; + } + if (0 == strcmp("retry_throttled", argv[i])) { + retry_throttled(config); + continue; + } + if (0 == strcmp("retry_too_many_attempts", argv[i])) { + retry_too_many_attempts(config); + continue; + } if (0 == strcmp("server_finishes_request", argv[i])) { server_finishes_request(config); continue; diff --git a/test/core/end2end/end2end_tests.cc b/test/core/end2end/end2end_tests.cc index 9d8dfd6723..fb1e61b39f 100644 --- a/test/core/end2end/end2end_tests.cc +++ b/test/core/end2end/end2end_tests.cc @@ -120,6 +120,36 @@ extern void request_with_payload(grpc_end2end_test_config config); extern void request_with_payload_pre_init(void); extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); +extern void retry(grpc_end2end_test_config config); +extern void retry_pre_init(void); +extern void retry_cancellation(grpc_end2end_test_config config); +extern void retry_cancellation_pre_init(void); +extern void retry_disabled(grpc_end2end_test_config config); +extern void retry_disabled_pre_init(void); +extern void retry_exceeds_buffer_size_in_initial_batch(grpc_end2end_test_config config); +extern void retry_exceeds_buffer_size_in_initial_batch_pre_init(void); +extern void retry_exceeds_buffer_size_in_subsequent_batch(grpc_end2end_test_config config); +extern void retry_exceeds_buffer_size_in_subsequent_batch_pre_init(void); +extern void retry_non_retriable_status(grpc_end2end_test_config config); +extern void retry_non_retriable_status_pre_init(void); +extern void retry_recv_initial_metadata(grpc_end2end_test_config config); +extern void retry_recv_initial_metadata_pre_init(void); +extern void retry_recv_message(grpc_end2end_test_config config); +extern void retry_recv_message_pre_init(void); +extern void retry_server_pushback_delay(grpc_end2end_test_config config); +extern void retry_server_pushback_delay_pre_init(void); +extern void retry_server_pushback_disabled(grpc_end2end_test_config config); +extern void retry_server_pushback_disabled_pre_init(void); +extern void retry_streaming(grpc_end2end_test_config config); +extern void retry_streaming_pre_init(void); +extern void retry_streaming_after_commit(grpc_end2end_test_config config); +extern void retry_streaming_after_commit_pre_init(void); +extern void retry_streaming_succeeds_before_replay_finished(grpc_end2end_test_config config); +extern void retry_streaming_succeeds_before_replay_finished_pre_init(void); +extern void retry_throttled(grpc_end2end_test_config config); +extern void retry_throttled_pre_init(void); +extern void retry_too_many_attempts(grpc_end2end_test_config config); +extern void retry_too_many_attempts_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); @@ -200,6 +230,21 @@ void grpc_end2end_tests_pre_init(void) { request_with_flags_pre_init(); request_with_payload_pre_init(); resource_quota_server_pre_init(); + retry_pre_init(); + retry_cancellation_pre_init(); + retry_disabled_pre_init(); + retry_exceeds_buffer_size_in_initial_batch_pre_init(); + retry_exceeds_buffer_size_in_subsequent_batch_pre_init(); + retry_non_retriable_status_pre_init(); + retry_recv_initial_metadata_pre_init(); + retry_recv_message_pre_init(); + retry_server_pushback_delay_pre_init(); + retry_server_pushback_disabled_pre_init(); + retry_streaming_pre_init(); + retry_streaming_after_commit_pre_init(); + retry_streaming_succeeds_before_replay_finished_pre_init(); + retry_throttled_pre_init(); + retry_too_many_attempts_pre_init(); server_finishes_request_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); @@ -269,6 +314,21 @@ void grpc_end2end_tests(int argc, char **argv, request_with_flags(config); request_with_payload(config); resource_quota_server(config); + retry(config); + retry_cancellation(config); + retry_disabled(config); + retry_exceeds_buffer_size_in_initial_batch(config); + retry_exceeds_buffer_size_in_subsequent_batch(config); + retry_non_retriable_status(config); + retry_recv_initial_metadata(config); + retry_recv_message(config); + retry_server_pushback_delay(config); + retry_server_pushback_disabled(config); + retry_streaming(config); + retry_streaming_after_commit(config); + retry_streaming_succeeds_before_replay_finished(config); + retry_throttled(config); + retry_too_many_attempts(config); server_finishes_request(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); @@ -468,6 +528,66 @@ void grpc_end2end_tests(int argc, char **argv, resource_quota_server(config); continue; } + if (0 == strcmp("retry", argv[i])) { + retry(config); + continue; + } + if (0 == strcmp("retry_cancellation", argv[i])) { + retry_cancellation(config); + continue; + } + if (0 == strcmp("retry_disabled", argv[i])) { + retry_disabled(config); + continue; + } + if (0 == strcmp("retry_exceeds_buffer_size_in_initial_batch", argv[i])) { + retry_exceeds_buffer_size_in_initial_batch(config); + continue; + } + if (0 == strcmp("retry_exceeds_buffer_size_in_subsequent_batch", argv[i])) { + retry_exceeds_buffer_size_in_subsequent_batch(config); + continue; + } + if (0 == strcmp("retry_non_retriable_status", argv[i])) { + retry_non_retriable_status(config); + continue; + } + if (0 == strcmp("retry_recv_initial_metadata", argv[i])) { + retry_recv_initial_metadata(config); + continue; + } + if (0 == strcmp("retry_recv_message", argv[i])) { + retry_recv_message(config); + continue; + } + if (0 == strcmp("retry_server_pushback_delay", argv[i])) { + retry_server_pushback_delay(config); + continue; + } + if (0 == strcmp("retry_server_pushback_disabled", argv[i])) { + retry_server_pushback_disabled(config); + continue; + } + if (0 == strcmp("retry_streaming", argv[i])) { + retry_streaming(config); + continue; + } + if (0 == strcmp("retry_streaming_after_commit", argv[i])) { + retry_streaming_after_commit(config); + continue; + } + if (0 == strcmp("retry_streaming_succeeds_before_replay_finished", argv[i])) { + retry_streaming_succeeds_before_replay_finished(config); + continue; + } + if (0 == strcmp("retry_throttled", argv[i])) { + retry_throttled(config); + continue; + } + if (0 == strcmp("retry_too_many_attempts", argv[i])) { + retry_too_many_attempts(config); + continue; + } if (0 == strcmp("server_finishes_request", argv[i])) { server_finishes_request(config); continue; diff --git a/test/core/end2end/fixtures/h2_proxy.cc b/test/core/end2end/fixtures/h2_proxy.cc index 93dde4f4a2..28a6eeeb78 100644 --- a/test/core/end2end/fixtures/h2_proxy.cc +++ b/test/core/end2end/fixtures/h2_proxy.cc @@ -49,7 +49,17 @@ static grpc_server* create_proxy_server(const char* port, static grpc_channel* create_proxy_client(const char* target, grpc_channel_args* client_args) { - return grpc_insecure_channel_create(target, client_args, nullptr); + // Disable retries in proxy client. + grpc_arg arg; + arg.type = GRPC_ARG_INTEGER; + arg.key = const_cast(GRPC_ARG_ENABLE_RETRIES); + arg.value.integer = 0; + grpc_channel_args* new_args = + grpc_channel_args_copy_and_add(client_args, &arg, 1); + grpc_channel* channel = + grpc_insecure_channel_create(target, new_args, nullptr); + grpc_channel_args_destroy(new_args); + return channel; } static const grpc_end2end_proxy_def proxy_def = {create_proxy_server, diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 3ed82e19bd..c719d0fa84 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -21,7 +21,13 @@ "\x0Auser-agent" "\x04host" "\x08lb-token" +"\x1Agrpc-previous-rpc-attempts" +"\x16grpc-retry-pushback-ms" "\x0Cgrpc-timeout" +"\x011" +"\x012" +"\x013" +"\x014" "\x00" "\x13grpc.wait_for_ready" "\x0Cgrpc.timeout" @@ -32,8 +38,6 @@ "\x04gzip" "\x0Bstream/gzip" "\x010" -"\x011" -"\x012" "\x08identity" "\x08trailers" "\x10application/grpc" diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index e7cf97b2d0..4e20b0b334 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -24,15 +24,24 @@ import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', - 'fullstack includes_proxy dns_resolver name_resolution secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes enables_compression supports_compression is_inproc is_http2 supports_proxy_auth supports_write_buffering') + 'fullstack includes_proxy dns_resolver name_resolution secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes enables_compression supports_compression is_inproc is_http2 supports_proxy_auth supports_write_buffering client_channel') default_unsecure_fixture_options = FixtureOptions( - True, False, True, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [], True, False, True, False, True, False, True) -socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) -default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) -uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv']) + True, False, True, True, False, ['windows', 'linux', 'mac', 'posix'], + True, False, [], [], True, False, True, False, True, False, True, True) +socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace( + fullstack=False, dns_resolver=False, client_channel=False) +default_secure_fixture_options = default_unsecure_fixture_options._replace( + secure=True) +uds_fixture_options = default_unsecure_fixture_options._replace( + dns_resolver=False, platforms=['linux', 'mac', 'posix'], + exclude_iomgrs=['uv']) fd_unsecure_fixture_options = default_unsecure_fixture_options._replace( - dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv']) -inproc_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, fullstack=False, name_resolution=False, supports_compression=False, is_inproc=True, is_http2=False, supports_write_buffering=False) + dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix'], + exclude_iomgrs=['uv'], client_channel=False) +inproc_fixture_options = default_unsecure_fixture_options._replace( + dns_resolver=False, fullstack=False, name_resolution=False, + supports_compression=False, is_inproc=True, is_http2=False, + supports_write_buffering=False, client_channel=False) # maps fixture name to whether it requires the security library END2END_FIXTURES = { @@ -68,9 +77,12 @@ END2END_FIXTURES = { TestOptions = collections.namedtuple( 'TestOptions', - 'needs_fullstack needs_dns needs_names proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky allows_compression needs_compression exclude_inproc needs_http2 needs_proxy_auth needs_write_buffering') -default_test_options = TestOptions(False, False, False, True, False, True, 1.0, [], False, False, True, False, False, False, False, False) -connectivity_test_options = default_test_options._replace(needs_fullstack=True) + 'needs_fullstack needs_dns needs_names proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky allows_compression needs_compression exclude_inproc needs_http2 needs_proxy_auth needs_write_buffering needs_client_channel') +default_test_options = TestOptions( + False, False, False, True, False, True, 1.0, [], False, False, True, + False, False, False, False, False, False) +connectivity_test_options = default_test_options._replace( + needs_fullstack=True) LOWCPU = 0.1 @@ -80,9 +92,8 @@ END2END_TESTS = { 'bad_hostname': default_test_options._replace(needs_names=True), 'bad_ping': connectivity_test_options._replace(proxyable=False), 'binary_metadata': default_test_options._replace(cpu_cost=LOWCPU), - 'resource_quota_server': default_test_options._replace(large_writes=True, - proxyable=False, - allows_compression=False), + 'resource_quota_server': default_test_options._replace( + large_writes=True, proxyable=False, allows_compression=False), 'call_creds': default_test_options._replace(secure=True), 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_after_client_done': default_test_options._replace(cpu_cost=LOWCPU), @@ -91,18 +102,21 @@ END2END_TESTS = { 'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_with_status': default_test_options._replace(cpu_cost=LOWCPU), - 'compressed_payload': default_test_options._replace(proxyable=False,needs_compression=True), + 'compressed_payload': default_test_options._replace(proxyable=False, + needs_compression=True), 'connectivity': connectivity_test_options._replace(needs_names=True, proxyable=False, cpu_cost=LOWCPU, exclude_iomgrs=['uv']), - 'default_host': default_test_options._replace(needs_fullstack=True, - needs_dns=True,needs_names=True), - 'disappearing_server': connectivity_test_options._replace(flaky=True,needs_names=True), + 'default_host': default_test_options._replace( + needs_fullstack=True, needs_dns=True, needs_names=True), + 'disappearing_server': connectivity_test_options._replace(flaky=True, + needs_names=True), 'empty_batch': default_test_options._replace(cpu_cost=LOWCPU), 'filter_causes_close': default_test_options._replace(cpu_cost=LOWCPU), 'filter_call_init_fails': default_test_options, 'filter_latency': default_test_options._replace(cpu_cost=LOWCPU), 'filter_status_code': default_test_options._replace(cpu_cost=LOWCPU), - 'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU,exclude_inproc=True), + 'graceful_server_shutdown': default_test_options._replace( + cpu_cost=LOWCPU, exclude_inproc=True), 'hpack_size': default_test_options._replace(proxyable=False, traceable=False, cpu_cost=LOWCPU), @@ -127,30 +141,75 @@ END2END_TESTS = { 'payload': default_test_options, 'load_reporting_hook': default_test_options, 'ping_pong_streaming': default_test_options._replace(cpu_cost=LOWCPU), - 'ping': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU), + 'ping': connectivity_test_options._replace(proxyable=False, + cpu_cost=LOWCPU), 'proxy_auth': default_test_options._replace(needs_proxy_auth=True), 'registered_call': default_test_options, 'request_with_flags': default_test_options._replace( proxyable=False, cpu_cost=LOWCPU), 'request_with_payload': default_test_options._replace(cpu_cost=LOWCPU), + # TODO(roth): Remove proxyable=False for all retry tests once we + # have a way for the proxy to propagate the fact that trailing + # metadata is available when initial metadata is returned. + # See https://github.com/grpc/grpc/issues/14467 for context. + 'retry': default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_cancellation': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_disabled': default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_exceeds_buffer_size_in_initial_batch': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_exceeds_buffer_size_in_subsequent_batch': + default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_non_retriable_status': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_recv_initial_metadata': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_recv_message': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_server_pushback_delay': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_server_pushback_disabled': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_streaming': default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_streaming_after_commit': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_streaming_succeeds_before_replay_finished': + default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_throttled': default_test_options._replace(cpu_cost=LOWCPU, + needs_client_channel=True, + proxyable=False), + 'retry_too_many_attempts': default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), 'server_finishes_request': default_test_options._replace(cpu_cost=LOWCPU), 'shutdown_finishes_calls': default_test_options._replace(cpu_cost=LOWCPU), 'shutdown_finishes_tags': default_test_options._replace(cpu_cost=LOWCPU), 'simple_cacheable_request': default_test_options._replace(cpu_cost=LOWCPU), - 'stream_compression_compressed_payload': default_test_options._replace(proxyable=False, - exclude_inproc=True), - 'stream_compression_payload': default_test_options._replace(exclude_inproc=True), - 'stream_compression_ping_pong_streaming': default_test_options._replace(exclude_inproc=True), + 'stream_compression_compressed_payload': default_test_options._replace( + proxyable=False, exclude_inproc=True), + 'stream_compression_payload': default_test_options._replace( + exclude_inproc=True), + 'stream_compression_ping_pong_streaming': default_test_options._replace( + exclude_inproc=True), 'simple_delayed_request': connectivity_test_options, 'simple_metadata': default_test_options, 'simple_request': default_test_options, 'streaming_error_response': default_test_options._replace(cpu_cost=LOWCPU), 'trailing_metadata': default_test_options, 'workaround_cronet_compression': default_test_options, - 'write_buffering': default_test_options._replace(cpu_cost=LOWCPU, - needs_write_buffering=True), - 'write_buffering_at_end': default_test_options._replace(cpu_cost=LOWCPU, - needs_write_buffering=True), + 'write_buffering': default_test_options._replace( + cpu_cost=LOWCPU, needs_write_buffering=True), + 'write_buffering_at_end': default_test_options._replace( + cpu_cost=LOWCPU, needs_write_buffering=True), } @@ -191,6 +250,9 @@ def compatible(f, t): if END2END_TESTS[t].needs_write_buffering: if not END2END_FIXTURES[f].supports_write_buffering: return False + if END2END_TESTS[t].needs_client_channel: + if not END2END_FIXTURES[f].client_channel: + return False return True diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index bfd5d8525e..8e723fd609 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -24,7 +24,7 @@ def fixture_options(fullstack=True, includes_proxy=False, dns_resolver=True, name_resolution=True, secure=True, tracing=False, platforms=['windows', 'linux', 'mac', 'posix'], is_inproc=False, is_http2=True, supports_proxy_auth=False, - supports_write_buffering=True): + supports_write_buffering=True, client_channel=True): return struct( fullstack=fullstack, includes_proxy=includes_proxy, @@ -35,8 +35,9 @@ def fixture_options(fullstack=True, includes_proxy=False, dns_resolver=True, is_inproc=is_inproc, is_http2=is_http2, supports_proxy_auth=supports_proxy_auth, - supports_write_buffering=supports_write_buffering - #platforms=platforms + supports_write_buffering=supports_write_buffering, + client_channel=client_channel, + #platforms=platforms, ) @@ -47,6 +48,7 @@ END2END_FIXTURES = { 'h2_load_reporting': fixture_options(), 'h2_fakesec': fixture_options(), 'h2_fd': fixture_options(dns_resolver=False, fullstack=False, + client_channel=False, platforms=['linux', 'mac', 'posix']), 'h2_full': fixture_options(), 'h2_full+pipe': fixture_options(platforms=['linux']), @@ -55,24 +57,28 @@ END2END_FIXTURES = { 'h2_http_proxy': fixture_options(supports_proxy_auth=True), 'h2_oauth2': fixture_options(), 'h2_proxy': fixture_options(includes_proxy=True), - 'h2_sockpair_1byte': fixture_options(fullstack=False, dns_resolver=False), - 'h2_sockpair': fixture_options(fullstack=False, dns_resolver=False), + 'h2_sockpair_1byte': fixture_options(fullstack=False, dns_resolver=False, + client_channel=False), + 'h2_sockpair': fixture_options(fullstack=False, dns_resolver=False, + client_channel=False), 'h2_sockpair+trace': fixture_options(fullstack=False, dns_resolver=False, - tracing=True), + tracing=True, client_channel=False), 'h2_ssl': fixture_options(secure=True), 'h2_ssl_proxy': fixture_options(includes_proxy=True, secure=True), 'h2_uds': fixture_options(dns_resolver=False, platforms=['linux', 'mac', 'posix']), 'inproc': fixture_options(fullstack=False, dns_resolver=False, name_resolution=False, is_inproc=True, - is_http2=False, supports_write_buffering=False), + is_http2=False, supports_write_buffering=False, + client_channel=False), } def test_options(needs_fullstack=False, needs_dns=False, needs_names=False, proxyable=True, secure=False, traceable=False, exclude_inproc=False, needs_http2=False, - needs_proxy_auth=False, needs_write_buffering=False): + needs_proxy_auth=False, needs_write_buffering=False, + needs_client_channel=False): return struct( needs_fullstack=needs_fullstack, needs_dns=needs_dns, @@ -83,7 +89,8 @@ def test_options(needs_fullstack=False, needs_dns=False, needs_names=False, exclude_inproc=exclude_inproc, needs_http2=needs_http2, needs_proxy_auth=needs_proxy_auth, - needs_write_buffering=needs_write_buffering + needs_write_buffering=needs_write_buffering, + needs_client_channel=needs_client_channel, ) @@ -118,7 +125,8 @@ END2END_TESTS = { 'invoke_large_request': test_options(), 'keepalive_timeout': test_options(proxyable=False, needs_http2=True), 'large_metadata': test_options(), - 'max_concurrent_streams': test_options(proxyable=False, exclude_inproc=True), + 'max_concurrent_streams': test_options(proxyable=False, + exclude_inproc=True), 'max_connection_age': test_options(exclude_inproc=True), 'max_connection_idle': test_options(needs_fullstack=True, proxyable=False), 'max_message_length': test_options(), @@ -134,6 +142,37 @@ END2END_TESTS = { 'registered_call': test_options(), 'request_with_flags': test_options(proxyable=False), 'request_with_payload': test_options(), + # TODO(roth): Remove proxyable=False for all retry tests once we + # have a way for the proxy to propagate the fact that trailing + # metadata is available when initial metadata is returned. + # See https://github.com/grpc/grpc/issues/14467 for context. + 'retry': test_options(needs_client_channel=True, proxyable=False), + 'retry_cancellation': test_options(needs_client_channel=True, + proxyable=False), + 'retry_disabled': test_options(needs_client_channel=True, proxyable=False), + 'retry_exceeds_buffer_size_in_initial_batch': test_options( + needs_client_channel=True, proxyable=False), + 'retry_exceeds_buffer_size_in_subsequent_batch': test_options( + needs_client_channel=True, proxyable=False), + 'retry_non_retriable_status': test_options(needs_client_channel=True, + proxyable=False), + 'retry_recv_initial_metadata': test_options(needs_client_channel=True, + proxyable=False), + 'retry_recv_message': test_options(needs_client_channel=True, + proxyable=False), + 'retry_server_pushback_delay': test_options(needs_client_channel=True, + proxyable=False), + 'retry_server_pushback_disabled': test_options(needs_client_channel=True, + proxyable=False), + 'retry_streaming': test_options(needs_client_channel=True, proxyable=False), + 'retry_streaming_after_commit': test_options(needs_client_channel=True, + proxyable=False), + 'retry_streaming_succeeds_before_replay_finished': test_options( + needs_client_channel=True, proxyable=False), + 'retry_throttled': test_options(needs_client_channel=True, + proxyable=False), + 'retry_too_many_attempts': test_options(needs_client_channel=True, + proxyable=False), 'server_finishes_request': test_options(), 'shutdown_finishes_calls': test_options(), 'shutdown_finishes_tags': test_options(), @@ -142,7 +181,8 @@ END2END_TESTS = { 'simple_metadata': test_options(), 'simple_request': test_options(), 'streaming_error_response': test_options(), - 'stream_compression_compressed_payload': test_options(proxyable=False, exclude_inproc=True), + 'stream_compression_compressed_payload': test_options(proxyable=False, + exclude_inproc=True), 'stream_compression_payload': test_options(exclude_inproc=True), 'stream_compression_ping_pong_streaming': test_options(exclude_inproc=True), 'trailing_metadata': test_options(), @@ -183,6 +223,9 @@ def compatible(fopt, topt): if topt.needs_write_buffering: if not fopt.supports_write_buffering: return False + if topt.needs_client_channel: + if not fopt.client_channel: + return False return True diff --git a/test/core/end2end/tests/retry.cc b/test/core/end2end/tests/retry.cc new file mode 100644 index 0000000000..38ecc6fbb1 --- /dev/null +++ b/test/core/end2end/tests/retry.cc @@ -0,0 +1,325 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests a basic retry scenario: +// - 2 retries allowed for ABORTED status +// - first attempt returns ABORTED +// - second attempt returns OK +static void test_retry(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + // Make sure the "grpc-previous-rpc-attempts" header was not sent in the + // initial attempt. + for (size_t i = 0; i < request_metadata_recv.count; ++i) { + GPR_ASSERT(!grpc_slice_eq(request_metadata_recv.metadata[i].key, + GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS)); + } + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + // Make sure the "grpc-previous-rpc-attempts" header was sent in the retry. + bool found_retry_header = false; + for (size_t i = 0; i < request_metadata_recv.count; ++i) { + if (grpc_slice_eq(request_metadata_recv.metadata[i].key, + GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS)) { + GPR_ASSERT( + grpc_slice_eq(request_metadata_recv.metadata[i].value, GRPC_MDSTR_1)); + found_retry_header = true; + break; + } + } + GPR_ASSERT(found_retry_header); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_OK); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 0); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry(config); +} + +void retry_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_cancellation.cc b/test/core/end2end/tests/retry_cancellation.cc new file mode 100644 index 0000000000..0504092c4f --- /dev/null +++ b/test/core/end2end/tests/retry_cancellation.cc @@ -0,0 +1,277 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests retry cancellation. +static void test_retry_cancellation(grpc_end2end_test_config config, + cancellation_mode mode) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " },\n" + " \"timeout\": \"5s\"\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + char* name; + gpr_asprintf(&name, "retry_cancellation/%s", mode.name); + grpc_end2end_test_fixture f = begin_test(config, name, &client_args, nullptr); + gpr_free(name); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + // Client starts a batch with all 6 ops. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + // Server gets a call and fails with retryable status. + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + + // Server gets a second call (the retry). + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + // Initiate cancellation. + GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, nullptr)); + + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == mode.expect_status); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_cancellation(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + for (size_t i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); ++i) { + test_retry_cancellation(config, cancellation_modes[i]); + } +} + +void retry_cancellation_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_disabled.cc b/test/core/end2end/tests/retry_disabled.cc new file mode 100644 index 0000000000..cb30502aeb --- /dev/null +++ b/test/core/end2end/tests/retry_disabled.cc @@ -0,0 +1,262 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't retry when retries are disabled via the +// GRPC_ARG_ENABLE_RETRIES channel arg, even when there is retry +// configuration in the service config. +// - 1 retry allowed for ABORTED status +// - first attempt returns ABORTED but does not retry +static void test_retry_disabled(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg args[2]; + args[0].type = GRPC_ARG_STRING; + args[0].key = const_cast(GRPC_ARG_SERVICE_CONFIG); + args[0].value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + args[1].type = GRPC_ARG_INTEGER; + args[1].key = const_cast(GRPC_ARG_ENABLE_RETRIES); + args[1].value.integer = 0; + grpc_channel_args client_args = {GPR_ARRAY_SIZE(args), args}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_disabled", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_disabled(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_disabled(config); +} + +void retry_disabled_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc new file mode 100644 index 0000000000..3908f29971 --- /dev/null +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc @@ -0,0 +1,266 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't make any further attempts after we exceed the +// max buffer size. +// - 1 retry allowed for ABORTED status +// - buffer size set to 2 bytes +// - client sends a 3-byte message +// - first attempt gets ABORTED but is not retried +static void test_retry_exceeds_buffer_size_in_initial_batch( + grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg args[2]; + args[0].type = GRPC_ARG_STRING; + args[0].key = const_cast(GRPC_ARG_SERVICE_CONFIG); + args[0].value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + args[1].type = GRPC_ARG_INTEGER; + args[1].key = const_cast(GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE); + args[1].value.integer = 2; + grpc_channel_args client_args = {GPR_ARRAY_SIZE(args), args}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_exceeds_buffer_size_in_initial_batch", + &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_exceeds_buffer_size_in_initial_batch( + grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_exceeds_buffer_size_in_initial_batch(config); +} + +void retry_exceeds_buffer_size_in_initial_batch_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc new file mode 100644 index 0000000000..a8d7f0851a --- /dev/null +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc @@ -0,0 +1,276 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Similar to the retry_exceeds_buffer_size_in_initial_batch test, but we +// don't exceed the buffer size until the second batch. +// - 1 retry allowed for ABORTED status +// - buffer size set to 100 KiB (larger than initial metadata) +// - client sends a 100 KiB message +// - first attempt gets ABORTED but is not retried +static void test_retry_exceeds_buffer_size_in_subsequent_batch( + grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + char buf[102401]; + memset(buf, 'a', sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; + grpc_slice request_payload_slice = grpc_slice_from_static_string(buf); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg args[2]; + args[0].type = GRPC_ARG_STRING; + args[0].key = const_cast(GRPC_ARG_SERVICE_CONFIG); + args[0].value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + args[1].type = GRPC_ARG_INTEGER; + args[1].key = const_cast(GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE); + args[1].value.integer = 102400; + grpc_channel_args client_args = {GPR_ARRAY_SIZE(args), args}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_exceeds_buffer_size_in_subsequent_batch", + &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(2), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_exceeds_buffer_size_in_subsequent_batch( + grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_exceeds_buffer_size_in_subsequent_batch(config); +} + +void retry_exceeds_buffer_size_in_subsequent_batch_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_non_retriable_status.cc b/test/core/end2end/tests/retry_non_retriable_status.cc new file mode 100644 index 0000000000..6d59db0b04 --- /dev/null +++ b/test/core/end2end/tests/retry_non_retriable_status.cc @@ -0,0 +1,257 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't retry for non-retryable status codes. +// - 1 retry allowed for ABORTED status +// - first attempt gets INVALID_ARGUMENT, so no retry is done +static void test_retry_non_retriable_status(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_non_retriable_status", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_INVALID_ARGUMENT; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_INVALID_ARGUMENT); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_non_retriable_status(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_non_retriable_status(config); +} + +void retry_non_retriable_status_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_recv_initial_metadata.cc b/test/core/end2end/tests/retry_recv_initial_metadata.cc new file mode 100644 index 0000000000..14215e449c --- /dev/null +++ b/test/core/end2end/tests/retry_recv_initial_metadata.cc @@ -0,0 +1,268 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that receiving initial metadata commits the call. +// - 1 retry allowed for ABORTED status +// - first attempt receives initial metadata before trailing metadata, +// so no retry is done even though status was ABORTED +static void test_retry_recv_initial_metadata(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_recv_initial_metadata", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server sends initial metadata in its own batch, before sending + // trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(103), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_recv_initial_metadata(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_recv_initial_metadata(config); +} + +void retry_recv_initial_metadata_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_recv_message.cc b/test/core/end2end/tests/retry_recv_message.cc new file mode 100644 index 0000000000..86171fdc01 --- /dev/null +++ b/test/core/end2end/tests/retry_recv_message.cc @@ -0,0 +1,261 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that receiving a message commits the call. +// - 1 retry allowed for ABORTED status +// - first attempt receives a message and therefore does not retry even +// though the final status is ABORTED +static void test_retry_recv_message(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_recv_message", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(103), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_recv_message(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_recv_message(config); +} + +void retry_recv_message_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_server_pushback_delay.cc b/test/core/end2end/tests/retry_server_pushback_delay.cc new file mode 100644 index 0000000000..1da986041f --- /dev/null +++ b/test/core/end2end/tests/retry_server_pushback_delay.cc @@ -0,0 +1,318 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we honor server push-back delay. +// - 2 retries allowed for ABORTED status +// - first attempt gets ABORTED with a long delay +// - second attempt succeeds +static void test_retry_server_pushback_delay(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_metadata pushback_md; + memset(&pushback_md, 0, sizeof(pushback_md)); + pushback_md.key = GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS; + pushback_md.value = grpc_slice_from_static_string("2000"); + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_server_pushback_delay", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 1; + op->data.send_status_from_server.trailing_metadata = &pushback_md; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + gpr_timespec before_retry = gpr_now(GPR_CLOCK_MONOTONIC); + + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + gpr_timespec after_retry = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec retry_delay = gpr_time_sub(after_retry, before_retry); + // Configured back-off was 1 second, server push-back said 2 seconds. + // To avoid flakiness, we allow some fudge factor here. + gpr_log(GPR_INFO, "retry delay was {.tv_sec=%" PRId64 ", .tv_nsec=%d}", + retry_delay.tv_sec, retry_delay.tv_nsec); + GPR_ASSERT(retry_delay.tv_sec >= 1); + if (retry_delay.tv_sec == 1) { + GPR_ASSERT(retry_delay.tv_nsec >= 900000000); + } + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_OK); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 0); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_server_pushback_delay(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_server_pushback_delay(config); +} + +void retry_server_pushback_delay_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_server_pushback_disabled.cc b/test/core/end2end/tests/retry_server_pushback_disabled.cc new file mode 100644 index 0000000000..13d4f01eea --- /dev/null +++ b/test/core/end2end/tests/retry_server_pushback_disabled.cc @@ -0,0 +1,306 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't retry when disabled by server push-back. +// - 2 retries allowed for ABORTED status +// - first attempt gets ABORTED +// - second attempt gets ABORTED but server push back disables retrying +static void test_retry_server_pushback_disabled( + grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_metadata pushback_md; + memset(&pushback_md, 0, sizeof(pushback_md)); + pushback_md.key = GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS; + pushback_md.value = grpc_slice_from_static_string("-1"); + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = begin_test( + config, "retry_server_pushback_disabled", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 1; + op->data.send_status_from_server.trailing_metadata = &pushback_md; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_server_pushback_disabled(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_server_pushback_disabled(config); +} + +void retry_server_pushback_disabled_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_streaming.cc b/test/core/end2end/tests/retry_streaming.cc new file mode 100644 index 0000000000..e96e57e8bc --- /dev/null +++ b/test/core/end2end/tests/retry_streaming.cc @@ -0,0 +1,424 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests retrying a streaming RPC. This is the same as +// the basic retry test, except that the client sends two messages on the +// call before the initial attempt fails. +// FIXME: We should also test the case where the retry is committed after +// replaying 1 of 2 previously-completed send_message ops. However, +// there's no way to trigger that from an end2end test, because the +// replayed ops happen under the hood -- they are not surfaced to the +// C-core API, and therefore we have no way to inject the commit at the +// right point. +static void test_retry_streaming(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice request2_payload_slice = grpc_slice_from_static_string("bar"); + grpc_slice request3_payload_slice = grpc_slice_from_static_string("baz"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("quux"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* request2_payload = + grpc_raw_byte_buffer_create(&request2_payload_slice, 1); + grpc_byte_buffer* request3_payload = + grpc_raw_byte_buffer_create(&request3_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* request2_payload_recv = nullptr; + grpc_byte_buffer* request3_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_streaming", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + // Client starts a batch for receiving initial metadata, a message, + // and trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + // Client sends initial metadata and a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(2), true); + cq_verify(cqv); + + // Server gets a call with received initial metadata. + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server receives a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + // Client sends a second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request2_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(3), true); + cq_verify(cqv); + + // Server receives the second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request2_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(103), true); + cq_verify(cqv); + + // Server sends both initial and trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(104), true); + cq_verify(cqv); + + // Clean up from first attempt. + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); + grpc_byte_buffer_destroy(request_payload_recv); + request_payload_recv = nullptr; + GPR_ASSERT( + byte_buffer_eq_slice(request2_payload_recv, request2_payload_slice)); + grpc_byte_buffer_destroy(request2_payload_recv); + request2_payload_recv = nullptr; + + // Server gets a second call (the retry). + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server receives a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + cq_verify(cqv); + + // Server receives a second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request2_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(203), true); + cq_verify(cqv); + + // Client sends a third message and a close. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request3_payload; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(4), true); + cq_verify(cqv); + + // Server receives a third message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request3_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(204), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(204), true); + cq_verify(cqv); + + // Server receives a close and sends initial metadata, a message, and + // trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + // Returning a retriable code, but because we are also sending a + // message, the client will commit instead of retrying again. + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(205), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(205), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request2_payload); + grpc_byte_buffer_destroy(request3_payload); + grpc_byte_buffer_destroy(response_payload); + GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); + grpc_byte_buffer_destroy(request_payload_recv); + GPR_ASSERT( + byte_buffer_eq_slice(request2_payload_recv, request2_payload_slice)); + grpc_byte_buffer_destroy(request2_payload_recv); + GPR_ASSERT( + byte_buffer_eq_slice(request3_payload_recv, request3_payload_slice)); + grpc_byte_buffer_destroy(request3_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_streaming(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_streaming(config); +} + +void retry_streaming_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_streaming_after_commit.cc b/test/core/end2end/tests/retry_streaming_after_commit.cc new file mode 100644 index 0000000000..43eee86d95 --- /dev/null +++ b/test/core/end2end/tests/retry_streaming_after_commit.cc @@ -0,0 +1,354 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we can continue to send/recv messages on a streaming call +// after retries are committed. +static void test_retry_streaming_after_commit(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice request2_payload_slice = grpc_slice_from_static_string("bar"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("baz"); + grpc_slice response2_payload_slice = grpc_slice_from_static_string("quux"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* request2_payload = + grpc_raw_byte_buffer_create(&request2_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* response2_payload = + grpc_raw_byte_buffer_create(&response2_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* request2_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_byte_buffer* response2_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_streaming_after_commit", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + // Client starts a batch for receiving initial metadata and a message. + // This will commit retries. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + // Client sends initial metadata and a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(3), true); + cq_verify(cqv); + + // Server gets a call with received initial metadata. + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server receives a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + // Server sends initial metadata and a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(103), true); + // Client receives initial metadata and a message. + CQ_EXPECT_COMPLETION(cqv, tag(2), true); + cq_verify(cqv); + + // Client sends a second message and a close. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request2_payload; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(4), true); + cq_verify(cqv); + + // Server receives a second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request2_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(104), true); + cq_verify(cqv); + + // Server receives a close, sends a second message, and sends status. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response2_payload; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + // Returning a retriable code, but because retries are already + // committed, the client will not retry. + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(105), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(105), true); + cq_verify(cqv); + + // Client receives a second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response2_payload_recv; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(5), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(5), true); + cq_verify(cqv); + + // Client receives status. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request2_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(response2_payload); + GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); + grpc_byte_buffer_destroy(request_payload_recv); + GPR_ASSERT( + byte_buffer_eq_slice(request2_payload_recv, request2_payload_slice)); + grpc_byte_buffer_destroy(request2_payload_recv); + GPR_ASSERT( + byte_buffer_eq_slice(response_payload_recv, response_payload_slice)); + grpc_byte_buffer_destroy(response_payload_recv); + GPR_ASSERT( + byte_buffer_eq_slice(response2_payload_recv, response2_payload_slice)); + grpc_byte_buffer_destroy(response2_payload_recv); + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_streaming_after_commit(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_streaming_after_commit(config); +} + +void retry_streaming_after_commit_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc new file mode 100644 index 0000000000..5c92f64805 --- /dev/null +++ b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc @@ -0,0 +1,400 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we correctly clean up if the second attempt finishes +// before we have finished replaying all of the send ops. +static void test_retry_streaming_succeeds_before_replay_finished( + grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice request2_payload_slice = grpc_slice_from_static_string("bar"); + grpc_slice request3_payload_slice = grpc_slice_from_static_string("baz"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("quux"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* request2_payload = + grpc_raw_byte_buffer_create(&request2_payload_slice, 1); + grpc_byte_buffer* request3_payload = + grpc_raw_byte_buffer_create(&request3_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* request2_payload_recv = nullptr; + grpc_byte_buffer* request3_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 3,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_streaming", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + // Client starts a batch for receiving initial metadata, a message, + // and trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + // Client sends initial metadata and a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(2), true); + cq_verify(cqv); + + // Server gets a call with received initial metadata. + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server receives a message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + // Client sends a second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request2_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(3), true); + cq_verify(cqv); + + // Server receives the second message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request2_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(103), true); + cq_verify(cqv); + + // Client sends a third message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request3_payload; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(4), true); + cq_verify(cqv); + + // Server receives the third message. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request3_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(104), true); + cq_verify(cqv); + + // Server sends both initial and trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(105), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(105), true); + cq_verify(cqv); + + // Clean up from first attempt. + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); + grpc_byte_buffer_destroy(request_payload_recv); + request_payload_recv = nullptr; + GPR_ASSERT( + byte_buffer_eq_slice(request2_payload_recv, request2_payload_slice)); + grpc_byte_buffer_destroy(request2_payload_recv); + request2_payload_recv = nullptr; + GPR_ASSERT( + byte_buffer_eq_slice(request3_payload_recv, request3_payload_slice)); + grpc_byte_buffer_destroy(request3_payload_recv); + request3_payload_recv = nullptr; + + // Server gets a second call (the retry). + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + // Server receives the first message (and does not receive any others). + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &request_payload_recv; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + cq_verify(cqv); + + // Server sends initial metadata, a message, and trailing metadata. + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + // Returning a retriable code, but because we are also sending a + // message, the client will commit instead of retrying again. + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(205), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(205), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request2_payload); + grpc_byte_buffer_destroy(request3_payload); + grpc_byte_buffer_destroy(response_payload); + GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_streaming_succeeds_before_replay_finished( + grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_streaming_succeeds_before_replay_finished(config); +} + +void retry_streaming_succeeds_before_replay_finished_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_throttled.cc b/test/core/end2end/tests/retry_throttled.cc new file mode 100644 index 0000000000..8cd08487ea --- /dev/null +++ b/test/core/end2end/tests/retry_throttled.cc @@ -0,0 +1,264 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't retry when throttled. +// - 1 retry allowed for ABORTED status +// - first attempt gets ABORTED but is over limit, so no retry is done +static void test_retry_throttled(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ],\n" + // A single failure will cause us to be throttled. + // (This is not a very realistic config, but it works for the + // purposes of this test.) + " \"retryThrottling\": {\n" + " \"maxTokens\": 2,\n" + " \"tokenRatio\": 1.0,\n" + " }\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_throttled", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_throttled(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_throttled(config); +} + +void retry_throttled_pre_init(void) {} diff --git a/test/core/end2end/tests/retry_too_many_attempts.cc b/test/core/end2end/tests/retry_too_many_attempts.cc new file mode 100644 index 0000000000..5225c9b229 --- /dev/null +++ b/test/core/end2end/tests/retry_too_many_attempts.cc @@ -0,0 +1,299 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we stop retrying after the configured number of attempts. +// - 1 retry allowed for ABORTED status +// - first attempt gets ABORTED +// - second attempt gets ABORTED but does not retry +static void test_retry_too_many_attempts(grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_too_many_attempts", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call( + f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + get_host_override_slice("foo.test.google.fr:1234", config), deadline, + nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + cq_verify(cqv); + + grpc_call_unref(s); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_details_init(&call_details); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(201)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(201), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_ABORTED; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(202), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_ABORTED); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + validate_host_override_string("foo.test.google.fr:1234", call_details.host, + config); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_too_many_attempts(grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_too_many_attempts(config); +} + +void retry_too_many_attempts_pre_init(void) {} diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index b31d4ff899..2c2d05b9ae 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -119,3 +119,15 @@ grpc_cc_test( "//test/core/util:grpc_test_util", ], ) + +grpc_cc_test( + name = "status_metadata_test", + srcs = ["status_metadata_test.cc"], + language = "C++", + deps = [ + "//:grpc", + ], + external_deps = [ + "gtest", + ], +) diff --git a/test/core/transport/status_metadata_test.cc b/test/core/transport/status_metadata_test.cc new file mode 100644 index 0000000000..a96f11c1ea --- /dev/null +++ b/test/core/transport/status_metadata_test.cc @@ -0,0 +1,61 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "src/core/lib/transport/status_metadata.h" + +#include + +#include "src/core/lib/transport/static_metadata.h" + +namespace { + +TEST(GetStatusCodeFromMetadata, OK) { + EXPECT_EQ(GRPC_STATUS_OK, + grpc_get_status_code_from_metadata(GRPC_MDELEM_GRPC_STATUS_0)); +} + +TEST(GetStatusCodeFromMetadata, CANCELLED) { + EXPECT_EQ(GRPC_STATUS_CANCELLED, + grpc_get_status_code_from_metadata(GRPC_MDELEM_GRPC_STATUS_1)); +} + +TEST(GetStatusCodeFromMetadata, UNKNOWN) { + EXPECT_EQ(GRPC_STATUS_UNKNOWN, + grpc_get_status_code_from_metadata(GRPC_MDELEM_GRPC_STATUS_2)); +} + +TEST(GetStatusCodeFromMetadata, Other) { + grpc_mdelem status_md = grpc_mdelem_from_slices( + GRPC_MDSTR_GRPC_STATUS, grpc_slice_from_static_string("10")); + EXPECT_EQ(GRPC_STATUS_ABORTED, grpc_get_status_code_from_metadata(status_md)); + GRPC_MDELEM_UNREF(status_md); +} + +TEST(GetStatusCodeFromMetadata, Unparseable) { + grpc_mdelem status_md = grpc_mdelem_from_slices( + GRPC_MDSTR_GRPC_STATUS, grpc_slice_from_static_string("NaN")); + EXPECT_EQ(GRPC_STATUS_UNKNOWN, grpc_get_status_code_from_metadata(status_md)); + GRPC_MDELEM_UNREF(status_md); +} + +} // namespace + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 066f28416d..25da3fdd5f 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -45,6 +45,12 @@ CONFIG = [ 'grpc-server-stats-bin', 'grpc-tags-bin', 'grpc-trace-bin', + 'grpc-previous-rpc-attempts', + 'grpc-retry-pushback-ms', + '1', + '2', + '3', + '4', '', # channel arg keys 'grpc.wait_for_ready', @@ -163,6 +169,8 @@ METADATA_BATCH_CALLOUTS = [ ('user-agent', True), ('host', True), ('lb-token', True), + ('grpc-previous-rpc-attempts', True), + ('grpc-retry-pushback-ms', True), ] COMPRESSION_ALGORITHMS = [ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 7eab3f09fd..60d8975e52 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1149,6 +1149,7 @@ src/core/lib/transport/pid_controller.h \ src/core/lib/transport/service_config.h \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/status_conversion.h \ +src/core/lib/transport/status_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_impl.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index dd1facd7b4..84e020fb7f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -929,6 +929,8 @@ src/core/ext/filters/client_channel/resolver_registry.cc \ src/core/ext/filters/client_channel/resolver_registry.h \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/retry_throttle.h \ +src/core/ext/filters/client_channel/status_util.cc \ +src/core/ext/filters/client_channel/status_util.h \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel.h \ src/core/ext/filters/client_channel/subchannel_index.cc \ @@ -1389,6 +1391,8 @@ src/core/lib/transport/static_metadata.cc \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/status_conversion.cc \ src/core/lib/transport/status_conversion.h \ +src/core/lib/transport/status_metadata.cc \ +src/core/lib/transport/status_metadata.h \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 2ad0e23fed..6e80d98ed4 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -4188,6 +4188,20 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "grpc" + ], + "headers": [], + "is_filegroup": false, + "language": "c++", + "name": "status_metadata_test", + "src": [ + "test/core/transport/status_metadata_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -4206,6 +4220,20 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "grpc" + ], + "headers": [], + "is_filegroup": false, + "language": "c++", + "name": "status_util_test", + "src": [ + "test/core/client_channel/status_util_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -8111,6 +8139,21 @@ "test/core/end2end/tests/request_with_flags.cc", "test/core/end2end/tests/request_with_payload.cc", "test/core/end2end/tests/resource_quota_server.cc", + "test/core/end2end/tests/retry.cc", + "test/core/end2end/tests/retry_cancellation.cc", + "test/core/end2end/tests/retry_disabled.cc", + "test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc", + "test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc", + "test/core/end2end/tests/retry_non_retriable_status.cc", + "test/core/end2end/tests/retry_recv_initial_metadata.cc", + "test/core/end2end/tests/retry_recv_message.cc", + "test/core/end2end/tests/retry_server_pushback_delay.cc", + "test/core/end2end/tests/retry_server_pushback_disabled.cc", + "test/core/end2end/tests/retry_streaming.cc", + "test/core/end2end/tests/retry_streaming_after_commit.cc", + "test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc", + "test/core/end2end/tests/retry_throttled.cc", + "test/core/end2end/tests/retry_too_many_attempts.cc", "test/core/end2end/tests/server_finishes_request.cc", "test/core/end2end/tests/shutdown_finishes_calls.cc", "test/core/end2end/tests/shutdown_finishes_tags.cc", @@ -8193,6 +8236,21 @@ "test/core/end2end/tests/request_with_flags.cc", "test/core/end2end/tests/request_with_payload.cc", "test/core/end2end/tests/resource_quota_server.cc", + "test/core/end2end/tests/retry.cc", + "test/core/end2end/tests/retry_cancellation.cc", + "test/core/end2end/tests/retry_disabled.cc", + "test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc", + "test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc", + "test/core/end2end/tests/retry_non_retriable_status.cc", + "test/core/end2end/tests/retry_recv_initial_metadata.cc", + "test/core/end2end/tests/retry_recv_message.cc", + "test/core/end2end/tests/retry_server_pushback_delay.cc", + "test/core/end2end/tests/retry_server_pushback_disabled.cc", + "test/core/end2end/tests/retry_streaming.cc", + "test/core/end2end/tests/retry_streaming_after_commit.cc", + "test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc", + "test/core/end2end/tests/retry_throttled.cc", + "test/core/end2end/tests/retry_too_many_attempts.cc", "test/core/end2end/tests/server_finishes_request.cc", "test/core/end2end/tests/shutdown_finishes_calls.cc", "test/core/end2end/tests/shutdown_finishes_tags.cc", @@ -8607,6 +8665,7 @@ "src/core/lib/transport/service_config.cc", "src/core/lib/transport/static_metadata.cc", "src/core/lib/transport/status_conversion.cc", + "src/core/lib/transport/status_metadata.cc", "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", "src/core/lib/transport/transport_op_string.cc" @@ -8755,6 +8814,7 @@ "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/status_conversion.h", + "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h" @@ -8897,6 +8957,7 @@ "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/status_conversion.h", + "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h" @@ -8928,6 +8989,7 @@ "src/core/ext/filters/client_channel/resolver_factory.h", "src/core/ext/filters/client_channel/resolver_registry.h", "src/core/ext/filters/client_channel/retry_throttle.h", + "src/core/ext/filters/client_channel/status_util.h", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.h", "src/core/ext/filters/client_channel/uri_parser.h" @@ -8971,6 +9033,8 @@ "src/core/ext/filters/client_channel/resolver_registry.h", "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/retry_throttle.h", + "src/core/ext/filters/client_channel/status_util.cc", + "src/core/ext/filters/client_channel/status_util.h", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 649581dada..6748d1c4c6 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -4482,6 +4482,30 @@ "timeout_seconds": 1200, "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "status_metadata_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, @@ -4506,6 +4530,30 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "status_util_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, @@ -7296,7 +7344,7 @@ }, { "args": [ - "server_finishes_request" + "retry" ], "ci_platforms": [ "windows", @@ -7319,7 +7367,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -7342,7 +7390,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -7365,7 +7413,7 @@ }, { "args": [ - "simple_cacheable_request" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -7388,7 +7436,7 @@ }, { "args": [ - "simple_delayed_request" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -7396,7 +7444,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7411,7 +7459,7 @@ }, { "args": [ - "simple_metadata" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -7419,7 +7467,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7434,7 +7482,7 @@ }, { "args": [ - "simple_request" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -7442,7 +7490,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7457,7 +7505,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -7465,7 +7513,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7480,7 +7528,7 @@ }, { "args": [ - "stream_compression_payload" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -7488,7 +7536,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7503,7 +7551,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -7511,7 +7559,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7526,7 +7574,7 @@ }, { "args": [ - "streaming_error_response" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -7549,7 +7597,7 @@ }, { "args": [ - "trailing_metadata" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -7557,7 +7605,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7572,7 +7620,7 @@ }, { "args": [ - "workaround_cronet_compression" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -7580,7 +7628,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -7595,7 +7643,7 @@ }, { "args": [ - "write_buffering" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -7618,7 +7666,7 @@ }, { "args": [ - "write_buffering_at_end" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -7641,7 +7689,7 @@ }, { "args": [ - "authority_not_supported" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -7649,12 +7697,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7664,7 +7712,7 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -7672,12 +7720,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7687,7 +7735,7 @@ }, { "args": [ - "bad_ping" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -7695,12 +7743,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7710,7 +7758,7 @@ }, { "args": [ - "binary_metadata" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -7723,7 +7771,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7733,7 +7781,7 @@ }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -7746,7 +7794,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7756,7 +7804,7 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -7764,12 +7812,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7779,7 +7827,7 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ "windows", @@ -7787,12 +7835,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7802,7 +7850,7 @@ }, { "args": [ - "cancel_after_invoke" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -7810,12 +7858,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7825,7 +7873,7 @@ }, { "args": [ - "cancel_after_round_trip" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -7833,12 +7881,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7848,7 +7896,7 @@ }, { "args": [ - "cancel_before_invoke" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -7856,12 +7904,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7871,7 +7919,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -7884,7 +7932,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7894,7 +7942,7 @@ }, { "args": [ - "cancel_with_status" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -7902,12 +7950,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7917,7 +7965,7 @@ }, { "args": [ - "compressed_payload" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -7930,7 +7978,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -7940,7 +7988,7 @@ }, { "args": [ - "connectivity" + "write_buffering" ], "ci_platforms": [ "windows", @@ -7950,9 +7998,53 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering_at_end" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -7965,7 +8057,7 @@ }, { "args": [ - "default_host" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -7988,7 +8080,7 @@ }, { "args": [ - "disappearing_server" + "bad_ping" ], "ci_platforms": [ "windows", @@ -7999,7 +8091,7 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_compress_test", "platforms": [ @@ -8011,7 +8103,7 @@ }, { "args": [ - "empty_batch" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -8034,7 +8126,7 @@ }, { "args": [ - "filter_call_init_fails" + "call_creds" ], "ci_platforms": [ "windows", @@ -8057,7 +8149,7 @@ }, { "args": [ - "filter_causes_close" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -8080,7 +8172,7 @@ }, { "args": [ - "filter_latency" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -8103,7 +8195,7 @@ }, { "args": [ - "filter_status_code" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -8126,7 +8218,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", @@ -8149,7 +8241,7 @@ }, { "args": [ - "high_initial_seqno" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -8172,7 +8264,7 @@ }, { "args": [ - "hpack_size" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -8195,7 +8287,7 @@ }, { "args": [ - "idempotent_request" + "cancel_with_status" ], "ci_platforms": [ "windows", @@ -8203,7 +8295,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8218,7 +8310,7 @@ }, { "args": [ - "invoke_large_request" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -8241,7 +8333,7 @@ }, { "args": [ - "keepalive_timeout" + "connectivity" ], "ci_platforms": [ "windows", @@ -8251,7 +8343,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -8264,7 +8358,7 @@ }, { "args": [ - "large_metadata" + "default_host" ], "ci_platforms": [ "windows", @@ -8287,7 +8381,7 @@ }, { "args": [ - "load_reporting_hook" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -8298,7 +8392,7 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": false, + "flaky": true, "language": "c", "name": "h2_compress_test", "platforms": [ @@ -8310,7 +8404,7 @@ }, { "args": [ - "max_concurrent_streams" + "empty_batch" ], "ci_platforms": [ "windows", @@ -8333,7 +8427,7 @@ }, { "args": [ - "max_connection_age" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -8341,7 +8435,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8356,7 +8450,7 @@ }, { "args": [ - "max_connection_idle" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -8366,9 +8460,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -8381,7 +8473,7 @@ }, { "args": [ - "max_message_length" + "filter_latency" ], "ci_platforms": [ "windows", @@ -8404,7 +8496,7 @@ }, { "args": [ - "negative_deadline" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -8412,7 +8504,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8427,7 +8519,7 @@ }, { "args": [ - "network_status_change" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -8450,7 +8542,7 @@ }, { "args": [ - "no_logging" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -8458,7 +8550,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8473,7 +8565,30 @@ }, { "args": [ - "no_op" + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" ], "ci_platforms": [ "windows", @@ -8496,7 +8611,7 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -8519,7 +8634,7 @@ }, { "args": [ - "ping" + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -8542,7 +8657,7 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ "windows", @@ -8550,7 +8665,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8565,7 +8680,7 @@ }, { "args": [ - "registered_call" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -8588,7 +8703,7 @@ }, { "args": [ - "request_with_flags" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -8611,7 +8726,7 @@ }, { "args": [ - "request_with_payload" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -8634,7 +8749,7 @@ }, { "args": [ - "server_finishes_request" + "max_connection_idle" ], "ci_platforms": [ "windows", @@ -8644,7 +8759,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -8657,7 +8774,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "max_message_length" ], "ci_platforms": [ "windows", @@ -8680,7 +8797,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -8688,7 +8805,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8703,7 +8820,7 @@ }, { "args": [ - "simple_cacheable_request" + "network_status_change" ], "ci_platforms": [ "windows", @@ -8726,7 +8843,7 @@ }, { "args": [ - "simple_delayed_request" + "no_logging" ], "ci_platforms": [ "windows", @@ -8749,7 +8866,7 @@ }, { "args": [ - "simple_metadata" + "no_op" ], "ci_platforms": [ "windows", @@ -8772,7 +8889,7 @@ }, { "args": [ - "simple_request" + "payload" ], "ci_platforms": [ "windows", @@ -8795,7 +8912,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "ping" ], "ci_platforms": [ "windows", @@ -8803,7 +8920,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8818,7 +8935,7 @@ }, { "args": [ - "stream_compression_payload" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -8826,7 +8943,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8841,7 +8958,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "registered_call" ], "ci_platforms": [ "windows", @@ -8864,7 +8981,7 @@ }, { "args": [ - "streaming_error_response" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -8887,7 +9004,7 @@ }, { "args": [ - "trailing_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -8895,7 +9012,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8910,7 +9027,7 @@ }, { "args": [ - "workaround_cronet_compression" + "retry" ], "ci_platforms": [ "windows", @@ -8918,7 +9035,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -8933,7 +9050,7 @@ }, { "args": [ - "write_buffering" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -8956,7 +9073,7 @@ }, { "args": [ - "write_buffering_at_end" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -8979,19 +9096,20 @@ }, { "args": [ - "authority_not_supported" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9001,19 +9119,20 @@ }, { "args": [ - "bad_hostname" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9023,19 +9142,20 @@ }, { "args": [ - "bad_ping" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9045,11 +9165,12 @@ }, { "args": [ - "binary_metadata" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9057,7 +9178,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9067,19 +9188,20 @@ }, { "args": [ - "call_creds" + "retry_recv_message" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9089,11 +9211,12 @@ }, { "args": [ - "cancel_after_accept" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9101,7 +9224,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9111,11 +9234,12 @@ }, { "args": [ - "cancel_after_client_done" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9123,7 +9247,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9133,11 +9257,12 @@ }, { "args": [ - "cancel_after_invoke" + "retry_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9145,7 +9270,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9155,11 +9280,12 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9167,7 +9293,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9177,11 +9303,12 @@ }, { "args": [ - "cancel_before_invoke" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9189,7 +9316,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9199,11 +9326,12 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_throttled" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9211,7 +9339,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9221,11 +9349,12 @@ }, { "args": [ - "cancel_with_status" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9233,7 +9362,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9243,19 +9372,20 @@ }, { "args": [ - "compressed_payload" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9265,21 +9395,20 @@ }, { "args": [ - "connectivity" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9289,19 +9418,20 @@ }, { "args": [ - "default_host" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9311,19 +9441,20 @@ }, { "args": [ - "disappearing_server" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9333,19 +9464,20 @@ }, { "args": [ - "empty_batch" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9355,11 +9487,12 @@ }, { "args": [ - "filter_call_init_fails" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, @@ -9367,7 +9500,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9377,19 +9510,20 @@ }, { "args": [ - "filter_causes_close" + "simple_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9399,19 +9533,20 @@ }, { "args": [ - "filter_latency" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9421,19 +9556,20 @@ }, { "args": [ - "filter_status_code" + "stream_compression_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9443,19 +9579,20 @@ }, { "args": [ - "graceful_server_shutdown" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9465,11 +9602,12 @@ }, { "args": [ - "high_initial_seqno" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9477,7 +9615,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9487,19 +9625,20 @@ }, { "args": [ - "hpack_size" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9509,11 +9648,12 @@ }, { "args": [ - "idempotent_request" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, @@ -9521,7 +9661,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9531,19 +9671,20 @@ }, { "args": [ - "invoke_large_request" + "write_buffering" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9553,11 +9694,12 @@ }, { "args": [ - "keepalive_timeout" + "write_buffering_at_end" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -9565,7 +9707,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -9575,7 +9717,7 @@ }, { "args": [ - "large_metadata" + "authority_not_supported" ], "ci_platforms": [ "windows", @@ -9597,7 +9739,7 @@ }, { "args": [ - "load_reporting_hook" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -9619,14 +9761,14 @@ }, { "args": [ - "max_concurrent_streams" + "bad_ping" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9641,7 +9783,7 @@ }, { "args": [ - "max_connection_age" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -9663,18 +9805,16 @@ }, { "args": [ - "max_connection_idle" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -9687,7 +9827,7 @@ }, { "args": [ - "max_message_length" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -9709,14 +9849,14 @@ }, { "args": [ - "negative_deadline" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9731,7 +9871,7 @@ }, { "args": [ - "network_status_change" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -9753,14 +9893,14 @@ }, { "args": [ - "no_logging" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9775,14 +9915,14 @@ }, { "args": [ - "no_op" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9797,14 +9937,14 @@ }, { "args": [ - "payload" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9819,7 +9959,7 @@ }, { "args": [ - "ping" + "cancel_with_status" ], "ci_platforms": [ "windows", @@ -9841,14 +9981,14 @@ }, { "args": [ - "ping_pong_streaming" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9863,16 +10003,18 @@ }, { "args": [ - "registered_call" + "connectivity" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -9885,14 +10027,14 @@ }, { "args": [ - "request_with_flags" + "default_host" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9907,17 +10049,17 @@ }, { "args": [ - "request_with_payload" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": false, + "flaky": true, "language": "c", "name": "h2_fakesec_test", "platforms": [ @@ -9929,14 +10071,14 @@ }, { "args": [ - "resource_quota_server" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9951,14 +10093,14 @@ }, { "args": [ - "server_finishes_request" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -9973,7 +10115,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -9995,7 +10137,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "filter_latency" ], "ci_platforms": [ "windows", @@ -10017,7 +10159,7 @@ }, { "args": [ - "simple_cacheable_request" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -10039,14 +10181,14 @@ }, { "args": [ - "simple_delayed_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10061,14 +10203,14 @@ }, { "args": [ - "simple_metadata" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10083,14 +10225,14 @@ }, { "args": [ - "simple_request" + "hpack_size" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10105,7 +10247,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -10127,7 +10269,7 @@ }, { "args": [ - "stream_compression_payload" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -10149,14 +10291,14 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "keepalive_timeout" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10171,14 +10313,14 @@ }, { "args": [ - "streaming_error_response" + "large_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10193,7 +10335,7 @@ }, { "args": [ - "trailing_metadata" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -10215,14 +10357,14 @@ }, { "args": [ - "workaround_cronet_compression" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -10237,7 +10379,7 @@ }, { "args": [ - "write_buffering" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -10259,7 +10401,7 @@ }, { "args": [ - "write_buffering_at_end" + "max_connection_idle" ], "ci_platforms": [ "windows", @@ -10268,7 +10410,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -10281,22 +10425,21 @@ }, { "args": [ - "authority_not_supported" + "max_message_length" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10304,22 +10447,21 @@ }, { "args": [ - "bad_hostname" + "negative_deadline" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10327,22 +10469,21 @@ }, { "args": [ - "binary_metadata" + "network_status_change" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10350,22 +10491,21 @@ }, { "args": [ - "call_creds" + "no_logging" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10373,22 +10513,21 @@ }, { "args": [ - "cancel_after_accept" + "no_op" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10396,22 +10535,21 @@ }, { "args": [ - "cancel_after_client_done" + "payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10419,22 +10557,21 @@ }, { "args": [ - "cancel_after_invoke" + "ping" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10442,22 +10579,21 @@ }, { "args": [ - "cancel_after_round_trip" + "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10465,22 +10601,21 @@ }, { "args": [ - "cancel_before_invoke" + "registered_call" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10488,22 +10623,21 @@ }, { "args": [ - "cancel_in_a_vacuum" + "request_with_flags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10511,22 +10645,21 @@ }, { "args": [ - "cancel_with_status" + "request_with_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10534,22 +10667,21 @@ }, { "args": [ - "compressed_payload" + "resource_quota_server" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10557,22 +10689,21 @@ }, { "args": [ - "empty_batch" + "retry" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10580,22 +10711,21 @@ }, { "args": [ - "filter_call_init_fails" + "retry_cancellation" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10603,22 +10733,21 @@ }, { "args": [ - "filter_causes_close" + "retry_disabled" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10626,22 +10755,21 @@ }, { "args": [ - "filter_latency" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10649,22 +10777,21 @@ }, { "args": [ - "filter_status_code" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10672,22 +10799,21 @@ }, { "args": [ - "graceful_server_shutdown" + "retry_non_retriable_status" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10695,22 +10821,21 @@ }, { "args": [ - "high_initial_seqno" + "retry_recv_initial_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10718,22 +10843,21 @@ }, { "args": [ - "hpack_size" + "retry_recv_message" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10741,22 +10865,21 @@ }, { "args": [ - "idempotent_request" + "retry_server_pushback_delay" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10764,22 +10887,21 @@ }, { "args": [ - "invoke_large_request" + "retry_server_pushback_disabled" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10787,22 +10909,21 @@ }, { "args": [ - "keepalive_timeout" + "retry_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10810,22 +10931,21 @@ }, { "args": [ - "large_metadata" + "retry_streaming_after_commit" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10833,22 +10953,21 @@ }, { "args": [ - "load_reporting_hook" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10856,22 +10975,21 @@ }, { "args": [ - "max_concurrent_streams" + "retry_throttled" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10879,22 +10997,21 @@ }, { "args": [ - "max_connection_age" + "retry_too_many_attempts" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10902,22 +11019,21 @@ }, { "args": [ - "max_message_length" + "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10925,22 +11041,21 @@ }, { "args": [ - "negative_deadline" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10948,22 +11063,21 @@ }, { "args": [ - "network_status_change" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10971,22 +11085,21 @@ }, { "args": [ - "no_logging" + "simple_cacheable_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -10994,22 +11107,21 @@ }, { "args": [ - "no_op" + "simple_delayed_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11017,22 +11129,21 @@ }, { "args": [ - "payload" + "simple_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11040,22 +11151,21 @@ }, { "args": [ - "ping_pong_streaming" + "simple_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11063,22 +11173,21 @@ }, { "args": [ - "registered_call" + "stream_compression_compressed_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11086,22 +11195,21 @@ }, { "args": [ - "request_with_flags" + "stream_compression_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11109,22 +11217,21 @@ }, { "args": [ - "request_with_payload" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11132,22 +11239,21 @@ }, { "args": [ - "resource_quota_server" + "streaming_error_response" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11155,22 +11261,21 @@ }, { "args": [ - "server_finishes_request" + "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11178,22 +11283,21 @@ }, { "args": [ - "shutdown_finishes_calls" + "workaround_cronet_compression" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11201,22 +11305,21 @@ }, { "args": [ - "shutdown_finishes_tags" + "write_buffering" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11224,22 +11327,21 @@ }, { "args": [ - "simple_cacheable_request" + "write_buffering_at_end" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -11247,7 +11349,7 @@ }, { "args": [ - "simple_metadata" + "authority_not_supported" ], "ci_platforms": [ "linux", @@ -11270,7 +11372,7 @@ }, { "args": [ - "simple_request" + "bad_hostname" ], "ci_platforms": [ "linux", @@ -11293,14 +11395,14 @@ }, { "args": [ - "stream_compression_compressed_payload" + "binary_metadata" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -11316,7 +11418,7 @@ }, { "args": [ - "stream_compression_payload" + "call_creds" ], "ci_platforms": [ "linux", @@ -11339,14 +11441,14 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "cancel_after_accept" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -11362,7 +11464,7 @@ }, { "args": [ - "streaming_error_response" + "cancel_after_client_done" ], "ci_platforms": [ "linux", @@ -11385,14 +11487,14 @@ }, { "args": [ - "trailing_metadata" + "cancel_after_invoke" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -11408,14 +11510,14 @@ }, { "args": [ - "workaround_cronet_compression" + "cancel_after_round_trip" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -11431,7 +11533,7 @@ }, { "args": [ - "write_buffering" + "cancel_before_invoke" ], "ci_platforms": [ "linux", @@ -11454,7 +11556,7 @@ }, { "args": [ - "write_buffering_at_end" + "cancel_in_a_vacuum" ], "ci_platforms": [ "linux", @@ -11477,45 +11579,22 @@ }, { "args": [ - "authority_not_supported" + "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "exclude_iomgrs": [ + "uv" ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11523,22 +11602,22 @@ }, { "args": [ - "bad_ping" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11546,22 +11625,22 @@ }, { "args": [ - "binary_metadata" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11569,22 +11648,22 @@ }, { "args": [ - "call_creds" + "filter_call_init_fails" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11592,22 +11671,22 @@ }, { "args": [ - "cancel_after_accept" + "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11615,22 +11694,22 @@ }, { "args": [ - "cancel_after_client_done" + "filter_latency" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11638,22 +11717,22 @@ }, { "args": [ - "cancel_after_invoke" + "filter_status_code" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11661,22 +11740,22 @@ }, { "args": [ - "cancel_after_round_trip" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11684,22 +11763,22 @@ }, { "args": [ - "cancel_before_invoke" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11707,22 +11786,22 @@ }, { "args": [ - "cancel_in_a_vacuum" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11730,22 +11809,22 @@ }, { "args": [ - "cancel_with_status" + "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11753,22 +11832,22 @@ }, { "args": [ - "compressed_payload" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11776,10 +11855,9 @@ }, { "args": [ - "connectivity" + "keepalive_timeout" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -11791,9 +11869,8 @@ ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11801,22 +11878,22 @@ }, { "args": [ - "default_host" + "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11824,22 +11901,22 @@ }, { "args": [ - "disappearing_server" + "load_reporting_hook" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": true, + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11847,22 +11924,22 @@ }, { "args": [ - "empty_batch" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11870,22 +11947,22 @@ }, { "args": [ - "filter_call_init_fails" + "max_connection_age" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11893,22 +11970,22 @@ }, { "args": [ - "filter_causes_close" + "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11916,22 +11993,22 @@ }, { "args": [ - "filter_latency" + "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11939,22 +12016,22 @@ }, { "args": [ - "filter_status_code" + "network_status_change" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11962,22 +12039,22 @@ }, { "args": [ - "graceful_server_shutdown" + "no_logging" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -11985,22 +12062,22 @@ }, { "args": [ - "high_initial_seqno" + "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12008,22 +12085,22 @@ }, { "args": [ - "hpack_size" + "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12031,22 +12108,22 @@ }, { "args": [ - "idempotent_request" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12054,22 +12131,22 @@ }, { "args": [ - "invoke_large_request" + "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12077,22 +12154,22 @@ }, { "args": [ - "keepalive_timeout" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12100,22 +12177,22 @@ }, { "args": [ - "large_metadata" + "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12123,22 +12200,22 @@ }, { "args": [ - "load_reporting_hook" + "resource_quota_server" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12146,22 +12223,22 @@ }, { "args": [ - "max_concurrent_streams" + "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12169,22 +12246,22 @@ }, { "args": [ - "max_connection_age" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12192,10 +12269,9 @@ }, { "args": [ - "max_connection_idle" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -12207,9 +12283,8 @@ ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12217,22 +12292,22 @@ }, { "args": [ - "max_message_length" + "simple_cacheable_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12240,22 +12315,22 @@ }, { "args": [ - "negative_deadline" + "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12263,22 +12338,22 @@ }, { "args": [ - "network_status_change" + "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12286,22 +12361,22 @@ }, { "args": [ - "no_logging" + "stream_compression_compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12309,22 +12384,22 @@ }, { "args": [ - "no_op" + "stream_compression_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12332,22 +12407,22 @@ }, { "args": [ - "payload" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12355,22 +12430,22 @@ }, { "args": [ - "ping" + "streaming_error_response" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12378,22 +12453,22 @@ }, { "args": [ - "ping_pong_streaming" + "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12401,22 +12476,22 @@ }, { "args": [ - "registered_call" + "workaround_cronet_compression" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12424,22 +12499,22 @@ }, { "args": [ - "request_with_flags" + "write_buffering" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12447,22 +12522,22 @@ }, { "args": [ - "request_with_payload" + "write_buffering_at_end" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -12470,7 +12545,7 @@ }, { "args": [ - "resource_quota_server" + "authority_not_supported" ], "ci_platforms": [ "windows", @@ -12493,7 +12568,7 @@ }, { "args": [ - "server_finishes_request" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -12501,7 +12576,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12516,7 +12591,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "bad_ping" ], "ci_platforms": [ "windows", @@ -12524,7 +12599,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12539,7 +12614,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -12562,7 +12637,7 @@ }, { "args": [ - "simple_cacheable_request" + "call_creds" ], "ci_platforms": [ "windows", @@ -12570,7 +12645,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12585,7 +12660,7 @@ }, { "args": [ - "simple_delayed_request" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -12593,7 +12668,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12608,7 +12683,7 @@ }, { "args": [ - "simple_metadata" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -12616,7 +12691,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12631,7 +12706,7 @@ }, { "args": [ - "simple_request" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -12639,7 +12714,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12654,7 +12729,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", @@ -12662,7 +12737,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12677,7 +12752,7 @@ }, { "args": [ - "stream_compression_payload" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -12685,7 +12760,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12700,7 +12775,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -12708,7 +12783,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12723,7 +12798,7 @@ }, { "args": [ - "streaming_error_response" + "cancel_with_status" ], "ci_platforms": [ "windows", @@ -12746,7 +12821,7 @@ }, { "args": [ - "trailing_metadata" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -12769,7 +12844,7 @@ }, { "args": [ - "workaround_cronet_compression" + "connectivity" ], "ci_platforms": [ "windows", @@ -12777,9 +12852,11 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full_test", @@ -12792,7 +12869,7 @@ }, { "args": [ - "write_buffering" + "default_host" ], "ci_platforms": [ "windows", @@ -12800,7 +12877,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -12815,7 +12892,7 @@ }, { "args": [ - "write_buffering_at_end" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -12823,10 +12900,10 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": false, + "flaky": true, "language": "c", "name": "h2_full_test", "platforms": [ @@ -12838,838 +12915,993 @@ }, { "args": [ - "authority_not_supported" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "filter_call_init_fails" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_ping" + "filter_causes_close" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "filter_latency" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "filter_status_code" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_round_trip" + "idempotent_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "keepalive_timeout" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "load_reporting_hook" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "default_host" + "max_connection_age" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "max_connection_idle" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "filter_call_init_fails" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "filter_causes_close" + "network_status_change" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "filter_latency" + "no_logging" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "filter_status_code" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "idempotent_request" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "keepalive_timeout" + "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "load_reporting_hook" + "resource_quota_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "retry" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_connection_age" + "retry_cancellation" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_connection_idle" + "retry_disabled" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "network_status_change" + "retry_non_retriable_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_logging" + "retry_recv_initial_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "retry_recv_message" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "retry_server_pushback_delay" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "retry_server_pushback_disabled" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "retry_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "retry_streaming_after_commit" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "retry_throttled" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "resource_quota_server" + "retry_too_many_attempts" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13677,18 +13909,22 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13696,18 +13932,22 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13715,18 +13955,22 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13734,18 +13978,22 @@ "simple_cacheable_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13753,18 +14001,22 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13772,18 +14024,22 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13791,18 +14047,22 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13810,18 +14070,22 @@ "stream_compression_compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13829,18 +14093,22 @@ "stream_compression_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13848,18 +14116,22 @@ "stream_compression_ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13867,18 +14139,22 @@ "streaming_error_response" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13886,18 +14162,22 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13905,18 +14185,22 @@ "workaround_cronet_compression" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13924,18 +14208,22 @@ "write_buffering" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13943,18 +14231,22 @@ "write_buffering_at_end" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13962,22 +14254,18 @@ "authority_not_supported" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13985,22 +14273,18 @@ "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14008,22 +14292,18 @@ "bad_ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14031,22 +14311,18 @@ "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14054,22 +14330,18 @@ "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14077,22 +14349,18 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14100,22 +14368,18 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14123,22 +14387,18 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14146,22 +14406,18 @@ "cancel_after_round_trip" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14169,22 +14425,18 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14192,22 +14444,18 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14215,22 +14463,18 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14238,22 +14482,18 @@ "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14261,10 +14501,7 @@ "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], @@ -14273,12 +14510,9 @@ ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14286,22 +14520,18 @@ "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14309,22 +14539,18 @@ "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": true, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14332,22 +14558,18 @@ "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14355,22 +14577,18 @@ "filter_call_init_fails" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14378,22 +14596,18 @@ "filter_causes_close" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14401,22 +14615,18 @@ "filter_latency" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14424,22 +14634,18 @@ "filter_status_code" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14447,22 +14653,18 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14470,45 +14672,56 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "idempotent_request" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" ] }, { @@ -14516,22 +14729,18 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14539,22 +14748,18 @@ "keepalive_timeout" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14562,22 +14767,18 @@ "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14585,22 +14786,18 @@ "load_reporting_hook" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14608,22 +14805,18 @@ "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14631,22 +14824,18 @@ "max_connection_age" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14654,10 +14843,7 @@ "max_connection_idle" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], @@ -14666,12 +14852,9 @@ ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14679,22 +14862,18 @@ "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14702,22 +14881,18 @@ "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14725,22 +14900,37 @@ "network_status_change" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" ] }, { @@ -14748,22 +14938,18 @@ "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14771,22 +14957,18 @@ "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14794,22 +14976,18 @@ "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14817,22 +14995,18 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14840,22 +15014,18 @@ "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14863,22 +15033,18 @@ "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14886,22 +15052,18 @@ "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14909,275 +15071,512 @@ "resource_quota_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "retry" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "retry_cancellation" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "retry_disabled" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_cacheable_request" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "retry_non_retriable_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_request" + "retry_recv_initial_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "stream_compression_compressed_payload" + "retry_recv_message" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "stream_compression_payload" + "retry_server_pushback_delay" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "stream_compression_ping_pong_streaming" + "retry_server_pushback_disabled" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "streaming_error_response" + "retry_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "retry_streaming_after_commit" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "retry_streaming_succeeds_before_replay_finished" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "retry_throttled" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "retry_too_many_attempts" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "stream_compression_compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "stream_compression_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "stream_compression_ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" ] }, { @@ -15185,22 +15584,18 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -15208,22 +15603,18 @@ "workaround_cronet_compression" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -15231,22 +15622,18 @@ "write_buffering" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -15254,22 +15641,18 @@ "write_buffering_at_end" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -15287,7 +15670,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15310,7 +15693,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15333,7 +15716,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15356,7 +15739,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15379,7 +15762,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15402,7 +15785,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15425,7 +15808,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15448,7 +15831,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15471,7 +15854,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15494,7 +15877,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15517,7 +15900,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15540,7 +15923,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15563,7 +15946,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15588,7 +15971,7 @@ ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15611,7 +15994,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15634,7 +16017,7 @@ "exclude_iomgrs": [], "flaky": true, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15657,7 +16040,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15680,7 +16063,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15703,7 +16086,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15726,7 +16109,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15749,7 +16132,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15772,7 +16155,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15795,30 +16178,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15841,7 +16201,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15864,7 +16224,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15887,7 +16247,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15910,7 +16270,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15933,7 +16293,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15956,7 +16316,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -15979,7 +16339,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16004,7 +16364,7 @@ ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16027,7 +16387,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16050,7 +16410,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16073,30 +16433,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "no_logging" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16119,7 +16456,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16142,7 +16479,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16165,7 +16502,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16188,7 +16525,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16211,7 +16548,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16234,7 +16571,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16257,7 +16594,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16280,7 +16617,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16290,7 +16627,7 @@ }, { "args": [ - "server_finishes_request" + "retry" ], "ci_platforms": [ "windows", @@ -16303,7 +16640,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16313,7 +16650,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -16326,7 +16663,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16336,7 +16673,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -16349,7 +16686,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16359,7 +16696,7 @@ }, { "args": [ - "simple_cacheable_request" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -16372,7 +16709,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16382,7 +16719,7 @@ }, { "args": [ - "simple_delayed_request" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -16390,12 +16727,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16405,7 +16742,7 @@ }, { "args": [ - "simple_metadata" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -16413,12 +16750,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16428,7 +16765,7 @@ }, { "args": [ - "simple_request" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -16436,12 +16773,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16451,7 +16788,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -16459,12 +16796,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16474,7 +16811,7 @@ }, { "args": [ - "stream_compression_payload" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -16482,12 +16819,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16497,7 +16834,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -16505,12 +16842,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16520,7 +16857,7 @@ }, { "args": [ - "streaming_error_response" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -16533,7 +16870,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16543,7 +16880,7 @@ }, { "args": [ - "trailing_metadata" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -16551,12 +16888,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16566,7 +16903,7 @@ }, { "args": [ - "workaround_cronet_compression" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -16574,12 +16911,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16589,7 +16926,7 @@ }, { "args": [ - "write_buffering" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -16602,7 +16939,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16612,7 +16949,7 @@ }, { "args": [ - "write_buffering_at_end" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -16625,7 +16962,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+workarounds_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16635,21 +16972,20 @@ }, { "args": [ - "authority_not_supported" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16659,21 +16995,20 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16683,21 +17018,20 @@ }, { "args": [ - "bad_ping" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16707,21 +17041,20 @@ }, { "args": [ - "binary_metadata" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16731,21 +17064,20 @@ }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16755,21 +17087,20 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16779,21 +17110,20 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16803,21 +17133,20 @@ }, { "args": [ - "cancel_after_invoke" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16827,21 +17156,20 @@ }, { "args": [ - "cancel_after_round_trip" + "stream_compression_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16851,21 +17179,20 @@ }, { "args": [ - "cancel_before_invoke" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16875,21 +17202,20 @@ }, { "args": [ - "cancel_in_a_vacuum" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16899,21 +17225,20 @@ }, { "args": [ - "cancel_with_status" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16923,21 +17248,20 @@ }, { "args": [ - "compressed_payload" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16947,21 +17271,20 @@ }, { "args": [ - "connectivity" + "write_buffering" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16971,21 +17294,20 @@ }, { "args": [ - "default_host" + "write_buffering_at_end" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -16995,21 +17317,20 @@ }, { "args": [ - "disappearing_server" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": true, + "exclude_iomgrs": [], + "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17019,21 +17340,20 @@ }, { "args": [ - "empty_batch" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17043,21 +17363,20 @@ }, { "args": [ - "filter_call_init_fails" + "bad_ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17067,21 +17386,20 @@ }, { "args": [ - "filter_causes_close" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17091,21 +17409,20 @@ }, { "args": [ - "filter_latency" + "call_creds" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17115,21 +17432,20 @@ }, { "args": [ - "filter_status_code" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17139,21 +17455,20 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17163,21 +17478,20 @@ }, { "args": [ - "high_initial_seqno" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17187,21 +17501,20 @@ }, { "args": [ - "hpack_size" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17211,21 +17524,20 @@ }, { "args": [ - "idempotent_request" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17235,21 +17547,20 @@ }, { "args": [ - "invoke_large_request" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17259,21 +17570,20 @@ }, { "args": [ - "keepalive_timeout" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17283,21 +17593,20 @@ }, { "args": [ - "large_metadata" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17307,21 +17616,22 @@ }, { "args": [ - "load_reporting_hook" + "connectivity" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17331,21 +17641,20 @@ }, { "args": [ - "max_concurrent_streams" + "default_host" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17355,21 +17664,20 @@ }, { "args": [ - "max_connection_age" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, + "exclude_iomgrs": [], + "flaky": true, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17379,21 +17687,20 @@ }, { "args": [ - "max_connection_idle" + "empty_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17403,21 +17710,20 @@ }, { "args": [ - "max_message_length" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17427,21 +17733,20 @@ }, { "args": [ - "negative_deadline" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17451,21 +17756,20 @@ }, { "args": [ - "network_status_change" + "filter_latency" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17475,21 +17779,20 @@ }, { "args": [ - "no_logging" + "filter_status_code" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17499,21 +17802,20 @@ }, { "args": [ - "no_op" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17523,21 +17825,20 @@ }, { "args": [ - "payload" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17547,21 +17848,20 @@ }, { "args": [ - "ping" + "hpack_size" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17571,21 +17871,20 @@ }, { "args": [ - "ping_pong_streaming" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17595,21 +17894,20 @@ }, { "args": [ - "proxy_auth" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17619,45 +17917,20 @@ }, { "args": [ - "registered_call" + "keepalive_timeout" ], "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_test", - "platforms": [ "windows", "linux", "mac", "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17667,21 +17940,20 @@ }, { "args": [ - "request_with_payload" + "large_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17691,21 +17963,20 @@ }, { "args": [ - "resource_quota_server" + "load_reporting_hook" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17715,21 +17986,20 @@ }, { "args": [ - "server_finishes_request" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17739,21 +18009,20 @@ }, { "args": [ - "shutdown_finishes_calls" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17763,11 +18032,12 @@ }, { "args": [ - "shutdown_finishes_tags" + "max_connection_idle" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -17777,7 +18047,7 @@ ], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17787,21 +18057,20 @@ }, { "args": [ - "simple_cacheable_request" + "max_message_length" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17811,45 +18080,20 @@ }, { "args": [ - "simple_delayed_request" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_test", - "platforms": [ "windows", "linux", "mac", "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17859,21 +18103,20 @@ }, { "args": [ - "simple_request" + "network_status_change" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17883,21 +18126,20 @@ }, { "args": [ - "stream_compression_compressed_payload" + "no_logging" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17907,21 +18149,20 @@ }, { "args": [ - "stream_compression_payload" + "no_op" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17931,21 +18172,20 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17955,21 +18195,20 @@ }, { "args": [ - "streaming_error_response" + "ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -17979,21 +18218,20 @@ }, { "args": [ - "trailing_metadata" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18003,21 +18241,20 @@ }, { "args": [ - "workaround_cronet_compression" + "registered_call" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18027,21 +18264,20 @@ }, { "args": [ - "write_buffering" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18051,21 +18287,20 @@ }, { "args": [ - "write_buffering_at_end" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18075,7 +18310,7 @@ }, { "args": [ - "authority_not_supported" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -18088,7 +18323,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18098,7 +18333,7 @@ }, { "args": [ - "bad_hostname" + "retry" ], "ci_platforms": [ "windows", @@ -18106,12 +18341,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18121,7 +18356,7 @@ }, { "args": [ - "bad_ping" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -18129,12 +18364,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18144,7 +18379,7 @@ }, { "args": [ - "binary_metadata" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -18157,7 +18392,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18167,7 +18402,7 @@ }, { "args": [ - "call_creds" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -18175,12 +18410,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18190,7 +18425,7 @@ }, { "args": [ - "cancel_after_accept" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -18203,7 +18438,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18213,7 +18448,7 @@ }, { "args": [ - "cancel_after_client_done" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -18226,7 +18461,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18236,7 +18471,7 @@ }, { "args": [ - "cancel_after_invoke" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -18249,7 +18484,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18259,7 +18494,7 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -18272,7 +18507,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18282,7 +18517,7 @@ }, { "args": [ - "cancel_before_invoke" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -18295,7 +18530,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18305,7 +18540,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -18318,7 +18553,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18328,7 +18563,7 @@ }, { "args": [ - "cancel_with_status" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -18341,7 +18576,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18351,7 +18586,7 @@ }, { "args": [ - "compressed_payload" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -18359,12 +18594,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18374,7 +18609,7 @@ }, { "args": [ - "connectivity" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -18384,12 +18619,10 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18399,7 +18632,7 @@ }, { "args": [ - "default_host" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -18407,12 +18640,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18422,7 +18655,7 @@ }, { "args": [ - "disappearing_server" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -18430,12 +18663,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18445,7 +18678,7 @@ }, { "args": [ - "empty_batch" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -18458,7 +18691,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18468,7 +18701,7 @@ }, { "args": [ - "filter_call_init_fails" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -18476,12 +18709,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18491,7 +18724,7 @@ }, { "args": [ - "filter_causes_close" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -18504,7 +18737,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18514,7 +18747,7 @@ }, { "args": [ - "filter_latency" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -18527,7 +18760,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18537,7 +18770,7 @@ }, { "args": [ - "filter_status_code" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -18545,12 +18778,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18560,7 +18793,7 @@ }, { "args": [ - "graceful_server_shutdown" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -18568,12 +18801,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18583,7 +18816,7 @@ }, { "args": [ - "high_initial_seqno" + "simple_request" ], "ci_platforms": [ "windows", @@ -18591,12 +18824,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18606,7 +18839,7 @@ }, { "args": [ - "hpack_size" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -18614,12 +18847,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18629,7 +18862,7 @@ }, { "args": [ - "idempotent_request" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -18642,7 +18875,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18652,7 +18885,7 @@ }, { "args": [ - "invoke_large_request" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -18665,7 +18898,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18675,7 +18908,7 @@ }, { "args": [ - "keepalive_timeout" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -18688,7 +18921,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18698,7 +18931,7 @@ }, { "args": [ - "large_metadata" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -18711,7 +18944,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18721,7 +18954,7 @@ }, { "args": [ - "load_reporting_hook" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -18734,7 +18967,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18744,7 +18977,7 @@ }, { "args": [ - "max_concurrent_streams" + "write_buffering" ], "ci_platforms": [ "windows", @@ -18757,7 +18990,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18767,7 +19000,7 @@ }, { "args": [ - "max_connection_age" + "write_buffering_at_end" ], "ci_platforms": [ "windows", @@ -18780,7 +19013,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_full+workarounds_test", "platforms": [ "windows", "linux", @@ -18790,22 +19023,21 @@ }, { "args": [ - "max_connection_idle" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18815,20 +19047,21 @@ }, { "args": [ - "max_message_length" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18838,20 +19071,21 @@ }, { "args": [ - "negative_deadline" + "bad_ping" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18861,20 +19095,21 @@ }, { "args": [ - "network_status_change" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18884,20 +19119,21 @@ }, { "args": [ - "no_logging" + "call_creds" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18907,20 +19143,21 @@ }, { "args": [ - "no_op" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18930,20 +19167,21 @@ }, { "args": [ - "payload" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18953,20 +19191,21 @@ }, { "args": [ - "ping" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18976,20 +19215,21 @@ }, { "args": [ - "ping_pong_streaming" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -18999,20 +19239,21 @@ }, { "args": [ - "registered_call" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19022,20 +19263,21 @@ }, { "args": [ - "request_with_flags" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19045,20 +19287,21 @@ }, { "args": [ - "request_with_payload" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19068,20 +19311,21 @@ }, { "args": [ - "resource_quota_server" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19091,20 +19335,21 @@ }, { "args": [ - "server_finishes_request" + "connectivity" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19114,20 +19359,21 @@ }, { "args": [ - "shutdown_finishes_calls" + "default_host" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19137,20 +19383,21 @@ }, { "args": [ - "shutdown_finishes_tags" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, + "exclude_iomgrs": [ + "uv" + ], + "flaky": true, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19160,20 +19407,21 @@ }, { "args": [ - "simple_cacheable_request" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19183,284 +19431,7 @@ }, { "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "stream_compression_compressed_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "stream_compression_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "stream_compression_ping_pong_streaming" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "streaming_error_response" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "workaround_cronet_compression" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "write_buffering" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "write_buffering_at_end" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "authority_not_supported" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "bad_hostname" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -19474,7 +19445,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19484,21 +19455,21 @@ }, { "args": [ - "bad_ping" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19508,7 +19479,7 @@ }, { "args": [ - "binary_metadata" + "filter_latency" ], "ci_platforms": [ "windows", @@ -19522,7 +19493,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19532,21 +19503,21 @@ }, { "args": [ - "call_creds" + "filter_status_code" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19556,7 +19527,7 @@ }, { "args": [ - "cancel_after_accept" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -19570,7 +19541,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19580,7 +19551,7 @@ }, { "args": [ - "cancel_after_client_done" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -19594,7 +19565,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19604,7 +19575,7 @@ }, { "args": [ - "cancel_after_invoke" + "hpack_size" ], "ci_platforms": [ "windows", @@ -19618,7 +19589,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19628,21 +19599,21 @@ }, { "args": [ - "cancel_after_round_trip" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19652,21 +19623,21 @@ }, { "args": [ - "cancel_before_invoke" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19676,7 +19647,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -19690,7 +19661,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19700,21 +19671,21 @@ }, { "args": [ - "cancel_with_status" + "large_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19724,7 +19695,7 @@ }, { "args": [ - "compressed_payload" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -19738,7 +19709,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19748,7 +19719,7 @@ }, { "args": [ - "connectivity" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -19762,7 +19733,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19772,21 +19743,21 @@ }, { "args": [ - "default_host" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19796,21 +19767,21 @@ }, { "args": [ - "disappearing_server" + "max_connection_idle" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19820,7 +19791,7 @@ }, { "args": [ - "empty_batch" + "max_message_length" ], "ci_platforms": [ "windows", @@ -19834,7 +19805,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19844,7 +19815,7 @@ }, { "args": [ - "filter_call_init_fails" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -19858,7 +19829,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19868,7 +19839,7 @@ }, { "args": [ - "filter_causes_close" + "network_status_change" ], "ci_platforms": [ "windows", @@ -19882,7 +19853,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19892,21 +19863,21 @@ }, { "args": [ - "filter_latency" + "no_logging" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19916,21 +19887,21 @@ }, { "args": [ - "filter_status_code" + "no_op" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19940,21 +19911,21 @@ }, { "args": [ - "graceful_server_shutdown" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19964,7 +19935,7 @@ }, { "args": [ - "high_initial_seqno" + "ping" ], "ci_platforms": [ "windows", @@ -19978,7 +19949,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -19988,7 +19959,7 @@ }, { "args": [ - "hpack_size" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -20002,7 +19973,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20012,7 +19983,7 @@ }, { "args": [ - "idempotent_request" + "proxy_auth" ], "ci_platforms": [ "windows", @@ -20026,7 +19997,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20036,7 +20007,7 @@ }, { "args": [ - "invoke_large_request" + "registered_call" ], "ci_platforms": [ "windows", @@ -20050,7 +20021,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20060,7 +20031,7 @@ }, { "args": [ - "keepalive_timeout" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -20074,7 +20045,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20084,21 +20055,21 @@ }, { "args": [ - "large_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20108,7 +20079,7 @@ }, { "args": [ - "load_reporting_hook" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -20122,7 +20093,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20132,7 +20103,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry" ], "ci_platforms": [ "windows", @@ -20146,7 +20117,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20156,7 +20127,7 @@ }, { "args": [ - "max_connection_age" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -20170,7 +20141,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20180,7 +20151,7 @@ }, { "args": [ - "max_connection_idle" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -20194,7 +20165,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20204,7 +20175,7 @@ }, { "args": [ - "max_message_length" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -20218,7 +20189,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20228,21 +20199,21 @@ }, { "args": [ - "negative_deadline" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20252,7 +20223,7 @@ }, { "args": [ - "network_status_change" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -20266,7 +20237,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20276,21 +20247,21 @@ }, { "args": [ - "no_logging" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20300,21 +20271,21 @@ }, { "args": [ - "no_op" + "retry_recv_message" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20324,21 +20295,21 @@ }, { "args": [ - "payload" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20348,7 +20319,7 @@ }, { "args": [ - "ping" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -20362,7 +20333,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20372,7 +20343,7 @@ }, { "args": [ - "ping_pong_streaming" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -20386,7 +20357,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20396,21 +20367,21 @@ }, { "args": [ - "registered_call" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20420,7 +20391,7 @@ }, { "args": [ - "request_with_flags" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -20434,7 +20405,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20444,7 +20415,7 @@ }, { "args": [ - "request_with_payload" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -20458,7 +20429,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20468,21 +20439,21 @@ }, { "args": [ - "resource_quota_server" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20506,7 +20477,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20530,7 +20501,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20554,7 +20525,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20578,7 +20549,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20602,7 +20573,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20626,7 +20597,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20650,7 +20621,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20674,7 +20645,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20698,7 +20669,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20722,7 +20693,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20746,7 +20717,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20770,7 +20741,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20794,7 +20765,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20818,7 +20789,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20842,7 +20813,7 @@ ], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -20857,16 +20828,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -20881,16 +20851,38 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -20905,16 +20897,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -20929,16 +20920,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -20953,16 +20943,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -20977,16 +20966,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21001,16 +20989,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21025,16 +21012,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21049,16 +21035,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21073,16 +21058,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21097,16 +21081,15 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21116,21 +21099,20 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21140,21 +21122,22 @@ }, { "args": [ - "disappearing_server" + "connectivity" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21164,21 +21147,20 @@ }, { "args": [ - "empty_batch" + "default_host" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21188,21 +21170,20 @@ }, { "args": [ - "filter_call_init_fails" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, + "exclude_iomgrs": [], + "flaky": true, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21212,21 +21193,20 @@ }, { "args": [ - "filter_causes_close" + "empty_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21236,21 +21216,20 @@ }, { "args": [ - "filter_latency" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21260,21 +21239,20 @@ }, { "args": [ - "filter_status_code" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21284,21 +21262,20 @@ }, { "args": [ - "graceful_server_shutdown" + "filter_latency" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21308,21 +21285,20 @@ }, { "args": [ - "high_initial_seqno" + "filter_status_code" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21332,21 +21308,20 @@ }, { "args": [ - "idempotent_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21356,21 +21331,20 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21380,21 +21354,20 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21404,21 +21377,20 @@ }, { "args": [ - "load_reporting_hook" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21428,21 +21400,20 @@ }, { "args": [ - "max_connection_age" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21452,21 +21423,20 @@ }, { "args": [ - "max_message_length" + "keepalive_timeout" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21476,21 +21446,20 @@ }, { "args": [ - "negative_deadline" + "large_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21500,21 +21469,20 @@ }, { "args": [ - "network_status_change" + "load_reporting_hook" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21524,21 +21492,20 @@ }, { "args": [ - "no_logging" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21548,21 +21515,20 @@ }, { "args": [ - "no_op" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21572,21 +21538,22 @@ }, { "args": [ - "payload" + "max_connection_idle" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21596,21 +21563,20 @@ }, { "args": [ - "ping_pong_streaming" + "max_message_length" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21620,21 +21586,20 @@ }, { "args": [ - "registered_call" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21644,21 +21609,20 @@ }, { "args": [ - "request_with_payload" + "network_status_change" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21668,21 +21632,20 @@ }, { "args": [ - "server_finishes_request" + "no_logging" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21692,21 +21655,20 @@ }, { "args": [ - "shutdown_finishes_calls" + "no_op" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21716,21 +21678,20 @@ }, { "args": [ - "shutdown_finishes_tags" + "payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21740,21 +21701,20 @@ }, { "args": [ - "simple_cacheable_request" + "ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21764,21 +21724,20 @@ }, { "args": [ - "simple_delayed_request" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21788,21 +21747,20 @@ }, { "args": [ - "simple_metadata" + "registered_call" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21812,21 +21770,20 @@ }, { "args": [ - "simple_request" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21836,21 +21793,20 @@ }, { "args": [ - "stream_compression_payload" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21860,21 +21816,20 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "resource_quota_server" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21884,21 +21839,20 @@ }, { "args": [ - "streaming_error_response" + "retry" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21908,21 +21862,20 @@ }, { "args": [ - "trailing_metadata" + "retry_cancellation" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21932,21 +21885,20 @@ }, { "args": [ - "workaround_cronet_compression" + "retry_disabled" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21956,21 +21908,20 @@ }, { "args": [ - "write_buffering" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -21980,21 +21931,20 @@ }, { "args": [ - "write_buffering_at_end" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22004,21 +21954,20 @@ }, { "args": [ - "authority_not_supported" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22028,21 +21977,20 @@ }, { "args": [ - "bad_hostname" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22052,21 +22000,20 @@ }, { "args": [ - "binary_metadata" + "retry_recv_message" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22076,21 +22023,20 @@ }, { "args": [ - "call_creds" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22100,21 +22046,20 @@ }, { "args": [ - "cancel_after_accept" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22124,21 +22069,20 @@ }, { "args": [ - "cancel_after_client_done" + "retry_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22148,21 +22092,20 @@ }, { "args": [ - "cancel_after_invoke" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22172,21 +22115,20 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22196,21 +22138,20 @@ }, { "args": [ - "cancel_before_invoke" + "retry_throttled" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22220,21 +22161,20 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22244,21 +22184,20 @@ }, { "args": [ - "cancel_with_status" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22268,21 +22207,20 @@ }, { "args": [ - "compressed_payload" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22292,21 +22230,20 @@ }, { "args": [ - "empty_batch" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22316,21 +22253,20 @@ }, { "args": [ - "filter_call_init_fails" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22340,21 +22276,20 @@ }, { "args": [ - "filter_causes_close" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22364,21 +22299,20 @@ }, { "args": [ - "filter_latency" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22388,21 +22322,20 @@ }, { "args": [ - "filter_status_code" + "simple_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22412,21 +22345,20 @@ }, { "args": [ - "graceful_server_shutdown" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22436,21 +22368,20 @@ }, { "args": [ - "high_initial_seqno" + "stream_compression_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22460,21 +22391,20 @@ }, { "args": [ - "hpack_size" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22484,21 +22414,20 @@ }, { "args": [ - "idempotent_request" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22508,21 +22437,20 @@ }, { "args": [ - "invoke_large_request" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22532,21 +22460,20 @@ }, { "args": [ - "keepalive_timeout" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22556,21 +22483,20 @@ }, { "args": [ - "large_metadata" + "write_buffering" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22580,21 +22506,20 @@ }, { "args": [ - "load_reporting_hook" + "write_buffering_at_end" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -22604,21 +22529,21 @@ }, { "args": [ - "max_concurrent_streams" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22628,21 +22553,21 @@ }, { "args": [ - "max_connection_age" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22652,21 +22577,21 @@ }, { "args": [ - "max_message_length" + "bad_ping" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22676,21 +22601,21 @@ }, { "args": [ - "negative_deadline" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22700,21 +22625,21 @@ }, { "args": [ - "network_status_change" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22724,21 +22649,21 @@ }, { "args": [ - "no_logging" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22748,21 +22673,21 @@ }, { "args": [ - "no_op" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22772,21 +22697,21 @@ }, { "args": [ - "payload" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22796,7 +22721,7 @@ }, { "args": [ - "ping_pong_streaming" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", @@ -22810,7 +22735,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22820,21 +22745,21 @@ }, { "args": [ - "registered_call" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22844,7 +22769,7 @@ }, { "args": [ - "request_with_flags" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -22858,7 +22783,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22868,7 +22793,7 @@ }, { "args": [ - "request_with_payload" + "cancel_with_status" ], "ci_platforms": [ "windows", @@ -22882,7 +22807,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22892,7 +22817,7 @@ }, { "args": [ - "resource_quota_server" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -22906,7 +22831,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22916,7 +22841,7 @@ }, { "args": [ - "server_finishes_request" + "connectivity" ], "ci_platforms": [ "windows", @@ -22930,7 +22855,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22940,21 +22865,21 @@ }, { "args": [ - "shutdown_finishes_calls" + "default_host" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22964,21 +22889,21 @@ }, { "args": [ - "shutdown_finishes_tags" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": false, + "flaky": true, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -22988,7 +22913,7 @@ }, { "args": [ - "simple_cacheable_request" + "empty_batch" ], "ci_platforms": [ "windows", @@ -23002,7 +22927,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23012,7 +22937,7 @@ }, { "args": [ - "simple_metadata" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -23026,7 +22951,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23036,21 +22961,21 @@ }, { "args": [ - "simple_request" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23060,21 +22985,21 @@ }, { "args": [ - "stream_compression_compressed_payload" + "filter_latency" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23084,21 +23009,21 @@ }, { "args": [ - "stream_compression_payload" + "filter_status_code" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23108,21 +23033,21 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23132,7 +23057,7 @@ }, { "args": [ - "streaming_error_response" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -23146,7 +23071,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23156,21 +23081,21 @@ }, { "args": [ - "trailing_metadata" + "hpack_size" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23180,7 +23105,7 @@ }, { "args": [ - "workaround_cronet_compression" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -23194,7 +23119,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23204,21 +23129,21 @@ }, { "args": [ - "write_buffering" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23228,7 +23153,7 @@ }, { "args": [ - "write_buffering_at_end" + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -23242,7 +23167,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23252,7 +23177,7 @@ }, { "args": [ - "authority_not_supported" + "large_metadata" ], "ci_platforms": [ "windows", @@ -23266,7 +23191,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23276,7 +23201,7 @@ }, { "args": [ - "bad_hostname" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -23290,7 +23215,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23300,7 +23225,7 @@ }, { "args": [ - "binary_metadata" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -23314,7 +23239,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23324,21 +23249,21 @@ }, { "args": [ - "call_creds" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23348,7 +23273,7 @@ }, { "args": [ - "cancel_after_accept" + "max_connection_idle" ], "ci_platforms": [ "windows", @@ -23362,7 +23287,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23372,7 +23297,7 @@ }, { "args": [ - "cancel_after_client_done" + "max_message_length" ], "ci_platforms": [ "windows", @@ -23386,7 +23311,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23396,21 +23321,21 @@ }, { "args": [ - "cancel_after_invoke" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23420,7 +23345,7 @@ }, { "args": [ - "cancel_after_round_trip" + "network_status_change" ], "ci_platforms": [ "windows", @@ -23434,7 +23359,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23444,21 +23369,21 @@ }, { "args": [ - "cancel_before_invoke" + "no_logging" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23468,21 +23393,21 @@ }, { "args": [ - "cancel_in_a_vacuum" + "no_op" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23492,21 +23417,21 @@ }, { "args": [ - "cancel_with_status" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23516,21 +23441,21 @@ }, { "args": [ - "compressed_payload" + "ping" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23540,7 +23465,7 @@ }, { "args": [ - "empty_batch" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -23554,7 +23479,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23564,7 +23489,7 @@ }, { "args": [ - "filter_call_init_fails" + "registered_call" ], "ci_platforms": [ "windows", @@ -23578,7 +23503,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23588,7 +23513,7 @@ }, { "args": [ - "filter_causes_close" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -23602,7 +23527,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23612,7 +23537,7 @@ }, { "args": [ - "filter_latency" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -23626,7 +23551,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23636,21 +23561,21 @@ }, { "args": [ - "filter_status_code" + "resource_quota_server" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23660,7 +23585,7 @@ }, { "args": [ - "graceful_server_shutdown" + "retry" ], "ci_platforms": [ "windows", @@ -23674,7 +23599,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23684,7 +23609,7 @@ }, { "args": [ - "high_initial_seqno" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -23698,7 +23623,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23708,21 +23633,21 @@ }, { "args": [ - "idempotent_request" + "retry_disabled" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23732,21 +23657,21 @@ }, { "args": [ - "invoke_large_request" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23756,7 +23681,7 @@ }, { "args": [ - "keepalive_timeout" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -23770,7 +23695,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23780,21 +23705,21 @@ }, { "args": [ - "large_metadata" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23804,21 +23729,21 @@ }, { "args": [ - "load_reporting_hook" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23828,7 +23753,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -23842,7 +23767,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23852,7 +23777,7 @@ }, { "args": [ - "max_connection_age" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -23866,7 +23791,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23876,7 +23801,7 @@ }, { "args": [ - "max_message_length" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -23890,7 +23815,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23900,21 +23825,21 @@ }, { "args": [ - "negative_deadline" + "retry_streaming" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23924,7 +23849,7 @@ }, { "args": [ - "network_status_change" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -23938,7 +23863,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23948,21 +23873,21 @@ }, { "args": [ - "no_op" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23972,21 +23897,21 @@ }, { "args": [ - "payload" + "retry_throttled" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -23996,7 +23921,7 @@ }, { "args": [ - "ping_pong_streaming" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -24010,7 +23935,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24020,69 +23945,21 @@ }, { "args": [ - "registered_call" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24092,7 +23969,7 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -24106,7 +23983,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24116,7 +23993,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -24130,7 +24007,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24140,7 +24017,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -24154,7 +24031,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24164,21 +24041,21 @@ }, { "args": [ - "simple_cacheable_request" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24202,7 +24079,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24226,7 +24103,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24250,7 +24127,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24274,7 +24151,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24298,7 +24175,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24322,7 +24199,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24346,7 +24223,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24370,7 +24247,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24394,7 +24271,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24418,7 +24295,7 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -24436,15 +24313,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24462,15 +24337,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24488,15 +24361,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24514,15 +24385,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24540,15 +24409,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24566,15 +24433,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24592,15 +24457,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24618,15 +24481,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24644,15 +24505,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24670,15 +24529,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24696,15 +24553,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24714,7 +24569,7 @@ }, { "args": [ - "compressed_payload" + "default_host" ], "ci_platforms": [ "windows", @@ -24722,15 +24577,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24740,23 +24593,21 @@ }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "cpu_cost": 1.0, + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": false, + "flaky": true, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24766,23 +24617,21 @@ }, { "args": [ - "filter_call_init_fails" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "cpu_cost": 0.1, + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24792,23 +24641,21 @@ }, { "args": [ - "filter_causes_close" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "cpu_cost": 1.0, + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24818,7 +24665,7 @@ }, { "args": [ - "filter_latency" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -24826,15 +24673,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24844,7 +24689,7 @@ }, { "args": [ - "filter_status_code" + "filter_latency" ], "ci_platforms": [ "windows", @@ -24852,15 +24697,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24870,7 +24713,7 @@ }, { "args": [ - "graceful_server_shutdown" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -24878,15 +24721,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24896,7 +24737,7 @@ }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -24904,15 +24745,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24922,7 +24761,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -24930,15 +24769,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24956,15 +24793,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -24982,41 +24817,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "keepalive_timeout" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25034,15 +24841,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25060,41 +24865,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25112,15 +24889,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25138,15 +24913,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25164,15 +24937,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25190,15 +24961,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25216,15 +24985,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25242,15 +25009,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25268,15 +25033,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25294,15 +25057,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25320,41 +25081,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25372,15 +25105,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25398,15 +25129,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25424,15 +25153,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25450,15 +25177,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25476,15 +25201,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25494,7 +25217,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -25502,15 +25225,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25520,7 +25241,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -25528,15 +25249,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25546,7 +25265,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "simple_request" ], "ci_platforms": [ "windows", @@ -25554,15 +25273,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25580,15 +25297,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25606,15 +25321,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25632,15 +25345,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25658,15 +25369,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25684,15 +25393,13 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25710,15 +25417,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25736,15 +25441,13 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [ - "msan" - ], + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -25759,15 +25462,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25782,15 +25486,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25800,43 +25505,21 @@ }, { "args": [ - "bad_ping" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25851,15 +25534,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25874,15 +25558,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25897,15 +25582,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25920,15 +25606,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25943,15 +25630,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25966,15 +25654,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -25989,15 +25678,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26012,15 +25702,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26035,86 +25726,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": true, - "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26129,15 +25750,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26152,15 +25774,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26175,15 +25798,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26198,15 +25822,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26221,15 +25846,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26244,15 +25870,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26267,15 +25894,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26290,15 +25918,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26313,15 +25942,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26336,15 +25966,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26359,15 +25990,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26382,15 +26014,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26405,15 +26038,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26428,38 +26062,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_connection_age" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "exclude_iomgrs": [ + "uv" ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26469,12 +26081,11 @@ }, { "args": [ - "max_connection_idle" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, @@ -26484,7 +26095,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26499,15 +26110,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26522,15 +26134,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26545,15 +26158,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26568,15 +26182,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26591,15 +26206,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26614,38 +26230,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "exclude_iomgrs": [ + "uv" ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26660,15 +26254,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26683,15 +26278,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26706,15 +26302,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26729,15 +26326,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26752,15 +26350,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26775,15 +26374,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26798,15 +26398,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26821,15 +26422,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26844,38 +26446,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "exclude_iomgrs": [ + "uv" ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26890,15 +26470,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26913,15 +26494,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26936,15 +26518,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26959,15 +26542,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -26982,15 +26566,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27005,15 +26590,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27028,15 +26614,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27051,15 +26638,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27074,15 +26662,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27097,15 +26686,16 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -27129,7 +26719,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27153,7 +26743,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27177,7 +26767,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27201,7 +26791,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27225,7 +26815,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27249,7 +26839,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27273,7 +26863,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27297,7 +26887,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27321,7 +26911,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27345,7 +26935,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27369,7 +26959,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27379,7 +26969,7 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -27393,7 +26983,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27403,21 +26993,21 @@ }, { "args": [ - "disappearing_server" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27427,21 +27017,21 @@ }, { "args": [ - "empty_batch" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27451,21 +27041,21 @@ }, { "args": [ - "filter_call_init_fails" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27475,7 +27065,7 @@ }, { "args": [ - "filter_causes_close" + "filter_latency" ], "ci_platforms": [ "windows", @@ -27489,7 +27079,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27499,7 +27089,7 @@ }, { "args": [ - "filter_latency" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -27513,7 +27103,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27523,7 +27113,7 @@ }, { "args": [ - "filter_status_code" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -27537,7 +27127,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27547,7 +27137,7 @@ }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -27561,7 +27151,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27571,21 +27161,21 @@ }, { "args": [ - "high_initial_seqno" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27595,7 +27185,7 @@ }, { "args": [ - "idempotent_request" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -27609,7 +27199,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27619,21 +27209,21 @@ }, { "args": [ - "invoke_large_request" + "keepalive_timeout" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27657,7 +27247,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27681,7 +27271,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27691,7 +27281,7 @@ }, { "args": [ - "max_connection_age" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -27705,7 +27295,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27715,7 +27305,7 @@ }, { "args": [ - "max_message_length" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -27729,7 +27319,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27739,21 +27329,21 @@ }, { "args": [ - "negative_deadline" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27763,21 +27353,21 @@ }, { "args": [ - "network_status_change" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27787,21 +27377,21 @@ }, { "args": [ - "no_logging" + "network_status_change" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27825,7 +27415,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27849,7 +27439,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27873,7 +27463,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27897,7 +27487,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27907,7 +27497,7 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -27921,7 +27511,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27931,7 +27521,7 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -27945,7 +27535,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27955,7 +27545,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -27969,7 +27559,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -27979,7 +27569,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -27993,7 +27583,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28003,7 +27593,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -28017,7 +27607,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28027,21 +27617,21 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28065,7 +27655,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28089,7 +27679,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28099,7 +27689,7 @@ }, { "args": [ - "stream_compression_payload" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -28113,7 +27703,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28123,7 +27713,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -28137,7 +27727,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28147,21 +27737,21 @@ }, { "args": [ - "streaming_error_response" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28171,21 +27761,21 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28195,7 +27785,7 @@ }, { "args": [ - "workaround_cronet_compression" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -28209,7 +27799,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28219,21 +27809,21 @@ }, { "args": [ - "write_buffering" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28243,7 +27833,7 @@ }, { "args": [ - "write_buffering_at_end" + "write_buffering" ], "ci_platforms": [ "windows", @@ -28257,7 +27847,7 @@ ], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -28267,22 +27857,23 @@ }, { "args": [ - "authority_not_supported" + "write_buffering_at_end" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28290,22 +27881,25 @@ }, { "args": [ - "bad_hostname" + "authority_not_supported" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28313,22 +27907,25 @@ }, { "args": [ - "bad_ping" + "bad_hostname" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28339,19 +27936,22 @@ "binary_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28362,19 +27962,22 @@ "call_creds" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28385,19 +27988,22 @@ "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28408,19 +28014,22 @@ "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28431,19 +28040,22 @@ "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28454,19 +28066,22 @@ "cancel_after_round_trip" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28477,19 +28092,22 @@ "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28500,19 +28118,22 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28523,19 +28144,22 @@ "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28546,65 +28170,22 @@ "compressed_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" + "exclude_configs": [ + "msan" ], - "cpu_cost": 0.1, - "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": true, - "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28615,19 +28196,22 @@ "empty_batch" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28638,19 +28222,22 @@ "filter_call_init_fails" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28661,19 +28248,22 @@ "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28684,19 +28274,22 @@ "filter_latency" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28707,19 +28300,22 @@ "filter_status_code" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28730,19 +28326,22 @@ "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28753,19 +28352,22 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28776,19 +28378,22 @@ "hpack_size" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28799,19 +28404,22 @@ "idempotent_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28822,19 +28430,22 @@ "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28845,19 +28456,22 @@ "keepalive_timeout" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28868,19 +28482,22 @@ "large_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28891,19 +28508,22 @@ "load_reporting_hook" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28914,19 +28534,22 @@ "max_concurrent_streams" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28937,19 +28560,22 @@ "max_connection_age" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28957,22 +28583,25 @@ }, { "args": [ - "max_connection_idle" + "max_message_length" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -28980,22 +28609,25 @@ }, { "args": [ - "max_message_length" + "negative_deadline" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29003,45 +28635,25 @@ }, { "args": [ - "negative_deadline" + "network_status_change" ], "ci_platforms": [ + "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "network_status_change" - ], - "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29052,19 +28664,22 @@ "no_logging" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29075,19 +28690,22 @@ "no_op" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29098,42 +28716,22 @@ "payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" + "exclude_configs": [ + "msan" ], - "cpu_cost": 0.1, - "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29144,19 +28742,22 @@ "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29167,19 +28768,22 @@ "registered_call" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29190,19 +28794,22 @@ "request_with_flags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29213,19 +28820,22 @@ "request_with_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29233,22 +28843,25 @@ }, { "args": [ - "resource_quota_server" + "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29256,22 +28869,25 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29279,22 +28895,25 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29302,22 +28921,25 @@ }, { "args": [ - "shutdown_finishes_tags" + "simple_cacheable_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29325,22 +28947,25 @@ }, { "args": [ - "simple_cacheable_request" + "simple_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29348,22 +28973,25 @@ }, { "args": [ - "simple_delayed_request" + "simple_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29371,22 +28999,25 @@ }, { "args": [ - "simple_metadata" + "stream_compression_compressed_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29394,22 +29025,25 @@ }, { "args": [ - "simple_request" + "stream_compression_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29417,22 +29051,25 @@ }, { "args": [ - "stream_compression_compressed_payload" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29440,22 +29077,25 @@ }, { "args": [ - "stream_compression_payload" + "streaming_error_response" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29463,22 +29103,25 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29486,22 +29129,25 @@ }, { "args": [ - "streaming_error_response" + "workaround_cronet_compression" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29509,22 +29155,25 @@ }, { "args": [ - "trailing_metadata" + "write_buffering" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29532,22 +29181,25 @@ }, { "args": [ - "workaround_cronet_compression" + "write_buffering_at_end" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "msan" + ], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29555,22 +29207,22 @@ }, { "args": [ - "write_buffering" + "authority_not_supported" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29578,22 +29230,22 @@ }, { "args": [ - "write_buffering_at_end" + "bad_hostname" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -29601,7 +29253,7 @@ }, { "args": [ - "authority_not_supported" + "bad_ping" ], "ci_platforms": [ "windows", @@ -29614,7 +29266,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29637,7 +29289,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29660,7 +29312,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29683,7 +29335,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29706,7 +29358,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29729,7 +29381,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29752,7 +29404,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29775,7 +29427,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29798,7 +29450,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29821,7 +29473,101 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29844,7 +29590,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29867,7 +29613,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29890,7 +29636,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29913,7 +29659,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29936,7 +29682,30 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29959,7 +29728,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -29982,7 +29751,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30005,7 +29774,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30028,7 +29797,30 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30051,7 +29843,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30074,7 +29866,78 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30097,7 +29960,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30120,7 +29983,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30143,7 +30006,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30166,7 +30029,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30189,7 +30052,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30212,7 +30075,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30222,7 +30085,7 @@ }, { "args": [ - "ping_pong_streaming" + "ping" ], "ci_platforms": [ "windows", @@ -30235,7 +30098,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30245,7 +30108,7 @@ }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -30253,12 +30116,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30268,7 +30131,7 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ "windows", @@ -30276,12 +30139,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30291,7 +30154,7 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -30304,7 +30167,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30314,7 +30177,7 @@ }, { "args": [ - "resource_quota_server" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -30322,12 +30185,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30337,7 +30200,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -30345,12 +30208,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30360,7 +30223,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "retry" ], "ci_platforms": [ "windows", @@ -30373,7 +30236,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30383,7 +30246,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -30396,7 +30259,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30406,7 +30269,7 @@ }, { "args": [ - "simple_cacheable_request" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -30419,7 +30282,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30429,7 +30292,7 @@ }, { "args": [ - "simple_metadata" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -30437,12 +30300,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30452,7 +30315,7 @@ }, { "args": [ - "simple_request" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -30460,12 +30323,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30475,7 +30338,7 @@ }, { "args": [ - "streaming_error_response" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -30488,7 +30351,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30498,7 +30361,7 @@ }, { "args": [ - "trailing_metadata" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -30506,12 +30369,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30521,7 +30384,7 @@ }, { "args": [ - "workaround_cronet_compression" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -30529,12 +30392,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "inproc_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30544,7 +30407,7 @@ }, { "args": [ - "authority_not_supported" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -30552,12 +30415,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30567,7 +30430,7 @@ }, { "args": [ - "bad_hostname" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -30575,12 +30438,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30590,7 +30453,7 @@ }, { "args": [ - "bad_ping" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -30598,12 +30461,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30613,7 +30476,7 @@ }, { "args": [ - "binary_metadata" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -30626,7 +30489,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30636,7 +30499,7 @@ }, { "args": [ - "cancel_after_accept" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -30649,7 +30512,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30659,7 +30522,7 @@ }, { "args": [ - "cancel_after_client_done" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -30672,7 +30535,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30682,7 +30545,7 @@ }, { "args": [ - "cancel_after_invoke" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -30695,7 +30558,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30705,7 +30568,7 @@ }, { "args": [ - "cancel_after_round_trip" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -30718,7 +30581,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30728,7 +30591,7 @@ }, { "args": [ - "cancel_before_invoke" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -30741,7 +30604,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30751,7 +30614,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -30764,7 +30627,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30774,7 +30637,7 @@ }, { "args": [ - "cancel_with_status" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -30787,7 +30650,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30797,7 +30660,7 @@ }, { "args": [ - "compressed_payload" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -30810,7 +30673,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30820,7 +30683,7 @@ }, { "args": [ - "connectivity" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -30828,14 +30691,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30845,7 +30706,7 @@ }, { "args": [ - "default_host" + "simple_request" ], "ci_platforms": [ "windows", @@ -30858,7 +30719,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30868,7 +30729,7 @@ }, { "args": [ - "disappearing_server" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -30879,9 +30740,9 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30891,7 +30752,7 @@ }, { "args": [ - "empty_batch" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -30899,12 +30760,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30914,7 +30775,7 @@ }, { "args": [ - "filter_call_init_fails" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -30927,7 +30788,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30937,7 +30798,7 @@ }, { "args": [ - "filter_causes_close" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -30950,7 +30811,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30960,7 +30821,7 @@ }, { "args": [ - "filter_latency" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -30968,12 +30829,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -30983,7 +30844,7 @@ }, { "args": [ - "filter_status_code" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -30991,12 +30852,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -31006,7 +30867,7 @@ }, { "args": [ - "graceful_server_shutdown" + "write_buffering" ], "ci_platforms": [ "windows", @@ -31019,7 +30880,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -31029,7 +30890,7 @@ }, { "args": [ - "high_initial_seqno" + "write_buffering_at_end" ], "ci_platforms": [ "windows", @@ -31042,7 +30903,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -31052,20 +30913,21 @@ }, { "args": [ - "hpack_size" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31075,20 +30937,21 @@ }, { "args": [ - "idempotent_request" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31098,20 +30961,21 @@ }, { "args": [ - "invoke_large_request" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31121,20 +30985,21 @@ }, { "args": [ - "keepalive_timeout" + "call_creds" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31144,20 +31009,21 @@ }, { "args": [ - "large_metadata" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31167,20 +31033,21 @@ }, { "args": [ - "load_reporting_hook" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31190,20 +31057,21 @@ }, { "args": [ - "max_concurrent_streams" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31213,20 +31081,21 @@ }, { "args": [ - "max_connection_age" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31236,12 +31105,11 @@ }, { "args": [ - "max_connection_idle" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, @@ -31251,7 +31119,7 @@ ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31261,20 +31129,21 @@ }, { "args": [ - "max_message_length" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31284,20 +31153,21 @@ }, { "args": [ - "negative_deadline" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31307,20 +31177,21 @@ }, { "args": [ - "network_status_change" + "default_host" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31330,20 +31201,21 @@ }, { "args": [ - "no_logging" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, + "exclude_iomgrs": [ + "uv" + ], + "flaky": true, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31353,20 +31225,21 @@ }, { "args": [ - "no_op" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31376,20 +31249,21 @@ }, { "args": [ - "payload" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31399,20 +31273,21 @@ }, { "args": [ - "ping" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31422,20 +31297,21 @@ }, { "args": [ - "ping_pong_streaming" + "filter_latency" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31445,20 +31321,21 @@ }, { "args": [ - "registered_call" + "filter_status_code" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31468,20 +31345,21 @@ }, { "args": [ - "request_with_flags" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31491,20 +31369,21 @@ }, { "args": [ - "request_with_payload" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31514,20 +31393,21 @@ }, { "args": [ - "resource_quota_server" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31537,20 +31417,21 @@ }, { "args": [ - "server_finishes_request" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31560,20 +31441,21 @@ }, { "args": [ - "shutdown_finishes_calls" + "large_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31583,20 +31465,21 @@ }, { "args": [ - "shutdown_finishes_tags" + "load_reporting_hook" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31606,20 +31489,21 @@ }, { "args": [ - "simple_cacheable_request" + "max_connection_age" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31629,20 +31513,21 @@ }, { "args": [ - "simple_delayed_request" + "max_message_length" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31652,20 +31537,21 @@ }, { "args": [ - "simple_metadata" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31675,20 +31561,21 @@ }, { "args": [ - "simple_request" + "network_status_change" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31698,20 +31585,21 @@ }, { "args": [ - "stream_compression_compressed_payload" + "no_logging" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31721,20 +31609,21 @@ }, { "args": [ - "stream_compression_payload" + "no_op" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31744,20 +31633,21 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31767,20 +31657,21 @@ }, { "args": [ - "streaming_error_response" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31790,20 +31681,21 @@ }, { "args": [ - "trailing_metadata" + "registered_call" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31813,20 +31705,21 @@ }, { "args": [ - "workaround_cronet_compression" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31836,20 +31729,21 @@ }, { "args": [ - "write_buffering" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31859,20 +31753,21 @@ }, { "args": [ - "write_buffering_at_end" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31882,20 +31777,21 @@ }, { "args": [ - "authority_not_supported" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31905,20 +31801,21 @@ }, { "args": [ - "bad_hostname" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31928,20 +31825,21 @@ }, { "args": [ - "bad_ping" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31951,20 +31849,21 @@ }, { "args": [ - "binary_metadata" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31974,20 +31873,21 @@ }, { "args": [ - "cancel_after_accept" + "simple_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -31997,20 +31897,21 @@ }, { "args": [ - "cancel_after_client_done" + "stream_compression_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32020,20 +31921,21 @@ }, { "args": [ - "cancel_after_invoke" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32043,20 +31945,21 @@ }, { "args": [ - "cancel_after_round_trip" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32066,20 +31969,21 @@ }, { "args": [ - "cancel_before_invoke" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32089,20 +31993,21 @@ }, { "args": [ - "cancel_in_a_vacuum" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32112,20 +32017,21 @@ }, { "args": [ - "cancel_with_status" + "write_buffering" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32135,20 +32041,21 @@ }, { "args": [ - "compressed_payload" + "write_buffering_at_end" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -32158,24 +32065,22 @@ }, { "args": [ - "connectivity" + "authority_not_supported" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32183,22 +32088,22 @@ }, { "args": [ - "default_host" + "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32206,22 +32111,22 @@ }, { "args": [ - "disappearing_server" + "bad_ping" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": true, + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32229,22 +32134,22 @@ }, { "args": [ - "empty_batch" + "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32252,22 +32157,22 @@ }, { "args": [ - "filter_call_init_fails" + "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32275,22 +32180,22 @@ }, { "args": [ - "filter_causes_close" + "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32298,22 +32203,22 @@ }, { "args": [ - "filter_latency" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32321,22 +32226,22 @@ }, { "args": [ - "filter_status_code" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32344,22 +32249,22 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_round_trip" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32367,22 +32272,22 @@ }, { "args": [ - "high_initial_seqno" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32390,22 +32295,22 @@ }, { "args": [ - "hpack_size" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32413,22 +32318,22 @@ }, { "args": [ - "idempotent_request" + "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32436,22 +32341,22 @@ }, { "args": [ - "invoke_large_request" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32459,22 +32364,22 @@ }, { "args": [ - "keepalive_timeout" + "connectivity" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32482,22 +32387,22 @@ }, { "args": [ - "large_metadata" + "disappearing_server" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, + "exclude_iomgrs": [ + "uv" + ], + "flaky": true, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32505,22 +32410,22 @@ }, { "args": [ - "load_reporting_hook" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32528,22 +32433,22 @@ }, { "args": [ - "max_concurrent_streams" + "filter_call_init_fails" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32551,22 +32456,22 @@ }, { "args": [ - "max_connection_age" + "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32574,10 +32479,9 @@ }, { "args": [ - "max_connection_idle" + "filter_latency" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -32589,9 +32493,8 @@ ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32599,22 +32502,22 @@ }, { "args": [ - "max_message_length" + "filter_status_code" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32622,22 +32525,22 @@ }, { "args": [ - "negative_deadline" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32645,22 +32548,22 @@ }, { "args": [ - "network_status_change" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32668,22 +32571,22 @@ }, { "args": [ - "no_logging" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32691,22 +32594,22 @@ }, { "args": [ - "no_op" + "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32714,22 +32617,22 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32737,22 +32640,22 @@ }, { "args": [ - "ping" + "keepalive_timeout" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32760,22 +32663,22 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32783,22 +32686,22 @@ }, { "args": [ - "registered_call" + "load_reporting_hook" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32806,22 +32709,22 @@ }, { "args": [ - "request_with_flags" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32829,22 +32732,22 @@ }, { "args": [ - "request_with_payload" + "max_connection_age" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32852,22 +32755,22 @@ }, { "args": [ - "server_finishes_request" + "max_connection_idle" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32875,22 +32778,22 @@ }, { "args": [ - "shutdown_finishes_calls" + "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32898,22 +32801,22 @@ }, { "args": [ - "shutdown_finishes_tags" + "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32921,22 +32824,22 @@ }, { "args": [ - "simple_cacheable_request" + "network_status_change" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32944,22 +32847,22 @@ }, { "args": [ - "simple_delayed_request" + "no_logging" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32967,22 +32870,22 @@ }, { "args": [ - "simple_metadata" + "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -32990,22 +32893,22 @@ }, { "args": [ - "simple_request" + "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33013,22 +32916,22 @@ }, { "args": [ - "stream_compression_compressed_payload" + "ping" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33036,22 +32939,22 @@ }, { "args": [ - "stream_compression_payload" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33059,22 +32962,22 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33082,22 +32985,22 @@ }, { "args": [ - "streaming_error_response" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33105,22 +33008,22 @@ }, { "args": [ - "trailing_metadata" + "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33128,22 +33031,22 @@ }, { "args": [ - "workaround_cronet_compression" + "resource_quota_server" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33151,22 +33054,22 @@ }, { "args": [ - "write_buffering" + "retry" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33174,22 +33077,22 @@ }, { "args": [ - "write_buffering_at_end" + "retry_cancellation" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -33197,21 +33100,21 @@ }, { "args": [ - "authority_not_supported" + "retry_disabled" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33220,21 +33123,21 @@ }, { "args": [ - "bad_hostname" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33243,7 +33146,7 @@ }, { "args": [ - "binary_metadata" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "linux", @@ -33257,7 +33160,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33266,7 +33169,7 @@ }, { "args": [ - "cancel_after_accept" + "retry_non_retriable_status" ], "ci_platforms": [ "linux", @@ -33280,7 +33183,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33289,7 +33192,7 @@ }, { "args": [ - "cancel_after_client_done" + "retry_recv_initial_metadata" ], "ci_platforms": [ "linux", @@ -33303,7 +33206,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33312,7 +33215,7 @@ }, { "args": [ - "cancel_after_invoke" + "retry_recv_message" ], "ci_platforms": [ "linux", @@ -33326,7 +33229,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33335,7 +33238,7 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_server_pushback_delay" ], "ci_platforms": [ "linux", @@ -33349,7 +33252,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33358,7 +33261,7 @@ }, { "args": [ - "cancel_before_invoke" + "retry_server_pushback_disabled" ], "ci_platforms": [ "linux", @@ -33372,7 +33275,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33381,7 +33284,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_streaming" ], "ci_platforms": [ "linux", @@ -33395,7 +33298,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33404,7 +33307,7 @@ }, { "args": [ - "cancel_with_status" + "retry_streaming_after_commit" ], "ci_platforms": [ "linux", @@ -33418,7 +33321,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33427,21 +33330,21 @@ }, { "args": [ - "compressed_payload" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33450,7 +33353,7 @@ }, { "args": [ - "empty_batch" + "retry_throttled" ], "ci_platforms": [ "linux", @@ -33464,7 +33367,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33473,21 +33376,21 @@ }, { "args": [ - "filter_call_init_fails" + "retry_too_many_attempts" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33496,7 +33399,7 @@ }, { "args": [ - "filter_causes_close" + "server_finishes_request" ], "ci_platforms": [ "linux", @@ -33510,7 +33413,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33519,7 +33422,7 @@ }, { "args": [ - "filter_latency" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux", @@ -33533,7 +33436,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33542,7 +33445,7 @@ }, { "args": [ - "filter_status_code" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux", @@ -33556,7 +33459,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33565,7 +33468,7 @@ }, { "args": [ - "graceful_server_shutdown" + "simple_cacheable_request" ], "ci_platforms": [ "linux", @@ -33579,7 +33482,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33588,21 +33491,21 @@ }, { "args": [ - "high_initial_seqno" + "simple_delayed_request" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33611,21 +33514,21 @@ }, { "args": [ - "hpack_size" + "simple_metadata" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33634,7 +33537,7 @@ }, { "args": [ - "idempotent_request" + "simple_request" ], "ci_platforms": [ "linux", @@ -33648,7 +33551,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33657,7 +33560,7 @@ }, { "args": [ - "invoke_large_request" + "stream_compression_compressed_payload" ], "ci_platforms": [ "linux", @@ -33671,7 +33574,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33680,21 +33583,21 @@ }, { "args": [ - "keepalive_timeout" + "stream_compression_payload" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33703,7 +33606,7 @@ }, { "args": [ - "large_metadata" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "linux", @@ -33717,7 +33620,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33726,21 +33629,21 @@ }, { "args": [ - "load_reporting_hook" + "streaming_error_response" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33749,21 +33652,21 @@ }, { "args": [ - "max_concurrent_streams" + "trailing_metadata" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33772,21 +33675,21 @@ }, { "args": [ - "max_connection_age" + "workaround_cronet_compression" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33795,7 +33698,7 @@ }, { "args": [ - "max_message_length" + "write_buffering" ], "ci_platforms": [ "linux", @@ -33809,7 +33712,7 @@ ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33818,21 +33721,21 @@ }, { "args": [ - "negative_deadline" + "write_buffering_at_end" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_uds_test", "platforms": [ "linux", "mac", @@ -33841,22 +33744,22 @@ }, { "args": [ - "network_status_change" + "authority_not_supported" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33864,22 +33767,22 @@ }, { "args": [ - "no_logging" + "binary_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33887,22 +33790,22 @@ }, { "args": [ - "no_op" + "call_creds" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33910,22 +33813,22 @@ }, { "args": [ - "payload" + "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33933,22 +33836,22 @@ }, { "args": [ - "ping_pong_streaming" + "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33956,22 +33859,22 @@ }, { "args": [ - "registered_call" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -33979,22 +33882,22 @@ }, { "args": [ - "request_with_flags" + "cancel_after_round_trip" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34002,22 +33905,22 @@ }, { "args": [ - "request_with_payload" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34025,22 +33928,22 @@ }, { "args": [ - "resource_quota_server" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34048,22 +33951,22 @@ }, { "args": [ - "server_finishes_request" + "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34071,22 +33974,22 @@ }, { "args": [ - "shutdown_finishes_calls" + "empty_batch" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34094,22 +33997,22 @@ }, { "args": [ - "shutdown_finishes_tags" + "filter_call_init_fails" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34117,22 +34020,22 @@ }, { "args": [ - "simple_cacheable_request" + "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34140,22 +34043,22 @@ }, { "args": [ - "simple_metadata" + "filter_latency" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34163,22 +34066,22 @@ }, { "args": [ - "simple_request" + "filter_status_code" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34186,22 +34089,22 @@ }, { "args": [ - "stream_compression_compressed_payload" + "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34209,22 +34112,22 @@ }, { "args": [ - "stream_compression_payload" + "hpack_size" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34232,22 +34135,22 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "idempotent_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34255,22 +34158,22 @@ }, { "args": [ - "streaming_error_response" + "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34278,22 +34181,22 @@ }, { "args": [ - "trailing_metadata" + "large_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34301,22 +34204,22 @@ }, { "args": [ - "workaround_cronet_compression" + "load_reporting_hook" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34324,22 +34227,22 @@ }, { "args": [ - "write_buffering" + "max_message_length" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34347,22 +34250,22 @@ }, { "args": [ - "write_buffering_at_end" + "negative_deadline" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "inproc_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -34370,7 +34273,7 @@ }, { "args": [ - "authority_not_supported" + "network_status_change" ], "ci_platforms": [ "windows", @@ -34378,12 +34281,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34393,7 +34296,7 @@ }, { "args": [ - "bad_hostname" + "no_logging" ], "ci_platforms": [ "windows", @@ -34406,7 +34309,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34416,7 +34319,7 @@ }, { "args": [ - "bad_ping" + "no_op" ], "ci_platforms": [ "windows", @@ -34429,7 +34332,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34439,7 +34342,7 @@ }, { "args": [ - "binary_metadata" + "payload" ], "ci_platforms": [ "windows", @@ -34447,12 +34350,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34462,7 +34365,7 @@ }, { "args": [ - "cancel_after_accept" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -34475,7 +34378,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34485,7 +34388,7 @@ }, { "args": [ - "cancel_after_client_done" + "registered_call" ], "ci_platforms": [ "windows", @@ -34493,12 +34396,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34508,7 +34411,7 @@ }, { "args": [ - "cancel_after_invoke" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -34521,7 +34424,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34531,7 +34434,7 @@ }, { "args": [ - "cancel_after_round_trip" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -34544,7 +34447,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34554,7 +34457,7 @@ }, { "args": [ - "cancel_before_invoke" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -34562,12 +34465,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34577,7 +34480,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -34590,7 +34493,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34600,7 +34503,7 @@ }, { "args": [ - "cancel_with_status" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -34613,7 +34516,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34623,7 +34526,53 @@ }, { "args": [ - "compressed_payload" + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" ], "ci_platforms": [ "windows", @@ -34636,7 +34585,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34646,7 +34595,30 @@ }, { "args": [ - "connectivity" + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -34656,12 +34628,33 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34671,7 +34664,7 @@ }, { "args": [ - "default_host" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -34684,7 +34677,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "inproc_test", "platforms": [ "windows", "linux", @@ -34694,7 +34687,7 @@ }, { "args": [ - "disappearing_server" + "authority_not_supported" ], "ci_platforms": [ "windows", @@ -34705,9 +34698,9 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34717,7 +34710,7 @@ }, { "args": [ - "empty_batch" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -34725,12 +34718,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34740,7 +34733,7 @@ }, { "args": [ - "filter_call_init_fails" + "bad_ping" ], "ci_platforms": [ "windows", @@ -34753,7 +34746,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34763,7 +34756,7 @@ }, { "args": [ - "filter_causes_close" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -34776,7 +34769,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34786,7 +34779,7 @@ }, { "args": [ - "filter_latency" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -34799,7 +34792,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34809,7 +34802,7 @@ }, { "args": [ - "filter_status_code" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -34822,7 +34815,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34832,7 +34825,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -34845,7 +34838,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34855,7 +34848,7 @@ }, { "args": [ - "high_initial_seqno" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", @@ -34868,7 +34861,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34878,7 +34871,7 @@ }, { "args": [ - "hpack_size" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -34891,7 +34884,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34901,7 +34894,7 @@ }, { "args": [ - "idempotent_request" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -34909,12 +34902,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34924,7 +34917,30 @@ }, { "args": [ - "invoke_large_request" + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" ], "ci_platforms": [ "windows", @@ -34937,7 +34953,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34947,7 +34963,7 @@ }, { "args": [ - "keepalive_timeout" + "connectivity" ], "ci_platforms": [ "windows", @@ -34957,10 +34973,35 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34970,7 +35011,7 @@ }, { "args": [ - "large_metadata" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -34981,9 +35022,32 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -34993,7 +35057,7 @@ }, { "args": [ - "load_reporting_hook" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -35006,7 +35070,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35016,7 +35080,7 @@ }, { "args": [ - "max_concurrent_streams" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -35029,7 +35093,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35039,7 +35103,7 @@ }, { "args": [ - "max_connection_age" + "filter_latency" ], "ci_platforms": [ "windows", @@ -35052,7 +35116,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35062,7 +35126,7 @@ }, { "args": [ - "max_connection_idle" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -35072,12 +35136,33 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35087,7 +35172,7 @@ }, { "args": [ - "max_message_length" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -35100,7 +35185,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35110,7 +35195,30 @@ }, { "args": [ - "negative_deadline" + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" ], "ci_platforms": [ "windows", @@ -35123,7 +35231,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35133,7 +35241,30 @@ }, { "args": [ - "network_status_change" + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -35146,7 +35277,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35156,7 +35287,7 @@ }, { "args": [ - "no_logging" + "large_metadata" ], "ci_platforms": [ "windows", @@ -35169,7 +35300,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35179,7 +35310,7 @@ }, { "args": [ - "no_op" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -35192,7 +35323,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35202,7 +35333,7 @@ }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -35210,12 +35341,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35225,7 +35356,7 @@ }, { "args": [ - "ping" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -35238,7 +35369,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35248,7 +35379,32 @@ }, { "args": [ - "ping_pong_streaming" + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" ], "ci_platforms": [ "windows", @@ -35261,7 +35417,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35271,7 +35427,7 @@ }, { "args": [ - "registered_call" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -35284,7 +35440,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35294,7 +35450,7 @@ }, { "args": [ - "request_with_flags" + "network_status_change" ], "ci_platforms": [ "windows", @@ -35307,7 +35463,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35317,7 +35473,7 @@ }, { "args": [ - "request_with_payload" + "no_logging" ], "ci_platforms": [ "windows", @@ -35325,12 +35481,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35340,7 +35496,7 @@ }, { "args": [ - "resource_quota_server" + "no_op" ], "ci_platforms": [ "windows", @@ -35353,7 +35509,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35363,7 +35519,30 @@ }, { "args": [ - "server_finishes_request" + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" ], "ci_platforms": [ "windows", @@ -35376,7 +35555,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35386,7 +35565,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -35399,7 +35578,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35409,7 +35588,30 @@ }, { "args": [ - "shutdown_finishes_tags" + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" ], "ci_platforms": [ "windows", @@ -35422,7 +35624,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35432,7 +35634,7 @@ }, { "args": [ - "simple_cacheable_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -35445,7 +35647,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35455,7 +35657,7 @@ }, { "args": [ - "simple_delayed_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -35468,7 +35670,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35478,7 +35680,7 @@ }, { "args": [ - "simple_metadata" + "retry" ], "ci_platforms": [ "windows", @@ -35486,12 +35688,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35501,7 +35703,7 @@ }, { "args": [ - "simple_request" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -35509,12 +35711,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35524,7 +35726,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -35532,12 +35734,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35547,7 +35749,7 @@ }, { "args": [ - "stream_compression_payload" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -35555,12 +35757,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35570,7 +35772,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -35578,12 +35780,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -35593,127 +35795,5977 @@ }, { "args": [ - "streaming_error_response" + "retry_non_retriable_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_initial_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_message" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_delay" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_disabled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_after_commit" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_succeeds_before_replay_finished" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_throttled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_too_many_attempts" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "workaround_cronet_compression" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering_at_end" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_round_trip" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_status_code" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_cancellation" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_disabled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_exceeds_buffer_size_in_initial_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_exceeds_buffer_size_in_subsequent_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_non_retriable_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_initial_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_message" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_delay" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_disabled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_after_commit" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_succeeds_before_replay_finished" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_throttled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_too_many_attempts" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "workaround_cronet_compression" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering_at_end" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_round_trip" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_status_code" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_compressed_payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_ping_pong_streaming" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "workaround_cronet_compression" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering_at_end" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_round_trip" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_status_code" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_cancellation" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_disabled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_exceeds_buffer_size_in_initial_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_exceeds_buffer_size_in_subsequent_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_non_retriable_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_initial_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_recv_message" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_delay" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_server_pushback_disabled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_after_commit" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_streaming_succeeds_before_replay_finished" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_throttled" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry_too_many_attempts" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "stream_compression_ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "workaround_cronet_compression" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "write_buffering_at_end" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_round_trip" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": true, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_status_code" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "keepalive_timeout" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "resource_quota_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "workaround_cronet_compression" + "retry" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "write_buffering" + "retry_cancellation" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "write_buffering_at_end" + "retry_disabled" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "authority_not_supported" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -35727,12 +41779,12 @@ }, { "args": [ - "bad_hostname" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -35746,12 +41798,12 @@ }, { "args": [ - "bad_ping" + "retry_non_retriable_status" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -35765,7 +41817,7 @@ }, { "args": [ - "binary_metadata" + "retry_recv_initial_metadata" ], "ci_platforms": [ "linux" @@ -35784,7 +41836,7 @@ }, { "args": [ - "cancel_after_accept" + "retry_recv_message" ], "ci_platforms": [ "linux" @@ -35803,7 +41855,7 @@ }, { "args": [ - "cancel_after_client_done" + "retry_server_pushback_delay" ], "ci_platforms": [ "linux" @@ -35822,7 +41874,7 @@ }, { "args": [ - "cancel_after_invoke" + "retry_server_pushback_disabled" ], "ci_platforms": [ "linux" @@ -35841,7 +41893,7 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_streaming" ], "ci_platforms": [ "linux" @@ -35860,7 +41912,7 @@ }, { "args": [ - "cancel_before_invoke" + "retry_streaming_after_commit" ], "ci_platforms": [ "linux" @@ -35879,7 +41931,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "linux" @@ -35898,7 +41950,7 @@ }, { "args": [ - "cancel_with_status" + "retry_throttled" ], "ci_platforms": [ "linux" @@ -35917,12 +41969,12 @@ }, { "args": [ - "compressed_payload" + "retry_too_many_attempts" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -35936,7 +41988,7 @@ }, { "args": [ - "connectivity" + "server_finishes_request" ], "ci_platforms": [ "linux" @@ -35955,12 +42007,12 @@ }, { "args": [ - "default_host" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -35974,17 +42026,17 @@ }, { "args": [ - "disappearing_server" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", "platforms": [ @@ -35993,7 +42045,7 @@ }, { "args": [ - "empty_batch" + "simple_cacheable_request" ], "ci_platforms": [ "linux" @@ -36012,7 +42064,7 @@ }, { "args": [ - "filter_call_init_fails" + "simple_delayed_request" ], "ci_platforms": [ "linux" @@ -36031,12 +42083,12 @@ }, { "args": [ - "filter_causes_close" + "simple_metadata" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36050,12 +42102,12 @@ }, { "args": [ - "filter_latency" + "simple_request" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36069,12 +42121,12 @@ }, { "args": [ - "filter_status_code" + "stream_compression_compressed_payload" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36088,12 +42140,12 @@ }, { "args": [ - "graceful_server_shutdown" + "stream_compression_payload" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36107,12 +42159,12 @@ }, { "args": [ - "high_initial_seqno" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36126,7 +42178,7 @@ }, { "args": [ - "hpack_size" + "streaming_error_response" ], "ci_platforms": [ "linux" @@ -36145,7 +42197,7 @@ }, { "args": [ - "idempotent_request" + "trailing_metadata" ], "ci_platforms": [ "linux" @@ -36164,7 +42216,7 @@ }, { "args": [ - "invoke_large_request" + "workaround_cronet_compression" ], "ci_platforms": [ "linux" @@ -36183,7 +42235,7 @@ }, { "args": [ - "keepalive_timeout" + "write_buffering" ], "ci_platforms": [ "linux" @@ -36202,12 +42254,12 @@ }, { "args": [ - "large_metadata" + "write_buffering_at_end" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -36221,352 +42273,682 @@ }, { "args": [ - "load_reporting_hook" + "authority_not_supported" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "bad_ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_connection_age" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_connection_idle" + "cancel_after_round_trip" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "network_status_change" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_logging" + "filter_latency" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "filter_status_code" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "idempotent_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "keepalive_timeout" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "resource_quota_server" + "load_reporting_hook" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "max_connection_age" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "max_connection_idle" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], @@ -36575,242 +42957,316 @@ ], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_cacheable_request" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_delayed_request" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "network_status_change" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "stream_compression_compressed_payload" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "stream_compression_payload" + "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "stream_compression_ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "streaming_error_response" + "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "workaround_cronet_compression" + "resource_quota_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "write_buffering" + "retry" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "write_buffering_at_end" + "retry_cancellation" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "authority_not_supported" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -36818,7 +43274,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -36833,7 +43289,7 @@ }, { "args": [ - "bad_hostname" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -36841,7 +43297,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -36856,7 +43312,7 @@ }, { "args": [ - "bad_ping" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -36864,7 +43320,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -36879,7 +43335,7 @@ }, { "args": [ - "binary_metadata" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -36902,7 +43358,7 @@ }, { "args": [ - "cancel_after_accept" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -36925,7 +43381,7 @@ }, { "args": [ - "cancel_after_client_done" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -36948,7 +43404,7 @@ }, { "args": [ - "cancel_after_invoke" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -36971,7 +43427,7 @@ }, { "args": [ - "cancel_after_round_trip" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -36994,7 +43450,7 @@ }, { "args": [ - "cancel_before_invoke" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -37017,7 +43473,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -37040,7 +43496,7 @@ }, { "args": [ - "cancel_with_status" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -37063,7 +43519,7 @@ }, { "args": [ - "compressed_payload" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -37071,7 +43527,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37086,7 +43542,7 @@ }, { "args": [ - "connectivity" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -37096,9 +43552,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -37111,7 +43565,7 @@ }, { "args": [ - "default_host" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -37119,7 +43573,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37134,7 +43588,7 @@ }, { "args": [ - "disappearing_server" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -37142,10 +43596,10 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", "platforms": [ @@ -37157,7 +43611,7 @@ }, { "args": [ - "empty_batch" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -37180,7 +43634,7 @@ }, { "args": [ - "filter_call_init_fails" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -37188,7 +43642,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37203,7 +43657,7 @@ }, { "args": [ - "filter_causes_close" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -37211,7 +43665,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37226,7 +43680,7 @@ }, { "args": [ - "filter_latency" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -37234,7 +43688,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37249,7 +43703,7 @@ }, { "args": [ - "filter_status_code" + "simple_request" ], "ci_platforms": [ "windows", @@ -37257,7 +43711,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37272,7 +43726,7 @@ }, { "args": [ - "graceful_server_shutdown" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -37280,7 +43734,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37295,7 +43749,7 @@ }, { "args": [ - "high_initial_seqno" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -37303,7 +43757,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37318,7 +43772,7 @@ }, { "args": [ - "idempotent_request" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -37341,7 +43795,7 @@ }, { "args": [ - "invoke_large_request" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -37349,7 +43803,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37364,7 +43818,7 @@ }, { "args": [ - "keepalive_timeout" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -37372,7 +43826,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37387,7 +43841,7 @@ }, { "args": [ - "large_metadata" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -37410,7 +43864,7 @@ }, { "args": [ - "load_reporting_hook" + "write_buffering" ], "ci_platforms": [ "windows", @@ -37418,7 +43872,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -37433,7 +43887,7 @@ }, { "args": [ - "max_concurrent_streams" + "write_buffering_at_end" ], "ci_platforms": [ "windows", @@ -37456,7 +43910,7 @@ }, { "args": [ - "max_connection_age" + "authority_not_supported" ], "ci_platforms": [ "windows", @@ -37464,12 +43918,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37479,7 +43933,7 @@ }, { "args": [ - "max_connection_idle" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -37487,14 +43941,35 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37504,7 +43979,7 @@ }, { "args": [ - "max_message_length" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -37517,7 +43992,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37527,7 +44002,7 @@ }, { "args": [ - "negative_deadline" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -37535,12 +44010,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37550,7 +44025,7 @@ }, { "args": [ - "network_status_change" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -37563,7 +44038,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37573,7 +44048,7 @@ }, { "args": [ - "no_op" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -37581,12 +44056,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37596,7 +44071,7 @@ }, { "args": [ - "payload" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", @@ -37604,12 +44079,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37619,7 +44094,7 @@ }, { "args": [ - "ping" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -37632,7 +44107,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37642,7 +44117,7 @@ }, { "args": [ - "ping_pong_streaming" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -37655,7 +44130,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37665,7 +44140,7 @@ }, { "args": [ - "registered_call" + "cancel_with_status" ], "ci_platforms": [ "windows", @@ -37673,12 +44148,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37688,7 +44163,7 @@ }, { "args": [ - "request_with_flags" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -37696,12 +44171,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37711,7 +44186,7 @@ }, { "args": [ - "request_with_payload" + "connectivity" ], "ci_platforms": [ "windows", @@ -37721,10 +44196,12 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37734,7 +44211,7 @@ }, { "args": [ - "resource_quota_server" + "default_host" ], "ci_platforms": [ "windows", @@ -37747,7 +44224,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37757,7 +44234,7 @@ }, { "args": [ - "server_finishes_request" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -37765,12 +44242,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": false, + "flaky": true, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37780,7 +44257,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "empty_batch" ], "ci_platforms": [ "windows", @@ -37793,7 +44270,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37803,7 +44280,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -37811,12 +44288,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37826,7 +44303,7 @@ }, { "args": [ - "simple_cacheable_request" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -37839,7 +44316,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37849,7 +44326,7 @@ }, { "args": [ - "simple_delayed_request" + "filter_latency" ], "ci_platforms": [ "windows", @@ -37857,12 +44334,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37872,7 +44349,7 @@ }, { "args": [ - "simple_metadata" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -37880,12 +44357,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37895,7 +44372,7 @@ }, { "args": [ - "simple_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -37903,12 +44380,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37918,7 +44395,7 @@ }, { "args": [ - "stream_compression_compressed_payload" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -37926,12 +44403,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37941,7 +44418,7 @@ }, { "args": [ - "stream_compression_payload" + "hpack_size" ], "ci_platforms": [ "windows", @@ -37949,12 +44426,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37964,7 +44441,7 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -37977,7 +44454,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -37987,7 +44464,7 @@ }, { "args": [ - "streaming_error_response" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -37995,12 +44472,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -38010,7 +44487,7 @@ }, { "args": [ - "trailing_metadata" + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -38018,12 +44495,12 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -38033,7 +44510,7 @@ }, { "args": [ - "workaround_cronet_compression" + "large_metadata" ], "ci_platforms": [ "windows", @@ -38046,7 +44523,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -38056,7 +44533,7 @@ }, { "args": [ - "write_buffering" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -38064,12 +44541,12 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -38079,7 +44556,7 @@ }, { "args": [ - "write_buffering_at_end" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -38092,7 +44569,7 @@ "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+workarounds_nosec_test", "platforms": [ "windows", "linux", @@ -38102,7 +44579,7 @@ }, { "args": [ - "authority_not_supported" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -38110,7 +44587,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38125,7 +44602,7 @@ }, { "args": [ - "bad_hostname" + "max_connection_idle" ], "ci_platforms": [ "windows", @@ -38133,9 +44610,11 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+workarounds_nosec_test", @@ -38148,7 +44627,7 @@ }, { "args": [ - "bad_ping" + "max_message_length" ], "ci_platforms": [ "windows", @@ -38156,7 +44635,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38171,7 +44650,7 @@ }, { "args": [ - "binary_metadata" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -38179,7 +44658,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38194,7 +44673,7 @@ }, { "args": [ - "cancel_after_accept" + "network_status_change" ], "ci_platforms": [ "windows", @@ -38217,7 +44696,7 @@ }, { "args": [ - "cancel_after_client_done" + "no_logging" ], "ci_platforms": [ "windows", @@ -38225,7 +44704,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38240,7 +44719,7 @@ }, { "args": [ - "cancel_after_invoke" + "no_op" ], "ci_platforms": [ "windows", @@ -38248,7 +44727,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38263,7 +44742,7 @@ }, { "args": [ - "cancel_after_round_trip" + "payload" ], "ci_platforms": [ "windows", @@ -38271,7 +44750,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38286,7 +44765,7 @@ }, { "args": [ - "cancel_before_invoke" + "ping" ], "ci_platforms": [ "windows", @@ -38309,7 +44788,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -38332,7 +44811,7 @@ }, { "args": [ - "cancel_with_status" + "registered_call" ], "ci_platforms": [ "windows", @@ -38340,7 +44819,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38355,7 +44834,7 @@ }, { "args": [ - "compressed_payload" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -38363,7 +44842,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38378,7 +44857,7 @@ }, { "args": [ - "connectivity" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -38388,9 +44867,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+workarounds_nosec_test", @@ -38403,7 +44880,7 @@ }, { "args": [ - "default_host" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -38426,7 +44903,7 @@ }, { "args": [ - "disappearing_server" + "retry" ], "ci_platforms": [ "windows", @@ -38434,10 +44911,10 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_full+workarounds_nosec_test", "platforms": [ @@ -38449,7 +44926,7 @@ }, { "args": [ - "empty_batch" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -38472,7 +44949,7 @@ }, { "args": [ - "filter_call_init_fails" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -38480,7 +44957,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38495,7 +44972,7 @@ }, { "args": [ - "filter_causes_close" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -38518,7 +44995,7 @@ }, { "args": [ - "filter_latency" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -38541,7 +45018,7 @@ }, { "args": [ - "filter_status_code" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -38564,7 +45041,7 @@ }, { "args": [ - "graceful_server_shutdown" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -38587,7 +45064,7 @@ }, { "args": [ - "high_initial_seqno" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -38610,7 +45087,7 @@ }, { "args": [ - "hpack_size" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -38633,7 +45110,7 @@ }, { "args": [ - "idempotent_request" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -38641,7 +45118,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38656,7 +45133,7 @@ }, { "args": [ - "invoke_large_request" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -38664,7 +45141,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38679,7 +45156,7 @@ }, { "args": [ - "keepalive_timeout" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -38702,7 +45179,7 @@ }, { "args": [ - "large_metadata" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -38710,7 +45187,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38725,7 +45202,7 @@ }, { "args": [ - "load_reporting_hook" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -38733,7 +45210,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38748,7 +45225,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -38771,7 +45248,7 @@ }, { "args": [ - "max_connection_age" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -38794,7 +45271,7 @@ }, { "args": [ - "max_connection_idle" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -38804,9 +45281,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+workarounds_nosec_test", @@ -38819,7 +45294,7 @@ }, { "args": [ - "max_message_length" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -38842,7 +45317,7 @@ }, { "args": [ - "negative_deadline" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -38850,7 +45325,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38865,7 +45340,7 @@ }, { "args": [ - "network_status_change" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -38873,7 +45348,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38888,7 +45363,7 @@ }, { "args": [ - "no_logging" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -38911,7 +45386,7 @@ }, { "args": [ - "no_op" + "simple_request" ], "ci_platforms": [ "windows", @@ -38934,7 +45409,7 @@ }, { "args": [ - "payload" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", @@ -38957,7 +45432,7 @@ }, { "args": [ - "ping" + "stream_compression_payload" ], "ci_platforms": [ "windows", @@ -38965,7 +45440,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -38980,7 +45455,7 @@ }, { "args": [ - "ping_pong_streaming" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -38988,7 +45463,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -39003,7 +45478,7 @@ }, { "args": [ - "registered_call" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -39011,7 +45486,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -39026,7 +45501,7 @@ }, { "args": [ - "request_with_flags" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -39034,7 +45509,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -39049,7 +45524,7 @@ }, { "args": [ - "request_with_payload" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", @@ -39057,7 +45532,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -39072,7 +45547,7 @@ }, { "args": [ - "resource_quota_server" + "write_buffering" ], "ci_platforms": [ "windows", @@ -39080,7 +45555,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -39095,7 +45570,7 @@ }, { "args": [ - "server_finishes_request" + "write_buffering_at_end" ], "ci_platforms": [ "windows", @@ -39118,20 +45593,21 @@ }, { "args": [ - "shutdown_finishes_calls" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39141,20 +45617,21 @@ }, { "args": [ - "shutdown_finishes_tags" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39164,20 +45641,21 @@ }, { "args": [ - "simple_cacheable_request" + "bad_ping" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39187,20 +45665,21 @@ }, { "args": [ - "simple_delayed_request" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39210,20 +45689,21 @@ }, { "args": [ - "simple_metadata" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39233,20 +45713,21 @@ }, { "args": [ - "simple_request" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39256,20 +45737,21 @@ }, { "args": [ - "stream_compression_compressed_payload" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39279,20 +45761,21 @@ }, { "args": [ - "stream_compression_payload" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39302,20 +45785,21 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39325,20 +45809,21 @@ }, { "args": [ - "streaming_error_response" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39348,20 +45833,21 @@ }, { "args": [ - "trailing_metadata" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39371,20 +45857,21 @@ }, { "args": [ - "workaround_cronet_compression" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39394,20 +45881,21 @@ }, { "args": [ - "write_buffering" + "connectivity" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39417,20 +45905,21 @@ }, { "args": [ - "write_buffering_at_end" + "default_host" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", - "name": "h2_full+workarounds_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -39440,7 +45929,7 @@ }, { "args": [ - "authority_not_supported" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -39452,7 +45941,7 @@ "exclude_iomgrs": [ "uv" ], - "flaky": false, + "flaky": true, "language": "c", "name": "h2_http_proxy_nosec_test", "platforms": [ @@ -39464,14 +45953,14 @@ }, { "args": [ - "bad_hostname" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -39488,7 +45977,7 @@ }, { "args": [ - "bad_ping" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -39512,7 +46001,7 @@ }, { "args": [ - "binary_metadata" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -39536,7 +46025,7 @@ }, { "args": [ - "cancel_after_accept" + "filter_latency" ], "ci_platforms": [ "windows", @@ -39560,7 +46049,7 @@ }, { "args": [ - "cancel_after_client_done" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -39584,7 +46073,7 @@ }, { "args": [ - "cancel_after_invoke" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -39608,7 +46097,7 @@ }, { "args": [ - "cancel_after_round_trip" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -39632,7 +46121,7 @@ }, { "args": [ - "cancel_before_invoke" + "hpack_size" ], "ci_platforms": [ "windows", @@ -39656,7 +46145,55 @@ }, { "args": [ - "cancel_in_a_vacuum" + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -39680,7 +46217,55 @@ }, { "args": [ - "cancel_with_status" + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -39704,7 +46289,79 @@ }, { "args": [ - "compressed_payload" + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" ], "ci_platforms": [ "windows", @@ -39728,7 +46385,7 @@ }, { "args": [ - "connectivity" + "network_status_change" ], "ci_platforms": [ "windows", @@ -39752,7 +46409,7 @@ }, { "args": [ - "default_host" + "no_logging" ], "ci_platforms": [ "windows", @@ -39776,7 +46433,7 @@ }, { "args": [ - "disappearing_server" + "no_op" ], "ci_platforms": [ "windows", @@ -39788,7 +46445,7 @@ "exclude_iomgrs": [ "uv" ], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", "platforms": [ @@ -39800,7 +46457,31 @@ }, { "args": [ - "empty_batch" + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" ], "ci_platforms": [ "windows", @@ -39824,7 +46505,31 @@ }, { "args": [ - "filter_call_init_fails" + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "proxy_auth" ], "ci_platforms": [ "windows", @@ -39848,7 +46553,31 @@ }, { "args": [ - "filter_causes_close" + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" ], "ci_platforms": [ "windows", @@ -39872,7 +46601,7 @@ }, { "args": [ - "filter_latency" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -39896,7 +46625,31 @@ }, { "args": [ - "filter_status_code" + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "retry" ], "ci_platforms": [ "windows", @@ -39920,7 +46673,7 @@ }, { "args": [ - "graceful_server_shutdown" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -39944,7 +46697,7 @@ }, { "args": [ - "high_initial_seqno" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -39968,7 +46721,7 @@ }, { "args": [ - "hpack_size" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -39992,14 +46745,14 @@ }, { "args": [ - "idempotent_request" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40016,14 +46769,14 @@ }, { "args": [ - "invoke_large_request" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40040,7 +46793,7 @@ }, { "args": [ - "keepalive_timeout" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -40064,14 +46817,14 @@ }, { "args": [ - "large_metadata" + "retry_recv_message" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40088,14 +46841,14 @@ }, { "args": [ - "load_reporting_hook" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40112,7 +46865,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -40136,7 +46889,7 @@ }, { "args": [ - "max_connection_age" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -40160,7 +46913,7 @@ }, { "args": [ - "max_connection_idle" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -40184,7 +46937,7 @@ }, { "args": [ - "max_message_length" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -40208,14 +46961,14 @@ }, { "args": [ - "negative_deadline" + "retry_throttled" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40232,7 +46985,7 @@ }, { "args": [ - "network_status_change" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -40256,14 +47009,14 @@ }, { "args": [ - "no_logging" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40280,14 +47033,14 @@ }, { "args": [ - "no_op" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40304,14 +47057,14 @@ }, { "args": [ - "payload" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40328,7 +47081,7 @@ }, { "args": [ - "ping" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -40352,14 +47105,14 @@ }, { "args": [ - "ping_pong_streaming" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40376,7 +47129,7 @@ }, { "args": [ - "proxy_auth" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -40400,7 +47153,7 @@ }, { "args": [ - "registered_call" + "simple_request" ], "ci_platforms": [ "windows", @@ -40424,14 +47177,14 @@ }, { "args": [ - "request_with_flags" + "stream_compression_compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40448,14 +47201,14 @@ }, { "args": [ - "request_with_payload" + "stream_compression_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40472,7 +47225,7 @@ }, { "args": [ - "resource_quota_server" + "stream_compression_ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -40496,7 +47249,7 @@ }, { "args": [ - "server_finishes_request" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -40520,14 +47273,14 @@ }, { "args": [ - "shutdown_finishes_calls" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40544,14 +47297,14 @@ }, { "args": [ - "shutdown_finishes_tags" + "workaround_cronet_compression" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40568,7 +47321,7 @@ }, { "args": [ - "simple_cacheable_request" + "write_buffering" ], "ci_platforms": [ "windows", @@ -40592,14 +47345,14 @@ }, { "args": [ - "simple_delayed_request" + "write_buffering_at_end" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40616,21 +47369,20 @@ }, { "args": [ - "simple_metadata" + "authority_not_supported" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40640,21 +47392,20 @@ }, { "args": [ - "simple_request" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40664,21 +47415,20 @@ }, { "args": [ - "stream_compression_compressed_payload" + "bad_ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40688,21 +47438,43 @@ }, { "args": [ - "stream_compression_payload" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40712,21 +47484,43 @@ }, { "args": [ - "stream_compression_ping_pong_streaming" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40736,21 +47530,43 @@ }, { "args": [ - "streaming_error_response" + "cancel_after_round_trip" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40760,21 +47576,43 @@ }, { "args": [ - "trailing_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40784,21 +47622,20 @@ }, { "args": [ - "workaround_cronet_compression" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40808,11 +47645,12 @@ }, { "args": [ - "write_buffering" + "connectivity" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, @@ -40822,7 +47660,7 @@ ], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40832,21 +47670,20 @@ }, { "args": [ - "write_buffering_at_end" + "default_host" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_load_reporting_nosec_test", "platforms": [ "windows", "linux", @@ -40856,7 +47693,7 @@ }, { "args": [ - "authority_not_supported" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -40867,6 +47704,29 @@ "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], + "flaky": true, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -40879,7 +47739,7 @@ }, { "args": [ - "bad_hostname" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -40902,7 +47762,7 @@ }, { "args": [ - "bad_ping" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -40910,7 +47770,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -40925,7 +47785,7 @@ }, { "args": [ - "binary_metadata" + "filter_latency" ], "ci_platforms": [ "windows", @@ -40948,7 +47808,7 @@ }, { "args": [ - "cancel_after_accept" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -40971,7 +47831,7 @@ }, { "args": [ - "cancel_after_client_done" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -40994,7 +47854,7 @@ }, { "args": [ - "cancel_after_invoke" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -41017,7 +47877,7 @@ }, { "args": [ - "cancel_after_round_trip" + "hpack_size" ], "ci_platforms": [ "windows", @@ -41040,7 +47900,7 @@ }, { "args": [ - "cancel_before_invoke" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -41048,7 +47908,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41063,7 +47923,7 @@ }, { "args": [ - "cancel_in_a_vacuum" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -41071,7 +47931,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41086,7 +47946,7 @@ }, { "args": [ - "cancel_with_status" + "keepalive_timeout" ], "ci_platforms": [ "windows", @@ -41109,7 +47969,7 @@ }, { "args": [ - "compressed_payload" + "large_metadata" ], "ci_platforms": [ "windows", @@ -41132,7 +47992,7 @@ }, { "args": [ - "connectivity" + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -41140,11 +48000,9 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -41157,7 +48015,7 @@ }, { "args": [ - "default_host" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -41165,7 +48023,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41180,7 +48038,7 @@ }, { "args": [ - "disappearing_server" + "max_connection_age" ], "ci_platforms": [ "windows", @@ -41188,10 +48046,10 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], - "flaky": true, + "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", "platforms": [ @@ -41203,7 +48061,7 @@ }, { "args": [ - "empty_batch" + "max_connection_idle" ], "ci_platforms": [ "windows", @@ -41213,7 +48071,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -41226,7 +48086,7 @@ }, { "args": [ - "filter_call_init_fails" + "max_message_length" ], "ci_platforms": [ "windows", @@ -41234,7 +48094,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41249,7 +48109,7 @@ }, { "args": [ - "filter_causes_close" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -41257,7 +48117,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41272,7 +48132,7 @@ }, { "args": [ - "filter_latency" + "network_status_change" ], "ci_platforms": [ "windows", @@ -41295,7 +48155,7 @@ }, { "args": [ - "filter_status_code" + "no_logging" ], "ci_platforms": [ "windows", @@ -41303,7 +48163,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41318,7 +48178,7 @@ }, { "args": [ - "graceful_server_shutdown" + "no_op" ], "ci_platforms": [ "windows", @@ -41326,7 +48186,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41341,7 +48201,7 @@ }, { "args": [ - "high_initial_seqno" + "payload" ], "ci_platforms": [ "windows", @@ -41349,7 +48209,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41364,7 +48224,7 @@ }, { "args": [ - "hpack_size" + "ping" ], "ci_platforms": [ "windows", @@ -41387,7 +48247,7 @@ }, { "args": [ - "idempotent_request" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -41395,7 +48255,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41410,7 +48270,7 @@ }, { "args": [ - "invoke_large_request" + "registered_call" ], "ci_platforms": [ "windows", @@ -41433,7 +48293,7 @@ }, { "args": [ - "keepalive_timeout" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -41456,7 +48316,7 @@ }, { "args": [ - "large_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -41464,7 +48324,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41479,7 +48339,7 @@ }, { "args": [ - "load_reporting_hook" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -41502,7 +48362,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry" ], "ci_platforms": [ "windows", @@ -41525,7 +48385,7 @@ }, { "args": [ - "max_connection_age" + "retry_cancellation" ], "ci_platforms": [ "windows", @@ -41548,7 +48408,7 @@ }, { "args": [ - "max_connection_idle" + "retry_disabled" ], "ci_platforms": [ "windows", @@ -41558,9 +48418,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -41573,7 +48431,7 @@ }, { "args": [ - "max_message_length" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "windows", @@ -41596,7 +48454,7 @@ }, { "args": [ - "negative_deadline" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "windows", @@ -41604,7 +48462,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41619,7 +48477,7 @@ }, { "args": [ - "network_status_change" + "retry_non_retriable_status" ], "ci_platforms": [ "windows", @@ -41642,7 +48500,7 @@ }, { "args": [ - "no_logging" + "retry_recv_initial_metadata" ], "ci_platforms": [ "windows", @@ -41650,7 +48508,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41665,7 +48523,7 @@ }, { "args": [ - "no_op" + "retry_recv_message" ], "ci_platforms": [ "windows", @@ -41673,7 +48531,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41688,7 +48546,7 @@ }, { "args": [ - "payload" + "retry_server_pushback_delay" ], "ci_platforms": [ "windows", @@ -41696,7 +48554,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41711,7 +48569,7 @@ }, { "args": [ - "ping" + "retry_server_pushback_disabled" ], "ci_platforms": [ "windows", @@ -41734,7 +48592,7 @@ }, { "args": [ - "ping_pong_streaming" + "retry_streaming" ], "ci_platforms": [ "windows", @@ -41757,7 +48615,7 @@ }, { "args": [ - "registered_call" + "retry_streaming_after_commit" ], "ci_platforms": [ "windows", @@ -41765,7 +48623,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41780,7 +48638,7 @@ }, { "args": [ - "request_with_flags" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "windows", @@ -41803,7 +48661,7 @@ }, { "args": [ - "request_with_payload" + "retry_throttled" ], "ci_platforms": [ "windows", @@ -41826,7 +48684,7 @@ }, { "args": [ - "resource_quota_server" + "retry_too_many_attempts" ], "ci_platforms": [ "windows", @@ -41834,7 +48692,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -47343,7 +54201,168 @@ }, { "args": [ - "filter_call_init_fails" + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_status_code" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" ], "ci_platforms": [ "linux", @@ -47366,7 +54385,30 @@ }, { "args": [ - "filter_causes_close" + "invoke_large_request" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "keepalive_timeout" ], "ci_platforms": [ "linux", @@ -47389,7 +54431,53 @@ }, { "args": [ - "filter_latency" + "large_metadata" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" ], "ci_platforms": [ "linux", @@ -47412,7 +54500,7 @@ }, { "args": [ - "filter_status_code" + "max_connection_age" ], "ci_platforms": [ "linux", @@ -47435,7 +54523,7 @@ }, { "args": [ - "graceful_server_shutdown" + "max_connection_idle" ], "ci_platforms": [ "linux", @@ -47458,7 +54546,7 @@ }, { "args": [ - "high_initial_seqno" + "max_message_length" ], "ci_platforms": [ "linux", @@ -47481,7 +54569,30 @@ }, { "args": [ - "hpack_size" + "negative_deadline" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "network_status_change" ], "ci_platforms": [ "linux", @@ -47504,7 +54615,7 @@ }, { "args": [ - "idempotent_request" + "no_logging" ], "ci_platforms": [ "linux", @@ -47527,7 +54638,7 @@ }, { "args": [ - "invoke_large_request" + "no_op" ], "ci_platforms": [ "linux", @@ -47550,7 +54661,30 @@ }, { "args": [ - "keepalive_timeout" + "payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" ], "ci_platforms": [ "linux", @@ -47573,7 +54707,30 @@ }, { "args": [ - "large_metadata" + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" ], "ci_platforms": [ "linux", @@ -47596,7 +54753,53 @@ }, { "args": [ - "load_reporting_hook" + "request_with_flags" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "resource_quota_server" ], "ci_platforms": [ "linux", @@ -47619,7 +54822,7 @@ }, { "args": [ - "max_concurrent_streams" + "retry" ], "ci_platforms": [ "linux", @@ -47642,7 +54845,7 @@ }, { "args": [ - "max_connection_age" + "retry_cancellation" ], "ci_platforms": [ "linux", @@ -47665,7 +54868,7 @@ }, { "args": [ - "max_connection_idle" + "retry_disabled" ], "ci_platforms": [ "linux", @@ -47688,7 +54891,7 @@ }, { "args": [ - "max_message_length" + "retry_exceeds_buffer_size_in_initial_batch" ], "ci_platforms": [ "linux", @@ -47711,14 +54914,14 @@ }, { "args": [ - "negative_deadline" + "retry_exceeds_buffer_size_in_subsequent_batch" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -47734,7 +54937,7 @@ }, { "args": [ - "network_status_change" + "retry_non_retriable_status" ], "ci_platforms": [ "linux", @@ -47757,14 +54960,14 @@ }, { "args": [ - "no_logging" + "retry_recv_initial_metadata" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -47780,14 +54983,14 @@ }, { "args": [ - "no_op" + "retry_recv_message" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -47803,14 +55006,14 @@ }, { "args": [ - "payload" + "retry_server_pushback_delay" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -47826,7 +55029,7 @@ }, { "args": [ - "ping" + "retry_server_pushback_disabled" ], "ci_platforms": [ "linux", @@ -47849,7 +55052,7 @@ }, { "args": [ - "ping_pong_streaming" + "retry_streaming" ], "ci_platforms": [ "linux", @@ -47872,14 +55075,14 @@ }, { "args": [ - "registered_call" + "retry_streaming_after_commit" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -47895,7 +55098,7 @@ }, { "args": [ - "request_with_flags" + "retry_streaming_succeeds_before_replay_finished" ], "ci_platforms": [ "linux", @@ -47918,7 +55121,7 @@ }, { "args": [ - "request_with_payload" + "retry_throttled" ], "ci_platforms": [ "linux", @@ -47941,14 +55144,14 @@ }, { "args": [ - "resource_quota_server" + "retry_too_many_attempts" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" -- cgit v1.2.3