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
@@ -50,7 +50,6 @@
|
|
50
50
|
|
51
51
|
#include <grpc/support/port_platform.h>
|
52
52
|
|
53
|
-
#include <stddef.h>
|
54
53
|
#include "src/core/lib/experiments/config.h"
|
55
54
|
|
56
55
|
namespace grpc_core {
|
@@ -69,19 +68,28 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
69
68
|
inline bool IsPromiseBasedClientCallEnabled() { return false; }
|
70
69
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
71
70
|
inline bool IsPromiseBasedServerCallEnabled() { return false; }
|
72
|
-
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
|
73
71
|
inline bool IsEventEngineListenerEnabled() { return false; }
|
74
72
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
75
73
|
inline bool IsTraceRecordCallopsEnabled() { return false; }
|
76
74
|
inline bool IsEventEngineDnsEnabled() { return false; }
|
77
|
-
inline bool IsWorkStealingEnabled() { return false; }
|
78
75
|
inline bool IsClientPrivacyEnabled() { return false; }
|
79
76
|
inline bool IsCanaryClientPrivacyEnabled() { return false; }
|
80
77
|
inline bool IsServerPrivacyEnabled() { return false; }
|
81
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUE_METADATA_STRINGS
|
82
|
-
inline bool IsUniqueMetadataStringsEnabled() { return true; }
|
83
78
|
inline bool IsKeepaliveFixEnabled() { return false; }
|
84
79
|
inline bool IsKeepaliveServerFixEnabled() { return false; }
|
80
|
+
inline bool IsWorkSerializerDispatchEnabled() { return false; }
|
81
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
|
82
|
+
inline bool IsLazierStreamUpdatesEnabled() { return true; }
|
83
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_JITTER_MAX_IDLE
|
84
|
+
inline bool IsJitterMaxIdleEnabled() { return true; }
|
85
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST
|
86
|
+
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
|
87
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WRR_DELEGATE_TO_PICK_FIRST
|
88
|
+
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
|
89
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
|
90
|
+
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
|
91
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT
|
92
|
+
inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; }
|
85
93
|
|
86
94
|
#elif defined(GPR_WINDOWS)
|
87
95
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
@@ -95,19 +103,28 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
95
103
|
inline bool IsPromiseBasedClientCallEnabled() { return false; }
|
96
104
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
97
105
|
inline bool IsPromiseBasedServerCallEnabled() { return false; }
|
98
|
-
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
|
99
106
|
inline bool IsEventEngineListenerEnabled() { return false; }
|
100
107
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
101
108
|
inline bool IsTraceRecordCallopsEnabled() { return false; }
|
102
109
|
inline bool IsEventEngineDnsEnabled() { return false; }
|
103
|
-
inline bool IsWorkStealingEnabled() { return false; }
|
104
110
|
inline bool IsClientPrivacyEnabled() { return false; }
|
105
111
|
inline bool IsCanaryClientPrivacyEnabled() { return false; }
|
106
112
|
inline bool IsServerPrivacyEnabled() { return false; }
|
107
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUE_METADATA_STRINGS
|
108
|
-
inline bool IsUniqueMetadataStringsEnabled() { return true; }
|
109
113
|
inline bool IsKeepaliveFixEnabled() { return false; }
|
110
114
|
inline bool IsKeepaliveServerFixEnabled() { return false; }
|
115
|
+
inline bool IsWorkSerializerDispatchEnabled() { return false; }
|
116
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
|
117
|
+
inline bool IsLazierStreamUpdatesEnabled() { return true; }
|
118
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_JITTER_MAX_IDLE
|
119
|
+
inline bool IsJitterMaxIdleEnabled() { return true; }
|
120
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST
|
121
|
+
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
|
122
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WRR_DELEGATE_TO_PICK_FIRST
|
123
|
+
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
|
124
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
|
125
|
+
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
|
126
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT
|
127
|
+
inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; }
|
111
128
|
|
112
129
|
#else
|
113
130
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
@@ -121,68 +138,165 @@ inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
121
138
|
inline bool IsPromiseBasedClientCallEnabled() { return false; }
|
122
139
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
123
140
|
inline bool IsPromiseBasedServerCallEnabled() { return false; }
|
124
|
-
inline bool IsTransportSuppliesClientLatencyEnabled() { return false; }
|
125
141
|
inline bool IsEventEngineListenerEnabled() { return false; }
|
126
142
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
127
143
|
inline bool IsTraceRecordCallopsEnabled() { return false; }
|
128
144
|
inline bool IsEventEngineDnsEnabled() { return false; }
|
129
|
-
inline bool IsWorkStealingEnabled() { return false; }
|
130
145
|
inline bool IsClientPrivacyEnabled() { return false; }
|
131
146
|
inline bool IsCanaryClientPrivacyEnabled() { return false; }
|
132
147
|
inline bool IsServerPrivacyEnabled() { return false; }
|
133
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_UNIQUE_METADATA_STRINGS
|
134
|
-
inline bool IsUniqueMetadataStringsEnabled() { return true; }
|
135
148
|
inline bool IsKeepaliveFixEnabled() { return false; }
|
136
149
|
inline bool IsKeepaliveServerFixEnabled() { return false; }
|
150
|
+
inline bool IsWorkSerializerDispatchEnabled() { return false; }
|
151
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
|
152
|
+
inline bool IsLazierStreamUpdatesEnabled() { return true; }
|
153
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_JITTER_MAX_IDLE
|
154
|
+
inline bool IsJitterMaxIdleEnabled() { return true; }
|
155
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST
|
156
|
+
inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; }
|
157
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WRR_DELEGATE_TO_PICK_FIRST
|
158
|
+
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
|
159
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
|
160
|
+
inline bool IsCombinerOffloadToEventEngineEnabled() { return true; }
|
161
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT
|
162
|
+
inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; }
|
137
163
|
#endif
|
138
164
|
|
139
165
|
#else
|
166
|
+
enum ExperimentIds {
|
167
|
+
kExperimentIdTcpFrameSizeTuning,
|
168
|
+
kExperimentIdTcpRcvLowat,
|
169
|
+
kExperimentIdPeerStateBasedFraming,
|
170
|
+
kExperimentIdMemoryPressureController,
|
171
|
+
kExperimentIdUnconstrainedMaxQuotaBufferSize,
|
172
|
+
kExperimentIdEventEngineClient,
|
173
|
+
kExperimentIdMonitoringExperiment,
|
174
|
+
kExperimentIdPromiseBasedClientCall,
|
175
|
+
kExperimentIdFreeLargeAllocator,
|
176
|
+
kExperimentIdPromiseBasedServerCall,
|
177
|
+
kExperimentIdEventEngineListener,
|
178
|
+
kExperimentIdScheduleCancellationOverWrite,
|
179
|
+
kExperimentIdTraceRecordCallops,
|
180
|
+
kExperimentIdEventEngineDns,
|
181
|
+
kExperimentIdClientPrivacy,
|
182
|
+
kExperimentIdCanaryClientPrivacy,
|
183
|
+
kExperimentIdServerPrivacy,
|
184
|
+
kExperimentIdKeepaliveFix,
|
185
|
+
kExperimentIdKeepaliveServerFix,
|
186
|
+
kExperimentIdWorkSerializerDispatch,
|
187
|
+
kExperimentIdLazierStreamUpdates,
|
188
|
+
kExperimentIdJitterMaxIdle,
|
189
|
+
kExperimentIdRoundRobinDelegateToPickFirst,
|
190
|
+
kExperimentIdWrrDelegateToPickFirst,
|
191
|
+
kExperimentIdCombinerOffloadToEventEngine,
|
192
|
+
kExperimentIdRegisteredMethodLookupInTransport,
|
193
|
+
kNumExperiments
|
194
|
+
};
|
140
195
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING
|
141
|
-
inline bool IsTcpFrameSizeTuningEnabled() {
|
196
|
+
inline bool IsTcpFrameSizeTuningEnabled() {
|
197
|
+
return IsExperimentEnabled(kExperimentIdTcpFrameSizeTuning);
|
198
|
+
}
|
142
199
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TCP_RCV_LOWAT
|
143
|
-
inline bool IsTcpRcvLowatEnabled() {
|
200
|
+
inline bool IsTcpRcvLowatEnabled() {
|
201
|
+
return IsExperimentEnabled(kExperimentIdTcpRcvLowat);
|
202
|
+
}
|
144
203
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PEER_STATE_BASED_FRAMING
|
145
|
-
inline bool IsPeerStateBasedFramingEnabled() {
|
204
|
+
inline bool IsPeerStateBasedFramingEnabled() {
|
205
|
+
return IsExperimentEnabled(kExperimentIdPeerStateBasedFraming);
|
206
|
+
}
|
146
207
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MEMORY_PRESSURE_CONTROLLER
|
147
|
-
inline bool IsMemoryPressureControllerEnabled() {
|
208
|
+
inline bool IsMemoryPressureControllerEnabled() {
|
209
|
+
return IsExperimentEnabled(kExperimentIdMemoryPressureController);
|
210
|
+
}
|
148
211
|
#define GRPC_EXPERIMENT_IS_INCLUDED_UNCONSTRAINED_MAX_QUOTA_BUFFER_SIZE
|
149
|
-
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() {
|
212
|
+
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() {
|
213
|
+
return IsExperimentEnabled(kExperimentIdUnconstrainedMaxQuotaBufferSize);
|
214
|
+
}
|
150
215
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
151
|
-
inline bool IsEventEngineClientEnabled() {
|
216
|
+
inline bool IsEventEngineClientEnabled() {
|
217
|
+
return IsExperimentEnabled(kExperimentIdEventEngineClient);
|
218
|
+
}
|
152
219
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
|
153
|
-
inline bool IsMonitoringExperimentEnabled() {
|
220
|
+
inline bool IsMonitoringExperimentEnabled() {
|
221
|
+
return IsExperimentEnabled(kExperimentIdMonitoringExperiment);
|
222
|
+
}
|
154
223
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_CLIENT_CALL
|
155
|
-
inline bool IsPromiseBasedClientCallEnabled() {
|
224
|
+
inline bool IsPromiseBasedClientCallEnabled() {
|
225
|
+
return IsExperimentEnabled(kExperimentIdPromiseBasedClientCall);
|
226
|
+
}
|
156
227
|
#define GRPC_EXPERIMENT_IS_INCLUDED_FREE_LARGE_ALLOCATOR
|
157
|
-
inline bool IsFreeLargeAllocatorEnabled() {
|
228
|
+
inline bool IsFreeLargeAllocatorEnabled() {
|
229
|
+
return IsExperimentEnabled(kExperimentIdFreeLargeAllocator);
|
230
|
+
}
|
158
231
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_SERVER_CALL
|
159
|
-
inline bool IsPromiseBasedServerCallEnabled() {
|
160
|
-
|
161
|
-
|
232
|
+
inline bool IsPromiseBasedServerCallEnabled() {
|
233
|
+
return IsExperimentEnabled(kExperimentIdPromiseBasedServerCall);
|
234
|
+
}
|
162
235
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
|
163
|
-
inline bool IsEventEngineListenerEnabled() {
|
236
|
+
inline bool IsEventEngineListenerEnabled() {
|
237
|
+
return IsExperimentEnabled(kExperimentIdEventEngineListener);
|
238
|
+
}
|
164
239
|
#define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE
|
165
|
-
inline bool IsScheduleCancellationOverWriteEnabled() {
|
240
|
+
inline bool IsScheduleCancellationOverWriteEnabled() {
|
241
|
+
return IsExperimentEnabled(kExperimentIdScheduleCancellationOverWrite);
|
242
|
+
}
|
166
243
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS
|
167
|
-
inline bool IsTraceRecordCallopsEnabled() {
|
244
|
+
inline bool IsTraceRecordCallopsEnabled() {
|
245
|
+
return IsExperimentEnabled(kExperimentIdTraceRecordCallops);
|
246
|
+
}
|
168
247
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
|
169
|
-
inline bool IsEventEngineDnsEnabled() {
|
170
|
-
|
171
|
-
|
248
|
+
inline bool IsEventEngineDnsEnabled() {
|
249
|
+
return IsExperimentEnabled(kExperimentIdEventEngineDns);
|
250
|
+
}
|
172
251
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_PRIVACY
|
173
|
-
inline bool IsClientPrivacyEnabled() {
|
252
|
+
inline bool IsClientPrivacyEnabled() {
|
253
|
+
return IsExperimentEnabled(kExperimentIdClientPrivacy);
|
254
|
+
}
|
174
255
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY
|
175
|
-
inline bool IsCanaryClientPrivacyEnabled() {
|
256
|
+
inline bool IsCanaryClientPrivacyEnabled() {
|
257
|
+
return IsExperimentEnabled(kExperimentIdCanaryClientPrivacy);
|
258
|
+
}
|
176
259
|
#define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY
|
177
|
-
inline bool IsServerPrivacyEnabled() {
|
178
|
-
|
179
|
-
|
260
|
+
inline bool IsServerPrivacyEnabled() {
|
261
|
+
return IsExperimentEnabled(kExperimentIdServerPrivacy);
|
262
|
+
}
|
180
263
|
#define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_FIX
|
181
|
-
inline bool IsKeepaliveFixEnabled() {
|
264
|
+
inline bool IsKeepaliveFixEnabled() {
|
265
|
+
return IsExperimentEnabled(kExperimentIdKeepaliveFix);
|
266
|
+
}
|
182
267
|
#define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_SERVER_FIX
|
183
|
-
inline bool IsKeepaliveServerFixEnabled() {
|
268
|
+
inline bool IsKeepaliveServerFixEnabled() {
|
269
|
+
return IsExperimentEnabled(kExperimentIdKeepaliveServerFix);
|
270
|
+
}
|
271
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH
|
272
|
+
inline bool IsWorkSerializerDispatchEnabled() {
|
273
|
+
return IsExperimentEnabled(kExperimentIdWorkSerializerDispatch);
|
274
|
+
}
|
275
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_LAZIER_STREAM_UPDATES
|
276
|
+
inline bool IsLazierStreamUpdatesEnabled() {
|
277
|
+
return IsExperimentEnabled(kExperimentIdLazierStreamUpdates);
|
278
|
+
}
|
279
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_JITTER_MAX_IDLE
|
280
|
+
inline bool IsJitterMaxIdleEnabled() {
|
281
|
+
return IsExperimentEnabled(kExperimentIdJitterMaxIdle);
|
282
|
+
}
|
283
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST
|
284
|
+
inline bool IsRoundRobinDelegateToPickFirstEnabled() {
|
285
|
+
return IsExperimentEnabled(kExperimentIdRoundRobinDelegateToPickFirst);
|
286
|
+
}
|
287
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WRR_DELEGATE_TO_PICK_FIRST
|
288
|
+
inline bool IsWrrDelegateToPickFirstEnabled() {
|
289
|
+
return IsExperimentEnabled(kExperimentIdWrrDelegateToPickFirst);
|
290
|
+
}
|
291
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_COMBINER_OFFLOAD_TO_EVENT_ENGINE
|
292
|
+
inline bool IsCombinerOffloadToEventEngineEnabled() {
|
293
|
+
return IsExperimentEnabled(kExperimentIdCombinerOffloadToEventEngine);
|
294
|
+
}
|
295
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT
|
296
|
+
inline bool IsRegisteredMethodLookupInTransportEnabled() {
|
297
|
+
return IsExperimentEnabled(kExperimentIdRegisteredMethodLookupInTransport);
|
298
|
+
}
|
184
299
|
|
185
|
-
constexpr const size_t kNumExperiments = 22;
|
186
300
|
extern const ExperimentMetadata g_experiment_metadata[kNumExperiments];
|
187
301
|
|
188
302
|
#endif
|
data/src/core/lib/gprpp/fork.h
CHANGED
@@ -25,7 +25,6 @@
|
|
25
25
|
|
26
26
|
#include <stddef.h>
|
27
27
|
|
28
|
-
#include <type_traits>
|
29
28
|
#include <utility>
|
30
29
|
|
31
30
|
#include "src/core/lib/gprpp/construct_destruct.h"
|
@@ -139,7 +138,7 @@ class ManualConstructor {
|
|
139
138
|
void Destroy() { Destruct(get()); }
|
140
139
|
|
141
140
|
private:
|
142
|
-
|
141
|
+
alignas(Type) char space_[sizeof(Type)];
|
143
142
|
};
|
144
143
|
|
145
144
|
} // namespace grpc_core
|
@@ -68,7 +68,7 @@ class NoDestruct {
|
|
68
68
|
const T* get() const { return reinterpret_cast<const T*>(&space_); }
|
69
69
|
|
70
70
|
private:
|
71
|
-
|
71
|
+
alignas(T) char space_[sizeof(T)];
|
72
72
|
};
|
73
73
|
|
74
74
|
// Helper for when a program desires a single *process wide* instance of a
|
@@ -17,12 +17,18 @@
|
|
17
17
|
|
18
18
|
#include <grpc/support/port_platform.h>
|
19
19
|
|
20
|
+
#include <stdint.h>
|
21
|
+
|
20
22
|
#include <algorithm>
|
21
23
|
#include <cstddef>
|
22
24
|
#include <limits>
|
23
25
|
#include <memory>
|
24
26
|
|
25
|
-
#include
|
27
|
+
#include <grpc/support/cpu.h>
|
28
|
+
|
29
|
+
// Sharded collections of objects
|
30
|
+
// This used to be per-cpu, now it's much less so - but still a way to limit
|
31
|
+
// contention.
|
26
32
|
|
27
33
|
namespace grpc_core {
|
28
34
|
|
@@ -51,23 +57,46 @@ class PerCpuOptions {
|
|
51
57
|
size_t max_shards_ = std::numeric_limits<size_t>::max();
|
52
58
|
};
|
53
59
|
|
60
|
+
class PerCpuShardingHelper {
|
61
|
+
public:
|
62
|
+
size_t GetShardingBits() {
|
63
|
+
// We periodically refresh the last seen cpu to try to ensure that we spread
|
64
|
+
// load evenly over all shards of a per-cpu data structure, even in the
|
65
|
+
// event of shifting thread distributions, load patterns.
|
66
|
+
// Ideally we'd just call gpr_cpu_current_cpu() every call of this function
|
67
|
+
// to get perfect distribution, but that function is currently quite slow on
|
68
|
+
// some platforms and so we need to cache it somewhat.
|
69
|
+
if (GPR_UNLIKELY(state_.uses_until_refresh == 0)) state_ = State();
|
70
|
+
--state_.uses_until_refresh;
|
71
|
+
return state_.last_seen_cpu;
|
72
|
+
}
|
73
|
+
|
74
|
+
private:
|
75
|
+
struct State {
|
76
|
+
uint16_t last_seen_cpu = gpr_cpu_current_cpu();
|
77
|
+
uint16_t uses_until_refresh = 65535;
|
78
|
+
};
|
79
|
+
static thread_local State state_;
|
80
|
+
};
|
81
|
+
|
54
82
|
template <typename T>
|
55
83
|
class PerCpu {
|
56
84
|
public:
|
57
85
|
// Options are not defaulted to try and force consideration of what the
|
58
86
|
// options specify.
|
59
|
-
explicit PerCpu(PerCpuOptions options) :
|
87
|
+
explicit PerCpu(PerCpuOptions options) : shards_(options.Shards()) {}
|
60
88
|
|
61
|
-
T& this_cpu() { return data_[
|
89
|
+
T& this_cpu() { return data_[sharding_helper_.GetShardingBits() % shards_]; }
|
62
90
|
|
63
91
|
T* begin() { return data_.get(); }
|
64
|
-
T* end() { return data_.get() +
|
92
|
+
T* end() { return data_.get() + shards_; }
|
65
93
|
const T* begin() const { return data_.get(); }
|
66
|
-
const T* end() const { return data_.get() +
|
94
|
+
const T* end() const { return data_.get() + shards_; }
|
67
95
|
|
68
96
|
private:
|
69
|
-
|
70
|
-
|
97
|
+
PerCpuShardingHelper sharding_helper_;
|
98
|
+
const size_t shards_;
|
99
|
+
std::unique_ptr<T[]> data_{new T[shards_]};
|
71
100
|
};
|
72
101
|
|
73
102
|
} // namespace grpc_core
|
@@ -21,10 +21,14 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
+
#include <stddef.h>
|
25
|
+
|
24
26
|
#include <iosfwd>
|
25
27
|
#include <type_traits>
|
26
28
|
#include <utility>
|
27
29
|
|
30
|
+
#include "absl/hash/hash.h"
|
31
|
+
|
28
32
|
#include "src/core/lib/gprpp/debug_location.h"
|
29
33
|
|
30
34
|
namespace grpc_core {
|
@@ -333,6 +337,65 @@ bool operator<(const WeakRefCountedPtr<T>& p1, const WeakRefCountedPtr<T>& p2) {
|
|
333
337
|
return p1.get() < p2.get();
|
334
338
|
}
|
335
339
|
|
340
|
+
//
|
341
|
+
// absl::Hash integration
|
342
|
+
//
|
343
|
+
|
344
|
+
template <typename H, typename T>
|
345
|
+
H AbslHashValue(H h, const RefCountedPtr<T>& p) {
|
346
|
+
return H::combine(std::move(h), p.get());
|
347
|
+
}
|
348
|
+
|
349
|
+
template <typename H, typename T>
|
350
|
+
H AbslHashValue(H h, const WeakRefCountedPtr<T>& p) {
|
351
|
+
return H::combine(std::move(h), p.get());
|
352
|
+
}
|
353
|
+
|
354
|
+
// Heterogenous lookup support.
|
355
|
+
template <typename T>
|
356
|
+
struct RefCountedPtrHash {
|
357
|
+
using is_transparent = void;
|
358
|
+
size_t operator()(const RefCountedPtr<T>& p) const {
|
359
|
+
return absl::Hash<RefCountedPtr<T>>{}(p);
|
360
|
+
}
|
361
|
+
size_t operator()(const WeakRefCountedPtr<T>& p) const {
|
362
|
+
return absl::Hash<WeakRefCountedPtr<T>>{}(p);
|
363
|
+
}
|
364
|
+
size_t operator()(T* p) const { return absl::Hash<T*>{}(p); }
|
365
|
+
};
|
366
|
+
template <typename T>
|
367
|
+
struct RefCountedPtrEq {
|
368
|
+
using is_transparent = void;
|
369
|
+
bool operator()(const RefCountedPtr<T>& p1,
|
370
|
+
const RefCountedPtr<T>& p2) const {
|
371
|
+
return p1 == p2;
|
372
|
+
}
|
373
|
+
bool operator()(const WeakRefCountedPtr<T>& p1,
|
374
|
+
const WeakRefCountedPtr<T>& p2) const {
|
375
|
+
return p1 == p2;
|
376
|
+
}
|
377
|
+
bool operator()(const RefCountedPtr<T>& p1,
|
378
|
+
const WeakRefCountedPtr<T>& p2) const {
|
379
|
+
return p1 == p2.get();
|
380
|
+
}
|
381
|
+
bool operator()(const WeakRefCountedPtr<T>& p1,
|
382
|
+
const RefCountedPtr<T>& p2) const {
|
383
|
+
return p1 == p2.get();
|
384
|
+
}
|
385
|
+
bool operator()(const RefCountedPtr<T>& p1, const T* p2) const {
|
386
|
+
return p1 == p2;
|
387
|
+
}
|
388
|
+
bool operator()(const WeakRefCountedPtr<T>& p1, const T* p2) const {
|
389
|
+
return p1 == p2;
|
390
|
+
}
|
391
|
+
bool operator()(const T* p1, const RefCountedPtr<T>& p2) const {
|
392
|
+
return p2 == p1;
|
393
|
+
}
|
394
|
+
bool operator()(const T* p1, const WeakRefCountedPtr<T>& p2) const {
|
395
|
+
return p2 == p1;
|
396
|
+
}
|
397
|
+
};
|
398
|
+
|
336
399
|
} // namespace grpc_core
|
337
400
|
|
338
401
|
#endif // GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H
|