grpc 1.58.0 → 1.59.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +48 -33
- data/include/grpc/event_engine/event_engine.h +6 -10
- data/include/grpc/impl/channel_arg_names.h +4 -0
- data/include/grpc/support/port_platform.h +74 -1
- data/src/core/ext/filters/channel_idle/channel_idle_filter.cc +22 -9
- data/src/core/ext/filters/client_channel/client_channel.cc +422 -56
- data/src/core/ext/filters/client_channel/client_channel.h +52 -8
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +15 -1
- data/src/core/ext/filters/client_channel/dynamic_filters.h +2 -0
- data/src/core/ext/filters/client_channel/{http_proxy.cc → http_proxy_mapper.cc} +1 -1
- data/src/core/ext/filters/client_channel/{http_proxy.h → http_proxy_mapper.h} +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc +188 -0
- data/src/core/ext/filters/client_channel/lb_policy/endpoint_list.h +214 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +17 -4
- data/src/core/ext/filters/client_channel/lb_policy/health_check_client.cc +41 -6
- data/src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h +5 -3
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +32 -103
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +0 -7
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +416 -139
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h +16 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +434 -459
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +410 -26
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +14 -46
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +851 -57
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +16 -10
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +47 -32
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +55 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +105 -175
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +14 -7
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +24 -6
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +36 -2
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +54 -44
- data/src/core/ext/filters/client_channel/subchannel.cc +33 -0
- data/src/core/ext/filters/client_channel/subchannel.h +9 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +11 -6
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +28 -22
- data/src/core/ext/transport/chttp2/transport/flow_control.h +27 -4
- data/src/core/ext/transport/chttp2/transport/frame_data.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +9 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +19 -10
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -1
- data/src/core/ext/transport/chttp2/transport/internal.h +66 -47
- data/src/core/ext/transport/chttp2/transport/{frame.h → legacy_frame.h} +3 -3
- data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -2
- data/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc +10 -0
- data/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h +4 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/writing.cc +2 -1
- data/src/core/ext/transport/inproc/inproc_transport.cc +9 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.c +16 -18
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h +75 -83
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +27 -29
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +102 -110
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +16 -18
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +73 -81
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.c +65 -67
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.h +294 -302
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.h +20 -28
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.c +5 -7
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.h +24 -32
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.h +19 -27
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.c +42 -44
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.h +141 -149
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.h +8 -16
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +5 -7
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +4 -12
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +36 -38
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +157 -165
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +87 -89
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +372 -380
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +13 -15
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +55 -63
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +111 -113
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +441 -449
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +8 -16
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +23 -25
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +88 -96
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.c +40 -42
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.h +180 -188
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +26 -28
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +108 -116
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +9 -17
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +65 -67
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +245 -253
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +27 -29
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +119 -127
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +6 -14
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +8 -16
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.h +20 -28
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +49 -51
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +184 -192
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +49 -51
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +225 -233
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +13 -21
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +63 -65
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +246 -254
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +5 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +19 -27
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +5 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +19 -27
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +30 -38
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +28 -36
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +9 -17
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +12 -14
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +48 -56
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +23 -25
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +92 -100
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +27 -29
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +108 -116
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +5 -13
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +38 -40
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +167 -175
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +34 -36
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +162 -170
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +10 -12
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +37 -45
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +13 -21
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.c +6 -8
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.h +18 -26
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +22 -24
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +97 -105
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +24 -26
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +111 -119
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +43 -45
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +183 -191
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +20 -22
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +102 -110
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +253 -255
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +1108 -1116
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +31 -39
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.c +35 -37
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.h +150 -158
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.h +8 -16
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +13 -21
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.c +5 -7
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.h +19 -27
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.c +14 -16
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.h +53 -61
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.h +8 -16
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.h +5 -13
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.h +24 -32
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.h +23 -31
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +23 -31
- data/src/core/ext/upb-generated/envoy/data/accesslog/v3/accesslog.upb.c +114 -116
- data/src/core/ext/upb-generated/envoy/data/accesslog/v3/accesslog.upb.h +372 -380
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +9 -17
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +30 -38
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +21 -23
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +81 -89
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +24 -32
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +12 -14
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +52 -60
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +14 -22
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +114 -116
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +468 -476
- data/src/core/ext/upb-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h +5 -13
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +25 -33
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.c +11 -13
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +40 -48
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb.h +4 -12
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +27 -35
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.h +5 -13
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +35 -37
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +165 -173
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +9 -11
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +32 -40
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +39 -41
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +169 -177
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +16 -24
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +55 -57
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +241 -249
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +31 -39
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +23 -25
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +98 -106
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.h +11 -19
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +18 -26
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.h +9 -17
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.c +6 -8
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.h +16 -24
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +6 -8
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +24 -32
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +13 -21
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +3 -5
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +6 -14
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +6 -8
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +20 -28
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +33 -41
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +18 -26
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +31 -39
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +8 -10
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +34 -42
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +14 -16
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +47 -55
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.h +13 -21
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.c +2 -4
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h +4 -12
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +7 -9
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +19 -27
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_strategy.upb.c +6 -8
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_strategy.upb.h +20 -28
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.c +1 -3
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +1 -9
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +10 -18
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.c +4 -6
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.h +12 -20
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +2 -4
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +1 -9
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +45 -47
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +190 -198
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +54 -56
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +210 -218
- data/src/core/ext/upb-generated/google/api/http.upb.c +15 -17
- data/src/core/ext/upb-generated/google/api/http.upb.h +60 -68
- data/src/core/ext/upb-generated/google/api/httpbody.upb.c +4 -6
- data/src/core/ext/upb-generated/google/api/httpbody.upb.h +15 -23
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +3 -5
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +7 -15
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +359 -204
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +1340 -760
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +3 -5
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +7 -15
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +1 -3
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +1 -9
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +11 -13
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +43 -51
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +3 -5
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +7 -15
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +10 -12
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +28 -36
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +4 -6
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +15 -23
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c +11 -13
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.h +35 -43
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +10 -12
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +28 -36
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +48 -50
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +190 -198
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +5 -7
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +15 -23
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +3 -5
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +7 -15
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +21 -23
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +80 -88
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +9 -11
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +29 -37
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c +32 -34
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h +147 -155
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +10 -12
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +13 -21
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +4 -6
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +7 -15
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +2 -4
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +1 -9
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +4 -6
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +7 -15
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +3 -5
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +4 -12
- data/src/core/ext/upb-generated/validate/validate.upb.c +201 -203
- data/src/core/ext/upb-generated/validate/validate.upb.h +924 -932
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.c +10 -12
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.h +13 -21
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.c +4 -6
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.h +7 -15
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.c +2 -4
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.h +1 -9
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +9 -11
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +16 -24
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.h +4 -12
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +2 -4
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +4 -12
- data/src/core/ext/upb-generated/xds/core/v3/cidr.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/core/v3/cidr.upb.h +8 -16
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +6 -8
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +20 -28
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +4 -6
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +9 -17
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.h +8 -16
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +4 -6
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +12 -20
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +9 -11
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +35 -43
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +5 -7
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +14 -22
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +16 -18
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +43 -51
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.h +13 -21
- data/src/core/ext/upb-generated/xds/type/matcher/v3/cel.upb.c +2 -4
- data/src/core/ext/upb-generated/xds/type/matcher/v3/cel.upb.h +5 -13
- data/src/core/ext/upb-generated/xds/type/matcher/v3/domain.upb.c +4 -6
- data/src/core/ext/upb-generated/xds/type/matcher/v3/domain.upb.h +21 -29
- data/src/core/ext/upb-generated/xds/type/matcher/v3/http_inputs.upb.c +1 -3
- data/src/core/ext/upb-generated/xds/type/matcher/v3/http_inputs.upb.h +1 -9
- data/src/core/ext/upb-generated/xds/type/matcher/v3/ip.upb.c +5 -7
- data/src/core/ext/upb-generated/xds/type/matcher/v3/ip.upb.h +24 -32
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.c +24 -26
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.h +103 -111
- data/src/core/ext/upb-generated/xds/type/matcher/v3/range.upb.c +10 -12
- data/src/core/ext/upb-generated/xds/type/matcher/v3/range.upb.h +61 -69
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.h +9 -17
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.c +8 -10
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.h +33 -41
- data/src/core/ext/upb-generated/xds/type/v3/cel.upb.c +5 -7
- data/src/core/ext/upb-generated/xds/type/v3/cel.upb.h +18 -26
- data/src/core/ext/upb-generated/xds/type/v3/range.upb.c +7 -9
- data/src/core/ext/upb-generated/xds/type/v3/range.upb.h +19 -27
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +3 -5
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +8 -16
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +367 -290
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +10 -0
- data/src/core/ext/xds/xds_client.cc +6 -9
- data/src/core/ext/xds/xds_client.h +2 -2
- data/src/core/ext/xds/xds_cluster.cc +30 -42
- data/src/core/ext/xds/xds_cluster.h +0 -4
- data/src/core/ext/xds/xds_endpoint.cc +12 -19
- data/src/core/ext/xds/xds_endpoint.h +0 -1
- data/src/core/ext/xds/xds_http_filters.cc +1 -4
- data/src/core/ext/xds/xds_http_stateful_session_filter.cc +1 -4
- data/src/core/ext/xds/xds_listener.cc +14 -14
- data/src/core/ext/xds/xds_listener.h +13 -3
- data/src/core/ext/xds/xds_resource_type.h +1 -7
- data/src/core/ext/xds/xds_resource_type_impl.h +9 -11
- data/src/core/ext/xds/xds_route_config.cc +10 -11
- data/src/core/ext/xds/xds_route_config.h +1 -1
- data/src/core/ext/xds/xds_server_config_fetcher.cc +53 -28
- data/src/core/ext/xds/xds_transport_grpc.cc +11 -1
- data/src/core/lib/backoff/random_early_detection.cc +4 -2
- data/src/core/lib/backoff/random_early_detection.h +2 -4
- data/src/core/lib/channel/call_tracer.cc +7 -1
- data/src/core/lib/channel/call_tracer.h +4 -1
- data/src/core/lib/channel/channelz_registry.h +4 -2
- data/src/core/lib/channel/connected_channel.cc +1 -1
- data/src/core/lib/config/config_vars.h +1 -1
- data/src/core/lib/config/core_configuration.cc +2 -1
- data/src/core/lib/config/core_configuration.h +5 -4
- data/src/core/lib/debug/stats_data.cc +146 -51
- data/src/core/lib/debug/stats_data.h +81 -20
- data/src/core/lib/event_engine/ares_resolver.cc +9 -0
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +3 -0
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +3 -0
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +3 -0
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +3 -0
- data/src/core/lib/event_engine/cf_engine/cftype_unique_ref.h +3 -0
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +15 -3
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +3 -0
- data/src/core/lib/event_engine/nameser.h +102 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +1 -1
- data/src/core/lib/event_engine/thread_pool/thread_count.h +15 -0
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +3 -15
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +10 -4
- data/src/core/lib/experiments/config.cc +9 -1
- data/src/core/lib/experiments/experiments.cc +409 -144
- data/src/core/lib/experiments/experiments.h +153 -39
- data/src/core/lib/gprpp/fork.h +1 -1
- data/src/core/lib/gprpp/manual_constructor.h +1 -2
- data/src/core/lib/gprpp/no_destruct.h +1 -1
- data/src/core/lib/gprpp/per_cpu.cc +2 -0
- data/src/core/lib/gprpp/per_cpu.h +36 -7
- data/src/core/lib/gprpp/ref_counted_ptr.h +63 -0
- data/src/core/lib/gprpp/work_serializer.cc +297 -25
- data/src/core/lib/gprpp/work_serializer.h +25 -9
- data/src/core/lib/iomgr/combiner.cc +54 -15
- data/src/core/lib/iomgr/combiner.h +8 -3
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +2 -4
- data/src/core/lib/iomgr/exec_ctx.cc +12 -0
- data/src/core/lib/iomgr/exec_ctx.h +55 -19
- data/src/core/lib/iomgr/polling_entity.cc +10 -0
- data/src/core/lib/iomgr/polling_entity.h +2 -0
- data/src/core/lib/iomgr/port.h +14 -0
- data/src/core/lib/iomgr/tcp_posix.cc +17 -14
- data/src/core/lib/load_balancing/lb_policy.h +10 -9
- data/src/core/lib/promise/arena_promise.h +5 -1
- data/src/core/lib/promise/detail/seq_state.h +418 -0
- data/src/core/lib/promise/latch.h +1 -0
- data/src/core/lib/promise/loop.h +8 -5
- data/src/core/lib/promise/pipe.h +24 -24
- data/src/core/lib/promise/poll.h +4 -6
- data/src/core/lib/resolver/server_address.h +1 -0
- data/src/core/lib/resource_quota/memory_quota.cc +58 -2
- data/src/core/lib/resource_quota/memory_quota.h +4 -1
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +115 -9
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +14 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc +86 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +0 -59
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +2 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +7 -57
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +1 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +2 -14
- data/src/core/lib/slice/slice.h +6 -0
- data/src/core/lib/slice/slice_buffer.cc +15 -0
- data/src/core/lib/slice/slice_buffer.h +16 -4
- data/src/core/lib/slice/slice_refcount.h +1 -1
- data/src/core/lib/surface/call.cc +92 -34
- data/src/core/lib/surface/call.h +4 -0
- data/src/core/lib/surface/channel.cc +7 -4
- data/src/core/lib/surface/channel_init.h +3 -2
- data/src/core/lib/surface/server.cc +45 -5
- data/src/core/lib/surface/server.h +18 -6
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/batch_builder.cc +3 -5
- data/src/core/lib/transport/metadata_batch.cc +6 -0
- data/src/core/lib/transport/metadata_batch.h +20 -1
- data/src/core/lib/transport/parsed_metadata.h +2 -4
- data/src/core/lib/transport/simple_slice_based_metadata.h +1 -2
- data/src/core/lib/transport/transport.h +21 -11
- data/src/core/tsi/ssl_transport_security.cc +7 -0
- data/src/core/tsi/ssl_transport_security.h +4 -0
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/ext/grpc/rb_channel_args.c +6 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +4 -1
- data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +185 -0
- data/third_party/upb/upb/collections/array.c +6 -0
- data/third_party/upb/upb/collections/array.h +6 -0
- data/third_party/upb/upb/collections/map.c +7 -0
- data/third_party/upb/upb/collections/map.h +5 -0
- data/third_party/upb/upb/collections/map_sorter_internal.h +1 -1
- data/third_party/upb/upb/collections/message_value.h +8 -1
- data/third_party/upb/upb/generated_code_support.h +54 -0
- data/third_party/upb/upb/hash/common.c +5 -0
- data/third_party/upb/upb/hash/common.h +1 -0
- data/third_party/upb/upb/hash/str_table.h +1 -0
- data/third_party/upb/upb/message/accessors.c +25 -1
- data/third_party/upb/upb/message/accessors.h +46 -25
- data/third_party/upb/upb/message/accessors_internal.h +69 -3
- data/third_party/upb/upb/message/extension_internal.h +1 -1
- data/third_party/upb/upb/message/internal/map_entry.h +64 -0
- data/third_party/upb/upb/message/internal.h +2 -6
- data/third_party/upb/upb/message/message.c +0 -6
- data/third_party/upb/upb/message/message.h +1 -1
- data/third_party/upb/upb/message/tagged_ptr.h +89 -0
- data/third_party/upb/upb/mini_descriptor/build_enum.c +150 -0
- data/third_party/upb/upb/mini_descriptor/build_enum.h +63 -0
- data/third_party/upb/upb/{mini_table → mini_descriptor}/decode.c +122 -374
- data/third_party/upb/upb/{mini_table → mini_descriptor}/decode.h +11 -50
- data/third_party/upb/upb/mini_descriptor/internal/base92.c +46 -0
- data/third_party/upb/upb/mini_descriptor/internal/base92.h +81 -0
- data/third_party/upb/upb/mini_descriptor/internal/decoder.h +73 -0
- data/third_party/upb/upb/{mini_table → mini_descriptor/internal}/encode.c +58 -32
- data/third_party/upb/upb/{mini_table/encode_internal.h → mini_descriptor/internal/encode.h} +3 -4
- data/third_party/upb/upb/{mini_table/encode_internal.hpp → mini_descriptor/internal/encode.hpp} +1 -1
- data/third_party/upb/upb/mini_descriptor/internal/modifiers.h +50 -0
- data/third_party/upb/upb/{mini_table/common_internal.h → mini_descriptor/internal/wire_constants.h} +3 -23
- data/third_party/upb/upb/mini_descriptor/link.c +142 -0
- data/third_party/upb/upb/mini_descriptor/link.h +104 -0
- data/third_party/upb/upb/mini_table/{types.h → enum.h} +19 -9
- data/third_party/upb/upb/mini_table/extension.h +40 -0
- data/third_party/upb/upb/mini_table/extension_registry.c +1 -1
- data/third_party/upb/upb/mini_table/extension_registry.h +2 -1
- data/third_party/upb/upb/mini_table/field.h +118 -0
- data/third_party/upb/upb/{json_decode.h → mini_table/file.h} +5 -6
- data/third_party/upb/upb/mini_table/{enum_internal.h → internal/enum.h} +7 -19
- data/third_party/upb/upb/mini_table/{extension_internal.h → internal/extension.h} +8 -8
- data/third_party/upb/upb/mini_table/{field_internal.h → internal/field.h} +10 -66
- data/third_party/upb/upb/mini_table/{file_internal.h → internal/file.h} +6 -4
- data/third_party/upb/upb/mini_table/internal/message.c +39 -0
- data/third_party/upb/upb/mini_table/{message_internal.h → internal/message.h} +14 -37
- data/third_party/upb/upb/mini_table/{sub_internal.h → internal/sub.h} +7 -6
- data/third_party/upb/upb/mini_table/{common.c → message.c} +2 -33
- data/third_party/upb/upb/mini_table/{common.h → message.h} +12 -77
- data/third_party/upb/upb/{json_encode.h → mini_table/sub.h} +5 -6
- data/third_party/upb/upb/reflection/def.hpp +16 -4
- data/third_party/upb/upb/reflection/def_pool_internal.h +1 -1
- data/third_party/upb/upb/reflection/desc_state_internal.h +1 -1
- data/third_party/upb/upb/reflection/enum_def.c +1 -1
- data/third_party/upb/upb/reflection/field_def.c +2 -1
- data/third_party/upb/upb/reflection/message.c +2 -2
- data/third_party/upb/upb/reflection/message_def.c +3 -1
- data/third_party/upb/upb/wire/decode.c +68 -29
- data/third_party/upb/upb/wire/decode.h +40 -0
- data/third_party/upb/upb/wire/encode.c +23 -13
- metadata +44 -27
- data/src/core/lib/event_engine/thread_pool/original_thread_pool.cc +0 -256
- data/src/core/lib/event_engine/thread_pool/original_thread_pool.h +0 -137
@@ -82,10 +82,12 @@ class grpc_ssl_channel_security_connector final
|
|
82
82
|
grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
|
83
83
|
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
|
84
84
|
const grpc_ssl_config* config, const char* target_name,
|
85
|
-
const char* overridden_target_name
|
85
|
+
const char* overridden_target_name,
|
86
|
+
tsi_ssl_client_handshaker_factory* client_handshaker_factory)
|
86
87
|
: grpc_channel_security_connector(GRPC_SSL_URL_SCHEME,
|
87
88
|
std::move(channel_creds),
|
88
89
|
std::move(request_metadata_creds)),
|
90
|
+
client_handshaker_factory_(client_handshaker_factory),
|
89
91
|
overridden_target_name_(
|
90
92
|
overridden_target_name == nullptr ? "" : overridden_target_name),
|
91
93
|
verify_options_(&config->verify_options) {
|
@@ -99,39 +101,6 @@ class grpc_ssl_channel_security_connector final
|
|
99
101
|
tsi_ssl_client_handshaker_factory_unref(client_handshaker_factory_);
|
100
102
|
}
|
101
103
|
|
102
|
-
grpc_security_status InitializeHandshakerFactory(
|
103
|
-
const grpc_ssl_config* config, const char* pem_root_certs,
|
104
|
-
const tsi_ssl_root_certs_store* root_store,
|
105
|
-
tsi_ssl_session_cache* ssl_session_cache) {
|
106
|
-
bool has_key_cert_pair =
|
107
|
-
config->pem_key_cert_pair != nullptr &&
|
108
|
-
config->pem_key_cert_pair->private_key != nullptr &&
|
109
|
-
config->pem_key_cert_pair->cert_chain != nullptr;
|
110
|
-
tsi_ssl_client_handshaker_options options;
|
111
|
-
GPR_DEBUG_ASSERT(pem_root_certs != nullptr);
|
112
|
-
options.pem_root_certs = pem_root_certs;
|
113
|
-
options.root_store = root_store;
|
114
|
-
options.alpn_protocols =
|
115
|
-
grpc_fill_alpn_protocol_strings(&options.num_alpn_protocols);
|
116
|
-
if (has_key_cert_pair) {
|
117
|
-
options.pem_key_cert_pair = config->pem_key_cert_pair;
|
118
|
-
}
|
119
|
-
options.cipher_suites = grpc_get_ssl_cipher_suites();
|
120
|
-
options.session_cache = ssl_session_cache;
|
121
|
-
options.min_tls_version = grpc_get_tsi_tls_version(config->min_tls_version);
|
122
|
-
options.max_tls_version = grpc_get_tsi_tls_version(config->max_tls_version);
|
123
|
-
const tsi_result result =
|
124
|
-
tsi_create_ssl_client_handshaker_factory_with_options(
|
125
|
-
&options, &client_handshaker_factory_);
|
126
|
-
gpr_free(options.alpn_protocols);
|
127
|
-
if (result != TSI_OK) {
|
128
|
-
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
|
129
|
-
tsi_result_to_string(result));
|
130
|
-
return GRPC_SECURITY_ERROR;
|
131
|
-
}
|
132
|
-
return GRPC_SECURITY_OK;
|
133
|
-
}
|
134
|
-
|
135
104
|
void add_handshakers(const grpc_core::ChannelArgs& args,
|
136
105
|
grpc_pollset_set* /*interested_parties*/,
|
137
106
|
grpc_core::HandshakeManager* handshake_mgr) override {
|
@@ -205,7 +174,7 @@ class grpc_ssl_channel_security_connector final
|
|
205
174
|
}
|
206
175
|
|
207
176
|
private:
|
208
|
-
tsi_ssl_client_handshaker_factory* client_handshaker_factory_;
|
177
|
+
tsi_ssl_client_handshaker_factory* client_handshaker_factory_ = nullptr;
|
209
178
|
std::string target_name_;
|
210
179
|
std::string overridden_target_name_;
|
211
180
|
const verify_peer_options* verify_options_;
|
@@ -411,36 +380,17 @@ grpc_ssl_channel_security_connector_create(
|
|
411
380
|
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
|
412
381
|
const grpc_ssl_config* config, const char* target_name,
|
413
382
|
const char* overridden_target_name,
|
414
|
-
|
383
|
+
tsi_ssl_client_handshaker_factory* client_factory) {
|
415
384
|
if (config == nullptr || target_name == nullptr) {
|
416
385
|
gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name.");
|
417
386
|
return nullptr;
|
418
387
|
}
|
419
388
|
|
420
|
-
const char* pem_root_certs;
|
421
|
-
const tsi_ssl_root_certs_store* root_store;
|
422
|
-
if (config->pem_root_certs == nullptr) {
|
423
|
-
// Use default root certificates.
|
424
|
-
pem_root_certs = grpc_core::DefaultSslRootStore::GetPemRootCerts();
|
425
|
-
if (pem_root_certs == nullptr) {
|
426
|
-
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
|
427
|
-
return nullptr;
|
428
|
-
}
|
429
|
-
root_store = grpc_core::DefaultSslRootStore::GetRootStore();
|
430
|
-
} else {
|
431
|
-
pem_root_certs = config->pem_root_certs;
|
432
|
-
root_store = nullptr;
|
433
|
-
}
|
434
|
-
|
435
389
|
grpc_core::RefCountedPtr<grpc_ssl_channel_security_connector> c =
|
436
390
|
grpc_core::MakeRefCounted<grpc_ssl_channel_security_connector>(
|
437
391
|
std::move(channel_creds), std::move(request_metadata_creds), config,
|
438
|
-
target_name, overridden_target_name
|
439
|
-
|
440
|
-
config, pem_root_certs, root_store, ssl_session_cache);
|
441
|
-
if (result != GRPC_SECURITY_OK) {
|
442
|
-
return nullptr;
|
443
|
-
}
|
392
|
+
target_name, overridden_target_name,
|
393
|
+
tsi_ssl_client_handshaker_factory_ref(client_factory));
|
444
394
|
return c;
|
445
395
|
}
|
446
396
|
|
@@ -57,7 +57,7 @@ grpc_ssl_channel_security_connector_create(
|
|
57
57
|
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
|
58
58
|
const grpc_ssl_config* config, const char* target_name,
|
59
59
|
const char* overridden_target_name,
|
60
|
-
|
60
|
+
tsi_ssl_client_handshaker_factory* factory);
|
61
61
|
|
62
62
|
// Config for ssl servers.
|
63
63
|
struct grpc_ssl_server_config {
|
@@ -389,13 +389,7 @@ void TlsChannelSecurityConnector::check_peer(
|
|
389
389
|
}
|
390
390
|
|
391
391
|
void TlsChannelSecurityConnector::cancel_check_peer(
|
392
|
-
grpc_closure* on_peer_checked, grpc_error_handle error) {
|
393
|
-
if (!error.ok()) {
|
394
|
-
gpr_log(GPR_ERROR,
|
395
|
-
"TlsChannelSecurityConnector::cancel_check_peer error: %s",
|
396
|
-
StatusToString(error).c_str());
|
397
|
-
return;
|
398
|
-
}
|
392
|
+
grpc_closure* on_peer_checked, grpc_error_handle /*error*/) {
|
399
393
|
auto* verifier = options_->certificate_verifier();
|
400
394
|
if (verifier != nullptr) {
|
401
395
|
grpc_tls_custom_verification_check_request* pending_verifier_request =
|
@@ -674,13 +668,7 @@ void TlsServerSecurityConnector::check_peer(
|
|
674
668
|
}
|
675
669
|
|
676
670
|
void TlsServerSecurityConnector::cancel_check_peer(
|
677
|
-
grpc_closure* on_peer_checked, grpc_error_handle error) {
|
678
|
-
if (!error.ok()) {
|
679
|
-
gpr_log(GPR_ERROR,
|
680
|
-
"TlsServerSecurityConnector::cancel_check_peer error: %s",
|
681
|
-
StatusToString(error).c_str());
|
682
|
-
return;
|
683
|
-
}
|
671
|
+
grpc_closure* on_peer_checked, grpc_error_handle /*error*/) {
|
684
672
|
auto* verifier = options_->certificate_verifier();
|
685
673
|
if (verifier != nullptr) {
|
686
674
|
grpc_tls_custom_verification_check_request* pending_verifier_request =
|
data/src/core/lib/slice/slice.h
CHANGED
@@ -291,6 +291,12 @@ class GPR_MSVC_EMPTY_BASE_CLASS_WORKAROUND MutableSlice
|
|
291
291
|
return MutableSlice(grpc_slice_sub_no_ref(TakeCSlice(), pos, pos + n));
|
292
292
|
}
|
293
293
|
|
294
|
+
// Split this slice in two, returning the first n bytes and leaving the
|
295
|
+
// remainder.
|
296
|
+
MutableSlice TakeFirst(size_t n) {
|
297
|
+
return MutableSlice(grpc_slice_split_head(c_slice_ptr(), n));
|
298
|
+
}
|
299
|
+
|
294
300
|
// Iterator access to the underlying bytes
|
295
301
|
uint8_t* begin() { return mutable_data(); }
|
296
302
|
uint8_t* end() { return mutable_data() + size(); }
|
@@ -70,6 +70,21 @@ std::string SliceBuffer::JoinIntoString() const {
|
|
70
70
|
return result;
|
71
71
|
}
|
72
72
|
|
73
|
+
Slice SliceBuffer::JoinIntoSlice() const {
|
74
|
+
if (slice_buffer_.count == 0) return Slice();
|
75
|
+
if (slice_buffer_.count == 1) return RefSlice(0);
|
76
|
+
grpc_slice slice = GRPC_SLICE_MALLOC(slice_buffer_.length);
|
77
|
+
size_t ofs = 0;
|
78
|
+
for (size_t i = 0; i < slice_buffer_.count; i++) {
|
79
|
+
memcpy(GRPC_SLICE_START_PTR(slice) + ofs,
|
80
|
+
GRPC_SLICE_START_PTR(slice_buffer_.slices[i]),
|
81
|
+
GRPC_SLICE_LENGTH(slice_buffer_.slices[i]));
|
82
|
+
ofs += GRPC_SLICE_LENGTH(slice_buffer_.slices[i]);
|
83
|
+
}
|
84
|
+
GPR_ASSERT(ofs == slice_buffer_.length);
|
85
|
+
return Slice(slice);
|
86
|
+
}
|
87
|
+
|
73
88
|
} // namespace grpc_core
|
74
89
|
|
75
90
|
// grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1
|
@@ -28,6 +28,10 @@
|
|
28
28
|
|
29
29
|
#include "src/core/lib/slice/slice.h"
|
30
30
|
|
31
|
+
// Copy the first n bytes of src into memory pointed to by dst.
|
32
|
+
void grpc_slice_buffer_copy_first_into_buffer(grpc_slice_buffer* src, size_t n,
|
33
|
+
void* dst);
|
34
|
+
|
31
35
|
namespace grpc_core {
|
32
36
|
|
33
37
|
/// A slice buffer holds the memory for a collection of slices.
|
@@ -67,6 +71,9 @@ class SliceBuffer {
|
|
67
71
|
/// Appends a SliceBuffer into the SliceBuffer and makes an attempt to merge
|
68
72
|
/// this slice with the last slice in the SliceBuffer.
|
69
73
|
void Append(const SliceBuffer& other);
|
74
|
+
void TakeAndAppend(SliceBuffer& other) {
|
75
|
+
grpc_slice_buffer_move_into(&other.slice_buffer_, &slice_buffer_);
|
76
|
+
}
|
70
77
|
|
71
78
|
/// Adds a new slice into the SliceBuffer at the next available index.
|
72
79
|
/// Returns the index at which the new slice is added.
|
@@ -75,6 +82,12 @@ class SliceBuffer {
|
|
75
82
|
/// Returns the number of slices held by the SliceBuffer.
|
76
83
|
size_t Count() const { return slice_buffer_.count; }
|
77
84
|
|
85
|
+
/// Copy the entire contents to a memory buffer.
|
86
|
+
void CopyToBuffer(uint8_t* dst) {
|
87
|
+
grpc_slice_buffer_copy_first_into_buffer(&slice_buffer_,
|
88
|
+
slice_buffer_.length, dst);
|
89
|
+
}
|
90
|
+
|
78
91
|
/// Removes/deletes the last n bytes in the SliceBuffer.
|
79
92
|
void RemoveLastNBytes(size_t n) {
|
80
93
|
grpc_slice_buffer_trim_end(&slice_buffer_, n, nullptr);
|
@@ -125,6 +138,9 @@ class SliceBuffer {
|
|
125
138
|
/// Concatenate all slices and return the resulting string.
|
126
139
|
std::string JoinIntoString() const;
|
127
140
|
|
141
|
+
/// Concatenate all slices and return the resulting slice.
|
142
|
+
Slice JoinIntoSlice() const;
|
143
|
+
|
128
144
|
// Return a copy of the slice buffer
|
129
145
|
SliceBuffer Copy() const {
|
130
146
|
SliceBuffer copy;
|
@@ -161,8 +177,4 @@ class SliceBuffer {
|
|
161
177
|
|
162
178
|
} // namespace grpc_core
|
163
179
|
|
164
|
-
// Copy the first n bytes of src into memory pointed to by dst.
|
165
|
-
void grpc_slice_buffer_copy_first_into_buffer(grpc_slice_buffer* src, size_t n,
|
166
|
-
void* dst);
|
167
|
-
|
168
180
|
#endif // GRPC_SRC_CORE_LIB_SLICE_SLICE_BUFFER_H
|
@@ -27,7 +27,7 @@
|
|
27
27
|
#include "src/core/lib/debug/trace.h"
|
28
28
|
#include "src/core/lib/gprpp/debug_location.h"
|
29
29
|
|
30
|
-
extern grpc_core::DebugOnlyTraceFlag grpc_slice_refcount_trace;
|
30
|
+
extern GRPC_DLL grpc_core::DebugOnlyTraceFlag grpc_slice_refcount_trace;
|
31
31
|
|
32
32
|
// grpc_slice_refcount : A reference count for grpc_slice.
|
33
33
|
struct grpc_slice_refcount {
|
@@ -59,7 +59,6 @@
|
|
59
59
|
|
60
60
|
#include "src/core/lib/channel/call_finalization.h"
|
61
61
|
#include "src/core/lib/channel/call_tracer.h"
|
62
|
-
#include "src/core/lib/channel/channel_args.h"
|
63
62
|
#include "src/core/lib/channel/channel_stack.h"
|
64
63
|
#include "src/core/lib/channel/channelz.h"
|
65
64
|
#include "src/core/lib/channel/context.h"
|
@@ -836,6 +835,9 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
|
|
836
835
|
call->send_initial_metadata_.Set(HttpAuthorityMetadata(),
|
837
836
|
std::move(*args->authority));
|
838
837
|
}
|
838
|
+
call->send_initial_metadata_.Set(
|
839
|
+
GrpcRegisteredMethod(), reinterpret_cast<void*>(static_cast<uintptr_t>(
|
840
|
+
args->registered_method)));
|
839
841
|
} else {
|
840
842
|
global_stats().IncrementServerCallsCreated();
|
841
843
|
call->final_op_.server.cancelled = nullptr;
|
@@ -844,11 +846,11 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
|
|
844
846
|
// collecting from when the call is created at the transport. The idea is
|
845
847
|
// that the transport would create the call tracer and pass it in as part of
|
846
848
|
// the metadata.
|
847
|
-
|
848
|
-
args->server != nullptr
|
849
|
-
if (server_call_tracer_factory != nullptr) {
|
849
|
+
if (args->server != nullptr &&
|
850
|
+
args->server->server_call_tracer_factory() != nullptr) {
|
850
851
|
auto* server_call_tracer =
|
851
|
-
server_call_tracer_factory->CreateNewServerCallTracer(
|
852
|
+
args->server->server_call_tracer_factory()->CreateNewServerCallTracer(
|
853
|
+
arena);
|
852
854
|
if (server_call_tracer != nullptr) {
|
853
855
|
// Note that we are setting both
|
854
856
|
// GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE and
|
@@ -1120,7 +1122,10 @@ bool FilterStackCall::PrepareApplicationMetadata(size_t count,
|
|
1120
1122
|
namespace {
|
1121
1123
|
class PublishToAppEncoder {
|
1122
1124
|
public:
|
1123
|
-
explicit PublishToAppEncoder(grpc_metadata_array* dest
|
1125
|
+
explicit PublishToAppEncoder(grpc_metadata_array* dest,
|
1126
|
+
const grpc_metadata_batch* encoding,
|
1127
|
+
bool is_client)
|
1128
|
+
: dest_(dest), encoding_(encoding), is_client_(is_client) {}
|
1124
1129
|
|
1125
1130
|
void Encode(const Slice& key, const Slice& value) {
|
1126
1131
|
Append(key.c_slice(), value.c_slice());
|
@@ -1163,12 +1168,20 @@ class PublishToAppEncoder {
|
|
1163
1168
|
}
|
1164
1169
|
|
1165
1170
|
void Append(grpc_slice key, grpc_slice value) {
|
1171
|
+
if (dest_->count == dest_->capacity) {
|
1172
|
+
Crash(absl::StrCat(
|
1173
|
+
"Too many metadata entries: capacity=", dest_->capacity, " on ",
|
1174
|
+
is_client_ ? "client" : "server", " encoding ", encoding_->count(),
|
1175
|
+
" elements: ", encoding_->DebugString().c_str()));
|
1176
|
+
}
|
1166
1177
|
auto* mdusr = &dest_->metadata[dest_->count++];
|
1167
1178
|
mdusr->key = key;
|
1168
1179
|
mdusr->value = value;
|
1169
1180
|
}
|
1170
1181
|
|
1171
1182
|
grpc_metadata_array* const dest_;
|
1183
|
+
const grpc_metadata_batch* const encoding_;
|
1184
|
+
const bool is_client_;
|
1172
1185
|
};
|
1173
1186
|
} // namespace
|
1174
1187
|
|
@@ -1185,7 +1198,7 @@ void FilterStackCall::PublishAppMetadata(grpc_metadata_batch* b,
|
|
1185
1198
|
dest->metadata = static_cast<grpc_metadata*>(
|
1186
1199
|
gpr_realloc(dest->metadata, sizeof(grpc_metadata) * dest->capacity));
|
1187
1200
|
}
|
1188
|
-
PublishToAppEncoder encoder(dest);
|
1201
|
+
PublishToAppEncoder encoder(dest, b, is_client());
|
1189
1202
|
b->Encode(&encoder);
|
1190
1203
|
}
|
1191
1204
|
|
@@ -1969,10 +1982,21 @@ class PromiseBasedCall : public Call,
|
|
1969
1982
|
void SetCompletionQueue(grpc_completion_queue* cq) override;
|
1970
1983
|
bool Completed() final { return finished_.IsSet(); }
|
1971
1984
|
|
1985
|
+
virtual void OrphanCall() = 0;
|
1986
|
+
|
1972
1987
|
// Implementation of call refcounting: move this to DualRefCounted once we
|
1973
1988
|
// don't need to maintain FilterStackCall compatibility
|
1974
|
-
void ExternalRef() final {
|
1975
|
-
|
1989
|
+
void ExternalRef() final {
|
1990
|
+
if (external_refs_.fetch_add(1, std::memory_order_relaxed) == 0) {
|
1991
|
+
InternalRef("external");
|
1992
|
+
}
|
1993
|
+
}
|
1994
|
+
void ExternalUnref() final {
|
1995
|
+
if (external_refs_.fetch_sub(1, std::memory_order_acq_rel) == 1) {
|
1996
|
+
OrphanCall();
|
1997
|
+
InternalUnref("external");
|
1998
|
+
}
|
1999
|
+
}
|
1976
2000
|
void InternalRef(const char* reason) final {
|
1977
2001
|
if (grpc_call_refcount_trace.enabled()) {
|
1978
2002
|
gpr_log(GPR_DEBUG, "INTERNAL_REF:%p:%s", this, reason);
|
@@ -2335,14 +2359,16 @@ class PromiseBasedCall : public Call,
|
|
2335
2359
|
}
|
2336
2360
|
|
2337
2361
|
CallContext call_context_{this};
|
2338
|
-
|
2362
|
+
// Double refcounted for now: party owns the internal refcount, we track the
|
2363
|
+
// external refcount. Figure out a better scheme post-promise conversion.
|
2364
|
+
std::atomic<size_t> external_refs_;
|
2339
2365
|
// Contexts for various subsystems (security, tracing, ...).
|
2340
2366
|
grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {};
|
2341
2367
|
grpc_completion_queue* cq_;
|
2342
2368
|
CompletionInfo completion_info_[6];
|
2343
2369
|
grpc_call_stats final_stats_{};
|
2344
2370
|
Slice final_message_;
|
2345
|
-
grpc_status_code final_status_;
|
2371
|
+
grpc_status_code final_status_ = GRPC_STATUS_UNKNOWN;
|
2346
2372
|
CallFinalization finalization_;
|
2347
2373
|
// Current deadline.
|
2348
2374
|
Mutex deadline_mu_;
|
@@ -2380,7 +2406,8 @@ PromiseBasedCall::PromiseBasedCall(Arena* arena, uint32_t initial_external_refs,
|
|
2380
2406
|
const grpc_call_create_args& args)
|
2381
2407
|
: Call(arena, args.server_transport_data == nullptr, args.send_deadline,
|
2382
2408
|
args.channel->Ref()),
|
2383
|
-
Party(arena, initial_external_refs),
|
2409
|
+
Party(arena, initial_external_refs != 0 ? 1 : 0),
|
2410
|
+
external_refs_(initial_external_refs),
|
2384
2411
|
cq_(args.cq) {
|
2385
2412
|
if (args.cq != nullptr) {
|
2386
2413
|
GRPC_CQ_INTERNAL_REF(args.cq, "bind");
|
@@ -2652,7 +2679,8 @@ ServerCallContext* CallContext::server_call_context() {
|
|
2652
2679
|
// PublishMetadataArray
|
2653
2680
|
|
2654
2681
|
namespace {
|
2655
|
-
void PublishMetadataArray(grpc_metadata_batch* md, grpc_metadata_array* array
|
2682
|
+
void PublishMetadataArray(grpc_metadata_batch* md, grpc_metadata_array* array,
|
2683
|
+
bool is_client) {
|
2656
2684
|
const auto md_count = md->count();
|
2657
2685
|
if (md_count > array->capacity) {
|
2658
2686
|
array->capacity =
|
@@ -2660,7 +2688,7 @@ void PublishMetadataArray(grpc_metadata_batch* md, grpc_metadata_array* array) {
|
|
2660
2688
|
array->metadata = static_cast<grpc_metadata*>(
|
2661
2689
|
gpr_realloc(array->metadata, sizeof(grpc_metadata) * array->capacity));
|
2662
2690
|
}
|
2663
|
-
PublishToAppEncoder encoder(array);
|
2691
|
+
PublishToAppEncoder encoder(array, md, is_client);
|
2664
2692
|
md->Encode(&encoder);
|
2665
2693
|
}
|
2666
2694
|
} // namespace
|
@@ -2672,18 +2700,20 @@ void PublishMetadataArray(grpc_metadata_batch* md, grpc_metadata_array* array) {
|
|
2672
2700
|
class ClientPromiseBasedCall final : public PromiseBasedCall {
|
2673
2701
|
public:
|
2674
2702
|
ClientPromiseBasedCall(Arena* arena, grpc_call_create_args* args)
|
2675
|
-
: PromiseBasedCall(arena, 1, *args)
|
2703
|
+
: PromiseBasedCall(arena, 1, *args),
|
2704
|
+
polling_entity_(
|
2705
|
+
args->cq != nullptr
|
2706
|
+
? grpc_polling_entity_create_from_pollset(
|
2707
|
+
grpc_cq_pollset(args->cq))
|
2708
|
+
: (args->pollset_set_alternative != nullptr
|
2709
|
+
? grpc_polling_entity_create_from_pollset_set(
|
2710
|
+
args->pollset_set_alternative)
|
2711
|
+
: grpc_polling_entity{})) {
|
2676
2712
|
global_stats().IncrementClientCallsCreated();
|
2677
2713
|
if (args->cq != nullptr) {
|
2678
2714
|
GPR_ASSERT(args->pollset_set_alternative == nullptr &&
|
2679
2715
|
"Only one of 'cq' and 'pollset_set_alternative' should be "
|
2680
2716
|
"non-nullptr.");
|
2681
|
-
polling_entity_.Set(
|
2682
|
-
grpc_polling_entity_create_from_pollset(grpc_cq_pollset(args->cq)));
|
2683
|
-
}
|
2684
|
-
if (args->pollset_set_alternative != nullptr) {
|
2685
|
-
polling_entity_.Set(grpc_polling_entity_create_from_pollset_set(
|
2686
|
-
args->pollset_set_alternative));
|
2687
2717
|
}
|
2688
2718
|
ScopedContext context(this);
|
2689
2719
|
send_initial_metadata_ =
|
@@ -2693,14 +2723,27 @@ class ClientPromiseBasedCall final : public PromiseBasedCall {
|
|
2693
2723
|
send_initial_metadata_->Set(HttpAuthorityMetadata(),
|
2694
2724
|
std::move(*args->authority));
|
2695
2725
|
}
|
2726
|
+
send_initial_metadata_->Set(GrpcRegisteredMethod(),
|
2727
|
+
reinterpret_cast<void*>(static_cast<uintptr_t>(
|
2728
|
+
args->registered_method)));
|
2696
2729
|
if (auto* channelz_channel = channel()->channelz_node()) {
|
2697
2730
|
channelz_channel->RecordCallStarted();
|
2698
2731
|
}
|
2699
2732
|
if (args->send_deadline != Timestamp::InfFuture()) {
|
2700
2733
|
UpdateDeadline(args->send_deadline);
|
2701
2734
|
}
|
2735
|
+
Call* parent = Call::FromC(args->parent);
|
2736
|
+
if (parent != nullptr) {
|
2737
|
+
auto parent_status = InitParent(parent, args->propagation_mask);
|
2738
|
+
if (!parent_status.ok()) {
|
2739
|
+
CancelWithError(std::move(parent_status));
|
2740
|
+
}
|
2741
|
+
PublishToParent(parent);
|
2742
|
+
}
|
2702
2743
|
}
|
2703
2744
|
|
2745
|
+
void OrphanCall() override { MaybeUnpublishFromParent(); }
|
2746
|
+
|
2704
2747
|
~ClientPromiseBasedCall() override {
|
2705
2748
|
ScopedContext context(this);
|
2706
2749
|
send_initial_metadata_.reset();
|
@@ -2728,7 +2771,9 @@ class ClientPromiseBasedCall final : public PromiseBasedCall {
|
|
2728
2771
|
"cancel_with_error",
|
2729
2772
|
[error = std::move(error), this]() {
|
2730
2773
|
if (!cancel_error_.is_set()) {
|
2731
|
-
|
2774
|
+
auto md = ServerMetadataFromStatus(error);
|
2775
|
+
md->Set(GrpcCallWasCancelled(), true);
|
2776
|
+
cancel_error_.Set(std::move(md));
|
2732
2777
|
}
|
2733
2778
|
return Empty{};
|
2734
2779
|
},
|
@@ -2778,7 +2823,7 @@ class ClientPromiseBasedCall final : public PromiseBasedCall {
|
|
2778
2823
|
Latch<grpc_polling_entity> polling_entity_;
|
2779
2824
|
Pipe<MessageHandle> client_to_server_messages_{arena()};
|
2780
2825
|
Pipe<MessageHandle> server_to_client_messages_{arena()};
|
2781
|
-
bool is_trailers_only_;
|
2826
|
+
bool is_trailers_only_ = false;
|
2782
2827
|
// True once the promise for the call is started.
|
2783
2828
|
// This corresponds to sending initial metadata, or cancelling before doing
|
2784
2829
|
// so.
|
@@ -2856,7 +2901,9 @@ grpc_call_error ClientPromiseBasedCall::ValidateBatch(const grpc_op* ops,
|
|
2856
2901
|
case GRPC_OP_SEND_STATUS_FROM_SERVER:
|
2857
2902
|
return GRPC_CALL_ERROR_NOT_ON_CLIENT;
|
2858
2903
|
}
|
2859
|
-
if (got_ops.is_set(op.op))
|
2904
|
+
if (got_ops.is_set(op.op)) {
|
2905
|
+
return GRPC_CALL_ERROR_TOO_MANY_OPERATIONS;
|
2906
|
+
}
|
2860
2907
|
got_ops.set(op.op);
|
2861
2908
|
}
|
2862
2909
|
return GRPC_CALL_OK;
|
@@ -2960,15 +3007,22 @@ void ClientPromiseBasedCall::StartRecvInitialMetadata(
|
|
2960
3007
|
NextResult<ServerMetadataHandle> next_metadata) mutable {
|
2961
3008
|
server_initial_metadata_.sender.Close();
|
2962
3009
|
ServerMetadataHandle metadata;
|
3010
|
+
if (grpc_call_trace.enabled()) {
|
3011
|
+
gpr_log(GPR_INFO, "%s[call] RecvTrailingMetadata: %s",
|
3012
|
+
DebugTag().c_str(),
|
3013
|
+
next_metadata.has_value()
|
3014
|
+
? next_metadata.value()->DebugString().c_str()
|
3015
|
+
: "null");
|
3016
|
+
}
|
2963
3017
|
if (next_metadata.has_value()) {
|
2964
|
-
is_trailers_only_ = false;
|
2965
3018
|
metadata = std::move(next_metadata.value());
|
3019
|
+
is_trailers_only_ = metadata->get(GrpcTrailersOnly()).value_or(false);
|
2966
3020
|
} else {
|
2967
3021
|
is_trailers_only_ = true;
|
2968
3022
|
metadata = arena()->MakePooled<ServerMetadata>(arena());
|
2969
3023
|
}
|
2970
3024
|
ProcessIncomingInitialMetadata(*metadata);
|
2971
|
-
PublishMetadataArray(metadata.get(), array);
|
3025
|
+
PublishMetadataArray(metadata.get(), array, true);
|
2972
3026
|
recv_initial_metadata_ = std::move(metadata);
|
2973
3027
|
FinishOpOnCompletion(&completion, PendingOp::kReceiveInitialMetadata);
|
2974
3028
|
});
|
@@ -2981,7 +3035,11 @@ void ClientPromiseBasedCall::Finish(ServerMetadataHandle trailing_metadata) {
|
|
2981
3035
|
}
|
2982
3036
|
ResetDeadline();
|
2983
3037
|
set_completed();
|
2984
|
-
client_to_server_messages_.sender.
|
3038
|
+
client_to_server_messages_.sender.CloseWithError();
|
3039
|
+
client_to_server_messages_.receiver.CloseWithError();
|
3040
|
+
if (trailing_metadata->get(GrpcCallWasCancelled()).value_or(false)) {
|
3041
|
+
server_to_client_messages_.receiver.CloseWithError();
|
3042
|
+
}
|
2985
3043
|
if (auto* channelz_channel = channel()->channelz_node()) {
|
2986
3044
|
if (trailing_metadata->get(GrpcStatusMetadata())
|
2987
3045
|
.value_or(GRPC_STATUS_UNKNOWN) == GRPC_STATUS_OK) {
|
@@ -3042,8 +3100,8 @@ void ClientPromiseBasedCall::StartRecvStatusOnClient(
|
|
3042
3100
|
*op_args.error_string =
|
3043
3101
|
gpr_strdup(MakeErrorString(trailing_metadata.get()).c_str());
|
3044
3102
|
}
|
3045
|
-
PublishMetadataArray(trailing_metadata.get(),
|
3046
|
-
|
3103
|
+
PublishMetadataArray(trailing_metadata.get(), op_args.trailing_metadata,
|
3104
|
+
true);
|
3047
3105
|
recv_trailing_metadata_ = std::move(trailing_metadata);
|
3048
3106
|
FinishOpOnCompletion(&completion, PendingOp::kReceiveStatusOnClient);
|
3049
3107
|
});
|
@@ -3059,6 +3117,7 @@ class ServerPromiseBasedCall final : public PromiseBasedCall {
|
|
3059
3117
|
public:
|
3060
3118
|
ServerPromiseBasedCall(Arena* arena, grpc_call_create_args* args);
|
3061
3119
|
|
3120
|
+
void OrphanCall() override {}
|
3062
3121
|
void CancelWithError(grpc_error_handle) override;
|
3063
3122
|
grpc_call_error StartBatch(const grpc_op* ops, size_t nops, void* notify_tag,
|
3064
3123
|
bool is_notify_tag_closure) override;
|
@@ -3212,11 +3271,10 @@ ServerPromiseBasedCall::ServerPromiseBasedCall(Arena* arena,
|
|
3212
3271
|
// collecting from when the call is created at the transport. The idea is that
|
3213
3272
|
// the transport would create the call tracer and pass it in as part of the
|
3214
3273
|
// metadata.
|
3215
|
-
|
3216
|
-
ServerCallTracerFactory::Get(args->server->channel_args());
|
3217
|
-
if (server_call_tracer_factory != nullptr) {
|
3274
|
+
if (args->server->server_call_tracer_factory() != nullptr) {
|
3218
3275
|
auto* server_call_tracer =
|
3219
|
-
server_call_tracer_factory->CreateNewServerCallTracer(
|
3276
|
+
args->server->server_call_tracer_factory()->CreateNewServerCallTracer(
|
3277
|
+
arena);
|
3220
3278
|
if (server_call_tracer != nullptr) {
|
3221
3279
|
// Note that we are setting both
|
3222
3280
|
// GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE and
|
@@ -3484,7 +3542,7 @@ ServerCallContext::MakeTopOfServerCallPromise(
|
|
3484
3542
|
call_->set_send_deadline(call_->deadline());
|
3485
3543
|
call_->ProcessIncomingInitialMetadata(*call_->client_initial_metadata_);
|
3486
3544
|
PublishMetadataArray(call_->client_initial_metadata_.get(),
|
3487
|
-
publish_initial_metadata);
|
3545
|
+
publish_initial_metadata, false);
|
3488
3546
|
call_->ExternalRef();
|
3489
3547
|
publish(call_->c_ptr());
|
3490
3548
|
return Seq(call_->server_to_client_messages_->AwaitClosed(),
|
data/src/core/lib/surface/call.h
CHANGED
@@ -38,6 +38,7 @@
|
|
38
38
|
#include "src/core/lib/channel/channel_stack.h"
|
39
39
|
#include "src/core/lib/channel/context.h"
|
40
40
|
#include "src/core/lib/debug/trace.h"
|
41
|
+
#include "src/core/lib/gpr/time_precise.h"
|
41
42
|
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
42
43
|
#include "src/core/lib/gprpp/time.h"
|
43
44
|
#include "src/core/lib/iomgr/closure.h"
|
@@ -72,6 +73,7 @@ typedef struct grpc_call_create_args {
|
|
72
73
|
absl::optional<grpc_core::Slice> authority;
|
73
74
|
|
74
75
|
grpc_core::Timestamp send_deadline;
|
76
|
+
bool registered_method; // client_only
|
75
77
|
} grpc_call_create_args;
|
76
78
|
|
77
79
|
namespace grpc_core {
|
@@ -126,6 +128,7 @@ class CallContext {
|
|
126
128
|
|
127
129
|
grpc_call_stats* call_stats() { return &call_stats_; }
|
128
130
|
gpr_atm* peer_string_atm_ptr();
|
131
|
+
gpr_cycle_counter call_start_time() { return start_time_; }
|
129
132
|
|
130
133
|
ServerCallContext* server_call_context();
|
131
134
|
|
@@ -139,6 +142,7 @@ class CallContext {
|
|
139
142
|
// TODO(ctiller): remove this once transport APIs are promise based and we
|
140
143
|
// don't need refcounting here.
|
141
144
|
PromiseBasedCall* const call_;
|
145
|
+
gpr_cycle_counter start_time_ = gpr_get_cycle_counter();
|
142
146
|
// Is this call traced?
|
143
147
|
bool traced_ = false;
|
144
148
|
};
|
@@ -284,7 +284,7 @@ static grpc_call* grpc_channel_create_call_internal(
|
|
284
284
|
grpc_channel* c_channel, grpc_call* parent_call, uint32_t propagation_mask,
|
285
285
|
grpc_completion_queue* cq, grpc_pollset_set* pollset_set_alternative,
|
286
286
|
grpc_core::Slice path, absl::optional<grpc_core::Slice> authority,
|
287
|
-
grpc_core::Timestamp deadline) {
|
287
|
+
grpc_core::Timestamp deadline, bool registered_method) {
|
288
288
|
auto channel = grpc_core::Channel::FromC(c_channel)->Ref();
|
289
289
|
GPR_ASSERT(channel->is_client());
|
290
290
|
GPR_ASSERT(!(cq != nullptr && pollset_set_alternative != nullptr));
|
@@ -300,6 +300,7 @@ static grpc_call* grpc_channel_create_call_internal(
|
|
300
300
|
args.path = std::move(path);
|
301
301
|
args.authority = std::move(authority);
|
302
302
|
args.send_deadline = deadline;
|
303
|
+
args.registered_method = registered_method;
|
303
304
|
|
304
305
|
grpc_call* call;
|
305
306
|
GRPC_LOG_IF_ERROR("call_create", grpc_call_create(&args, &call));
|
@@ -321,7 +322,8 @@ grpc_call* grpc_channel_create_call(grpc_channel* channel,
|
|
321
322
|
host != nullptr
|
322
323
|
? absl::optional<grpc_core::Slice>(grpc_core::CSliceRef(*host))
|
323
324
|
: absl::nullopt,
|
324
|
-
grpc_core::Timestamp::FromTimespecRoundUp(deadline)
|
325
|
+
grpc_core::Timestamp::FromTimespecRoundUp(deadline),
|
326
|
+
/*registered_method=*/false);
|
325
327
|
|
326
328
|
return call;
|
327
329
|
}
|
@@ -337,7 +339,7 @@ grpc_call* grpc_channel_create_pollset_set_call(
|
|
337
339
|
host != nullptr
|
338
340
|
? absl::optional<grpc_core::Slice>(grpc_core::CSliceRef(*host))
|
339
341
|
: absl::nullopt,
|
340
|
-
deadline);
|
342
|
+
deadline, /*registered_method=*/true);
|
341
343
|
}
|
342
344
|
|
343
345
|
namespace grpc_core {
|
@@ -415,7 +417,8 @@ grpc_call* grpc_channel_create_registered_call(
|
|
415
417
|
rc->authority.has_value()
|
416
418
|
? absl::optional<grpc_core::Slice>(rc->authority->Ref())
|
417
419
|
: absl::nullopt,
|
418
|
-
grpc_core::Timestamp::FromTimespecRoundUp(deadline)
|
420
|
+
grpc_core::Timestamp::FromTimespecRoundUp(deadline),
|
421
|
+
/*registered_method=*/true);
|
419
422
|
|
420
423
|
return call;
|
421
424
|
}
|
@@ -21,10 +21,11 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
-
#include <functional>
|
25
24
|
#include <utility>
|
26
25
|
#include <vector>
|
27
26
|
|
27
|
+
#include "absl/functional/any_invocable.h"
|
28
|
+
|
28
29
|
#include "src/core/lib/channel/channel_stack_builder.h"
|
29
30
|
#include "src/core/lib/surface/channel_stack_type.h"
|
30
31
|
|
@@ -41,7 +42,7 @@ class ChannelInit {
|
|
41
42
|
public:
|
42
43
|
/// One stage of mutation: call functions against \a builder to influence the
|
43
44
|
/// finally constructed channel stack
|
44
|
-
using Stage =
|
45
|
+
using Stage = absl::AnyInvocable<bool(ChannelStackBuilder* builder) const>;
|
45
46
|
|
46
47
|
class Builder {
|
47
48
|
public:
|