grpc 1.75.0.pre1 → 1.76.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +18 -5
- data/include/grpc/credentials.h +21 -5
- data/src/core/call/call_filters.cc +4 -4
- data/src/core/call/call_filters.h +36 -36
- data/src/core/call/call_spine.h +27 -27
- data/src/core/call/client_call.cc +6 -5
- data/src/core/call/filter_fusion.h +5 -5
- data/src/core/call/metadata_batch.h +3 -3
- data/src/core/call/security_context.cc +1 -1
- data/src/core/call/server_call.cc +4 -4
- data/src/core/call/server_call.h +1 -1
- data/src/core/channelz/channelz.cc +12 -18
- data/src/core/channelz/channelz.h +32 -16
- data/src/core/channelz/channelz_registry.h +11 -0
- data/src/core/channelz/property_list.cc +18 -0
- data/src/core/channelz/property_list.h +10 -1
- data/src/core/channelz/text_encode.cc +66 -0
- data/src/core/channelz/text_encode.h +29 -0
- data/src/core/channelz/v2tov1/convert.cc +11 -0
- data/src/core/channelz/v2tov1/legacy_api.cc +15 -8
- data/src/core/channelz/ztrace_collector.h +247 -86
- data/src/core/client_channel/backup_poller.cc +5 -6
- data/src/core/client_channel/client_channel.cc +20 -13
- data/src/core/client_channel/client_channel_filter.cc +53 -45
- data/src/core/client_channel/client_channel_filter.h +2 -2
- data/src/core/client_channel/client_channel_internal.h +3 -4
- data/src/core/client_channel/config_selector.h +3 -3
- data/src/core/client_channel/dynamic_filters.cc +3 -3
- data/src/core/client_channel/global_subchannel_pool.cc +0 -37
- data/src/core/client_channel/global_subchannel_pool.h +0 -27
- data/src/core/client_channel/load_balanced_call_destination.cc +7 -7
- data/src/core/client_channel/local_subchannel_pool.cc +4 -4
- data/src/core/client_channel/retry_filter.h +3 -3
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -5
- data/src/core/client_channel/subchannel.cc +8 -8
- data/src/core/client_channel/subchannel_stream_client.cc +4 -4
- data/src/core/config/config_vars.cc +30 -1
- data/src/core/config/config_vars.h +21 -0
- data/src/core/config/core_configuration.cc +5 -5
- data/src/core/config/core_configuration.h +7 -7
- data/src/core/config/load_config.cc +12 -0
- data/src/core/config/load_config.h +2 -0
- data/src/core/credentials/call/call_credentials.h +2 -2
- data/src/core/credentials/call/call_creds_util.cc +4 -3
- data/src/core/credentials/call/composite/composite_call_credentials.cc +4 -4
- data/src/core/credentials/call/external/aws_external_account_credentials.cc +3 -3
- data/src/core/credentials/call/external/external_account_credentials.cc +1 -1
- data/src/core/credentials/call/external/url_external_account_credentials.cc +1 -1
- data/src/core/credentials/call/iam/iam_credentials.cc +4 -4
- data/src/core/credentials/call/jwt/json_token.cc +3 -3
- data/src/core/credentials/call/jwt/jwt_credentials.cc +2 -2
- data/src/core/credentials/call/jwt/jwt_verifier.cc +14 -13
- data/src/core/credentials/call/oauth2/oauth2_credentials.cc +20 -12
- data/src/core/credentials/call/plugin/plugin_credentials.cc +2 -2
- data/src/core/credentials/transport/alts/alts_credentials.cc +4 -4
- data/src/core/credentials/transport/alts/alts_security_connector.cc +14 -12
- data/src/core/credentials/transport/alts/grpc_alts_credentials_client_options.cc +22 -2
- data/src/core/credentials/transport/alts/grpc_alts_credentials_options.cc +10 -1
- data/src/core/credentials/transport/alts/grpc_alts_credentials_options.h +31 -0
- data/src/core/credentials/transport/alts/grpc_alts_credentials_server_options.cc +8 -3
- data/src/core/credentials/transport/composite/composite_channel_credentials.cc +5 -5
- data/src/core/credentials/transport/fake/fake_security_connector.cc +2 -2
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +78 -28
- data/src/core/credentials/transport/insecure/insecure_security_connector.cc +3 -3
- data/src/core/credentials/transport/local/local_security_connector.cc +8 -8
- data/src/core/credentials/transport/security_connector.cc +5 -5
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +12 -12
- data/src/core/credentials/transport/ssl/ssl_credentials.h +2 -2
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +3 -3
- data/src/core/credentials/transport/tls/certificate_provider_registry.cc +2 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +24 -24
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +5 -5
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +2 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_verifier.cc +2 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_verifier.h +2 -2
- data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +17 -17
- data/src/core/credentials/transport/tls/ssl_utils.cc +14 -9
- data/src/core/credentials/transport/tls/tls_credentials.cc +2 -2
- data/src/core/credentials/transport/tls/tls_security_connector.cc +11 -11
- data/src/core/credentials/transport/transport_credentials.cc +2 -2
- data/src/core/credentials/transport/transport_credentials.h +2 -2
- data/src/core/credentials/transport/xds/xds_credentials.cc +5 -5
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +2 -0
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +1 -1
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +8 -8
- data/src/core/ext/filters/http/message_compress/compression_filter.h +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +7 -7
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +2 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +10 -9
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +10 -7
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +6 -6
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +96 -88
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +3 -3
- data/src/core/ext/transport/chttp2/transport/flow_control.h +12 -7
- data/src/core/ext/transport/chttp2/transport/flow_control_manager.h +60 -0
- data/src/core/ext/transport/chttp2/transport/frame.cc +32 -10
- data/src/core/ext/transport/chttp2/transport/frame.h +16 -2
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +3 -3
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +28 -12
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +4 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +8 -8
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +27 -27
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +543 -366
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +198 -277
- data/src/core/ext/transport/chttp2/transport/http2_settings_manager.cc +3 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings_manager.h +11 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +179 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +51 -23
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +13 -6
- data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +115 -71
- data/src/core/ext/transport/chttp2/transport/internal.h +6 -14
- data/src/core/ext/transport/chttp2/transport/message_assembler.h +7 -7
- data/src/core/ext/transport/chttp2/transport/parsing.cc +17 -15
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +62 -26
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +58 -22
- data/src/core/ext/transport/chttp2/transport/stream.h +207 -0
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +328 -187
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +7 -7
- data/src/core/ext/transport/chttp2/transport/transport_common.cc +17 -1
- data/src/core/ext/transport/chttp2/transport/transport_common.h +52 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +2 -2
- data/src/core/ext/transport/chttp2/transport/writable_streams.h +181 -79
- data/src/core/ext/transport/chttp2/transport/write_size_policy.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/writing.cc +3 -3
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -1
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +3 -3
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb.h +740 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.c +218 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.h +46 -0
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb.h +87 -55
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +23 -21
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.h +47 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/service.upbdefs.c +129 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/service.upbdefs.h +72 -0
- data/src/core/filter/auth/server_auth_filter.cc +2 -2
- data/src/core/handshaker/handshaker.cc +3 -3
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +2 -2
- data/src/core/handshaker/security/legacy_secure_endpoint.cc +2 -2
- data/src/core/handshaker/security/pipelined_secure_endpoint.cc +31 -8
- data/src/core/handshaker/security/secure_endpoint.cc +16 -6
- data/src/core/handshaker/security/security_handshaker.cc +3 -3
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +2 -2
- data/src/core/lib/channel/channel_stack.cc +8 -5
- data/src/core/lib/channel/channel_stack.h +3 -0
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -0
- data/src/core/lib/channel/connected_channel.cc +2 -2
- data/src/core/lib/channel/promise_based_filter.cc +69 -64
- data/src/core/lib/channel/promise_based_filter.h +16 -15
- data/src/core/lib/compression/compression_internal.cc +2 -2
- data/src/core/lib/compression/message_compress.cc +7 -7
- data/src/core/lib/event_engine/ares_resolver.cc +22 -20
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +2 -2
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +2 -2
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +2 -2
- data/src/core/lib/event_engine/extensions/channelz.h +2 -2
- data/src/core/lib/event_engine/extensions/supports_fd.h +5 -5
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +8 -8
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +10 -10
- data/src/core/lib/event_engine/posix_engine/lockfree_event.cc +2 -2
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +23 -22
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +11 -11
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +168 -170
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +33 -54
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +4 -3
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +5 -5
- data/src/core/lib/event_engine/posix_engine/posix_interface.h +1 -1
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +1 -1
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +3 -3
- data/src/core/lib/event_engine/resolved_address.cc +3 -3
- data/src/core/lib/event_engine/shim.cc +8 -11
- data/src/core/lib/event_engine/shim.h +2 -1
- data/src/core/lib/event_engine/slice.cc +2 -2
- data/src/core/lib/event_engine/tcp_socket_utils.cc +11 -11
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +7 -7
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +31 -31
- data/src/core/lib/event_engine/windows/iocp.cc +10 -10
- data/src/core/lib/event_engine/windows/win_socket.cc +6 -6
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +11 -11
- data/src/core/lib/event_engine/windows/windows_engine.cc +16 -14
- data/src/core/lib/event_engine/windows/windows_listener.cc +7 -7
- data/src/core/lib/experiments/experiments.cc +105 -18
- data/src/core/lib/experiments/experiments.h +43 -11
- data/src/core/lib/iomgr/call_combiner.cc +3 -3
- data/src/core/lib/iomgr/endpoint_cfstream.cc +6 -6
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +5 -5
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +15 -14
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +15 -15
- data/src/core/lib/iomgr/ev_poll_posix.cc +11 -11
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +5 -4
- data/src/core/lib/iomgr/event_engine_shims/endpoint.h +1 -1
- data/src/core/lib/iomgr/iocp_windows.cc +8 -8
- data/src/core/lib/iomgr/iomgr_windows.cc +3 -3
- data/src/core/lib/iomgr/lockfree_event.cc +2 -2
- data/src/core/lib/iomgr/polling_entity.cc +3 -3
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +2 -2
- data/src/core/lib/iomgr/socket_windows.cc +4 -4
- data/src/core/lib/iomgr/tcp_client_posix.cc +4 -4
- data/src/core/lib/iomgr/tcp_client_windows.cc +4 -4
- data/src/core/lib/iomgr/tcp_posix.cc +42 -42
- data/src/core/lib/iomgr/tcp_server.cc +5 -0
- data/src/core/lib/iomgr/tcp_server.h +7 -0
- data/src/core/lib/iomgr/tcp_server_posix.cc +47 -27
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +3 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +5 -5
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +2 -2
- data/src/core/lib/iomgr/tcp_server_windows.cc +68 -29
- data/src/core/lib/iomgr/tcp_windows.cc +7 -7
- data/src/core/lib/iomgr/timer_generic.cc +2 -2
- data/src/core/lib/iomgr/timer_manager.cc +2 -2
- data/src/core/lib/iomgr/unix_sockets_posix.cc +2 -2
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +2 -2
- data/src/core/lib/promise/activity.cc +2 -2
- data/src/core/lib/promise/activity.h +6 -6
- data/src/core/lib/promise/context.h +2 -2
- data/src/core/lib/promise/detail/join_state.h +9 -9
- data/src/core/lib/promise/detail/seq_state.h +13 -13
- data/src/core/lib/promise/detail/status.h +2 -2
- data/src/core/lib/promise/for_each.h +5 -5
- data/src/core/lib/promise/interceptor_list.h +2 -2
- data/src/core/lib/promise/latch.h +7 -7
- data/src/core/lib/promise/mpsc.cc +26 -26
- data/src/core/lib/promise/mpsc.h +2 -2
- data/src/core/lib/promise/observable.h +4 -4
- data/src/core/lib/promise/party.cc +32 -25
- data/src/core/lib/promise/party.h +16 -19
- data/src/core/lib/promise/pipe.h +15 -15
- data/src/core/lib/promise/poll.h +5 -4
- data/src/core/lib/promise/promise.h +0 -2
- data/src/core/lib/promise/sleep.cc +3 -1
- data/src/core/lib/promise/status_flag.h +7 -7
- data/src/core/lib/promise/try_join.h +2 -2
- data/src/core/lib/promise/try_seq.h +2 -2
- data/src/core/lib/resource_quota/arena.h +15 -2
- data/src/core/lib/resource_quota/connection_quota.cc +9 -7
- data/src/core/lib/resource_quota/memory_quota.cc +45 -24
- data/src/core/lib/resource_quota/memory_quota.h +48 -16
- data/src/core/lib/resource_quota/telemetry.h +54 -0
- data/src/core/lib/resource_quota/thread_quota.cc +2 -2
- data/src/core/lib/resource_tracker/resource_tracker.cc +33 -0
- data/src/core/lib/resource_tracker/resource_tracker.h +46 -0
- data/src/core/lib/security/authorization/audit_logging.cc +5 -5
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +2 -2
- data/src/core/lib/security/authorization/stdout_logger.cc +3 -3
- data/src/core/lib/surface/byte_buffer_reader.cc +2 -2
- data/src/core/lib/surface/call.cc +16 -14
- data/src/core/lib/surface/call.h +1 -1
- data/src/core/lib/surface/call_utils.cc +2 -2
- data/src/core/lib/surface/call_utils.h +2 -2
- data/src/core/lib/surface/channel.cc +4 -4
- data/src/core/lib/surface/channel_create.cc +10 -6
- data/src/core/lib/surface/channel_init.cc +80 -23
- data/src/core/lib/surface/channel_init.h +26 -11
- data/src/core/lib/surface/completion_queue.cc +17 -16
- data/src/core/lib/surface/completion_queue_factory.cc +7 -7
- data/src/core/lib/surface/connection_context.h +45 -2
- data/src/core/lib/surface/filter_stack_call.cc +12 -23
- data/src/core/lib/surface/filter_stack_call.h +3 -4
- data/src/core/lib/surface/legacy_channel.cc +7 -7
- data/src/core/lib/surface/validate_metadata.h +2 -2
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.h +3 -3
- data/src/core/lib/transport/promise_endpoint.cc +3 -3
- data/src/core/lib/transport/promise_endpoint.h +8 -8
- data/src/core/lib/transport/timeout_encoding.cc +4 -4
- data/src/core/load_balancing/child_policy_handler.cc +4 -4
- data/src/core/load_balancing/endpoint_list.cc +2 -2
- data/src/core/load_balancing/grpclb/grpclb.cc +24 -24
- data/src/core/load_balancing/health_check_client.cc +4 -4
- data/src/core/load_balancing/health_check_client_internal.h +2 -2
- data/src/core/load_balancing/lb_policy_registry.cc +2 -2
- data/src/core/load_balancing/oob_backend_metric.cc +4 -4
- data/src/core/load_balancing/oob_backend_metric_internal.h +2 -2
- data/src/core/load_balancing/outlier_detection/outlier_detection.cc +2 -2
- data/src/core/load_balancing/pick_first/pick_first.cc +14 -14
- data/src/core/load_balancing/priority/priority.cc +23 -24
- data/src/core/load_balancing/ring_hash/ring_hash.cc +3 -3
- data/src/core/load_balancing/rls/rls.cc +13 -13
- data/src/core/load_balancing/round_robin/round_robin.cc +9 -9
- data/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc +3 -3
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +33 -26
- data/src/core/load_balancing/weighted_target/weighted_target.cc +5 -5
- data/src/core/load_balancing/xds/cds.cc +76 -32
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +3 -3
- data/src/core/load_balancing/xds/xds_override_host.cc +4 -4
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +2 -2
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +33 -33
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +10 -10
- data/src/core/resolver/dns/dns_resolver_plugin.cc +6 -3
- data/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +2 -2
- data/src/core/resolver/endpoint_addresses.cc +3 -3
- data/src/core/resolver/endpoint_addresses.h +3 -0
- data/src/core/resolver/fake/fake_resolver.cc +2 -2
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +41 -54
- data/src/core/resolver/polling_resolver.cc +3 -3
- data/src/core/resolver/resolver_registry.cc +5 -4
- data/src/core/resolver/xds/xds_dependency_manager.cc +5 -5
- data/src/core/resolver/xds/xds_resolver.cc +9 -9
- data/src/core/server/server.cc +38 -38
- data/src/core/server/server_call_tracer_filter.h +4 -4
- data/src/core/server/server_config_selector_filter.cc +2 -2
- data/src/core/server/xds_server_config_fetcher.cc +9 -8
- data/src/core/service_config/service_config_impl.h +2 -2
- data/src/core/telemetry/call_tracer.cc +39 -49
- data/src/core/telemetry/call_tracer.h +199 -22
- data/src/core/telemetry/histogram.h +205 -0
- data/src/core/telemetry/instrument.cc +719 -0
- data/src/core/telemetry/instrument.h +932 -0
- data/src/core/telemetry/metrics.cc +13 -5
- data/src/core/telemetry/metrics.h +3 -1
- data/src/core/telemetry/stats_data.cc +0 -19
- data/src/core/telemetry/stats_data.h +0 -19
- data/src/core/transport/auth_context.cc +2 -2
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +78 -45
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +1 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +39 -31
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +7 -7
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +3 -3
- data/src/core/tsi/fake_transport_security.cc +4 -4
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +4 -4
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +9 -9
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +3 -3
- data/src/core/tsi/ssl_transport_security.cc +26 -25
- data/src/core/tsi/ssl_transport_security_utils.cc +9 -9
- data/src/core/util/chunked_vector.h +4 -4
- data/src/core/util/event_log.cc +2 -2
- data/src/core/util/gcp_metadata_query.cc +2 -2
- data/src/core/util/grpc_check.cc +22 -0
- data/src/core/util/grpc_check.h +103 -0
- data/src/core/util/http_client/httpcli.cc +3 -3
- data/src/core/util/http_client/parser.cc +4 -4
- data/src/core/util/latent_see.h +7 -4
- data/src/core/util/lru_cache.h +4 -4
- data/src/core/util/memory_usage.h +16 -0
- data/src/core/util/posix/directory_reader.cc +3 -2
- data/src/core/util/posix/sync.cc +24 -24
- data/src/core/util/postmortem_emit.cc +52 -0
- data/src/core/util/postmortem_emit.h +30 -0
- data/src/core/util/ref_counted_ptr.h +5 -0
- data/src/core/util/trie_lookup.h +170 -0
- data/src/core/util/unique_ptr_with_bitset.h +5 -5
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +6 -1
- data/src/core/xds/grpc/xds_certificate_provider.cc +3 -3
- data/src/core/xds/grpc/xds_client_grpc.cc +34 -15
- data/src/core/xds/grpc/xds_client_grpc.h +4 -1
- data/src/core/xds/grpc/xds_cluster_parser.cc +2 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +2 -2
- data/src/core/xds/grpc/xds_endpoint_parser.cc +2 -2
- data/src/core/xds/grpc/xds_http_filter_registry.cc +4 -3
- data/src/core/xds/grpc/xds_listener_parser.cc +3 -3
- data/src/core/xds/grpc/xds_matcher.cc +277 -0
- data/src/core/xds/grpc/xds_matcher.h +432 -0
- data/src/core/xds/grpc/xds_matcher_action.cc +47 -0
- data/src/core/xds/grpc/xds_matcher_action.h +48 -0
- data/src/core/xds/grpc/xds_matcher_context.cc +29 -0
- data/src/core/xds/grpc/xds_matcher_context.h +46 -0
- data/src/core/xds/grpc/xds_matcher_input.cc +79 -0
- data/src/core/xds/grpc/xds_matcher_input.h +105 -0
- data/src/core/xds/grpc/xds_matcher_parse.cc +356 -0
- data/src/core/xds/grpc/xds_matcher_parse.h +39 -0
- data/src/core/xds/grpc/xds_metadata.cc +4 -3
- data/src/core/xds/grpc/xds_route_config_parser.cc +6 -6
- data/src/core/xds/grpc/xds_routing.cc +3 -3
- data/src/core/xds/grpc/xds_transport_grpc.cc +10 -10
- data/src/core/xds/xds_client/lrs_client.cc +6 -6
- data/src/core/xds/xds_client/xds_client.cc +9 -9
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +2 -2
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/abseil-cpp/absl/container/internal/node_slot_policy.h +95 -0
- data/third_party/abseil-cpp/absl/container/node_hash_map.h +687 -0
- metadata +37 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
#include <map>
|
20
20
|
#include <string>
|
21
21
|
|
22
|
+
#include "src/core/channelz/property_list.h"
|
22
23
|
#include "src/core/channelz/ztrace_collector.h"
|
23
24
|
#include "src/core/ext/transport/chttp2/transport/frame.h"
|
24
25
|
|
@@ -27,7 +28,7 @@ namespace http2_ztrace_collector_detail {
|
|
27
28
|
|
28
29
|
class Config {
|
29
30
|
public:
|
30
|
-
explicit Config(
|
31
|
+
explicit Config(const channelz::ZTrace::Args&) {}
|
31
32
|
|
32
33
|
template <typename T>
|
33
34
|
bool Finishes(const T&) {
|
@@ -43,12 +44,13 @@ struct H2DataTrace {
|
|
43
44
|
bool end_stream;
|
44
45
|
uint32_t payload_length;
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
channelz::PropertyList ChannelzProperties() const {
|
48
|
+
return channelz::PropertyList()
|
49
|
+
.Set("read", kRead)
|
50
|
+
.Set("frame_type", "DATA")
|
51
|
+
.Set("stream_id", stream_id)
|
52
|
+
.Set("end_stream", end_stream)
|
53
|
+
.Set("payload_length", payload_length);
|
52
54
|
}
|
53
55
|
};
|
54
56
|
|
@@ -60,14 +62,14 @@ struct H2HeaderTrace {
|
|
60
62
|
bool continuation;
|
61
63
|
uint32_t payload_length;
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
channelz::PropertyList ChannelzProperties() const {
|
66
|
+
return channelz::PropertyList()
|
67
|
+
.Set("read", kRead)
|
68
|
+
.Set("frame_type", continuation ? "CONTINUATION" : "HEADERS")
|
69
|
+
.Set("stream_id", stream_id)
|
70
|
+
.Set("end_headers", end_headers)
|
71
|
+
.Set("end_stream", end_stream)
|
72
|
+
.Set("payload_length", payload_length);
|
71
73
|
}
|
72
74
|
};
|
73
75
|
|
@@ -76,11 +78,12 @@ struct H2RstStreamTrace {
|
|
76
78
|
uint32_t stream_id;
|
77
79
|
uint32_t error_code;
|
78
80
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
channelz::PropertyList ChannelzProperties() const {
|
82
|
+
return channelz::PropertyList()
|
83
|
+
.Set("read", kRead)
|
84
|
+
.Set("frame_type", "RST_STREAM")
|
85
|
+
.Set("stream_id", stream_id)
|
86
|
+
.Set("error_code", error_code);
|
84
87
|
}
|
85
88
|
};
|
86
89
|
|
@@ -89,18 +92,20 @@ struct H2SettingsTrace {
|
|
89
92
|
bool ack;
|
90
93
|
std::vector<Http2SettingsFrame::Setting> settings;
|
91
94
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
95
|
+
channelz::PropertyList ChannelzProperties() const {
|
96
|
+
return channelz::PropertyList()
|
97
|
+
.Set("read", kRead)
|
98
|
+
.Set("frame_type", "SETTINGS")
|
99
|
+
.Set("ack", ack)
|
100
|
+
.Set("settings", [this]() {
|
101
|
+
channelz::PropertyTable table;
|
102
|
+
for (const auto& setting : settings) {
|
103
|
+
table.AppendRow(channelz::PropertyList()
|
104
|
+
.Set("id", setting.id)
|
105
|
+
.Set("value", setting.value));
|
106
|
+
}
|
107
|
+
return table;
|
108
|
+
}());
|
104
109
|
}
|
105
110
|
};
|
106
111
|
|
@@ -109,11 +114,12 @@ struct H2PingTrace {
|
|
109
114
|
bool ack;
|
110
115
|
uint64_t opaque;
|
111
116
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
+
channelz::PropertyList ChannelzProperties() const {
|
118
|
+
return channelz::PropertyList()
|
119
|
+
.Set("read", kRead)
|
120
|
+
.Set("frame_type", "PING")
|
121
|
+
.Set("ack", ack)
|
122
|
+
.Set("opaque", opaque);
|
117
123
|
}
|
118
124
|
};
|
119
125
|
|
@@ -123,12 +129,13 @@ struct H2GoAwayTrace {
|
|
123
129
|
uint32_t error_code;
|
124
130
|
std::string debug_data;
|
125
131
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
+
channelz::PropertyList ChannelzProperties() const {
|
133
|
+
return channelz::PropertyList()
|
134
|
+
.Set("read", kRead)
|
135
|
+
.Set("frame_type", "GOAWAY")
|
136
|
+
.Set("last_stream_id", last_stream_id)
|
137
|
+
.Set("error_code", error_code)
|
138
|
+
.Set("debug_data", debug_data);
|
132
139
|
}
|
133
140
|
};
|
134
141
|
|
@@ -137,11 +144,12 @@ struct H2WindowUpdateTrace {
|
|
137
144
|
uint32_t stream_id;
|
138
145
|
uint32_t window_size_increment;
|
139
146
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
147
|
+
channelz::PropertyList ChannelzProperties() const {
|
148
|
+
return channelz::PropertyList()
|
149
|
+
.Set("read", kRead)
|
150
|
+
.Set("frame_type", "WINDOW_UPDATE")
|
151
|
+
.Set("stream_id", stream_id)
|
152
|
+
.Set("window_size_increment", window_size_increment);
|
145
153
|
}
|
146
154
|
};
|
147
155
|
|
@@ -149,10 +157,11 @@ template <bool kRead>
|
|
149
157
|
struct H2SecurityTrace {
|
150
158
|
uint32_t payload_length;
|
151
159
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
160
|
+
channelz::PropertyList ChannelzProperties() const {
|
161
|
+
return channelz::PropertyList()
|
162
|
+
.Set("read", kRead)
|
163
|
+
.Set("frame_type", "SECURITY")
|
164
|
+
.Set("payload_length", payload_length);
|
156
165
|
}
|
157
166
|
};
|
158
167
|
|
@@ -162,12 +171,13 @@ struct H2UnknownFrameTrace {
|
|
162
171
|
uint32_t stream_id;
|
163
172
|
uint32_t payload_length;
|
164
173
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
174
|
+
channelz::PropertyList ChannelzProperties() const {
|
175
|
+
return channelz::PropertyList()
|
176
|
+
.Set("frame_type", "UNKNOWN")
|
177
|
+
.Set("type", type)
|
178
|
+
.Set("flags", flags)
|
179
|
+
.Set("stream_id", stream_id)
|
180
|
+
.Set("payload_length", payload_length);
|
171
181
|
}
|
172
182
|
};
|
173
183
|
|
@@ -176,35 +186,38 @@ struct H2FlowControlStall {
|
|
176
186
|
int64_t stream_window;
|
177
187
|
uint32_t stream_id;
|
178
188
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
189
|
+
channelz::PropertyList ChannelzProperties() const {
|
190
|
+
return channelz::PropertyList()
|
191
|
+
.Set("frame_type", "FLOW_CONTROL_STALL")
|
192
|
+
.Set("transport_window", transport_window)
|
193
|
+
.Set("stream_window", stream_window)
|
194
|
+
.Set("stream_id", stream_id);
|
184
195
|
}
|
185
196
|
};
|
186
197
|
|
187
198
|
struct H2BeginWriteCycle {
|
188
199
|
uint32_t target_size;
|
189
200
|
|
190
|
-
|
191
|
-
|
192
|
-
|
201
|
+
channelz::PropertyList ChannelzProperties() const {
|
202
|
+
return channelz::PropertyList()
|
203
|
+
.Set("frame_type", "BEGIN_WRITE_CYCLE")
|
204
|
+
.Set("target_size", target_size);
|
193
205
|
}
|
194
206
|
};
|
195
207
|
|
196
208
|
struct H2BeginEndpointWrite {
|
197
209
|
uint32_t write_size;
|
198
210
|
|
199
|
-
|
200
|
-
|
201
|
-
|
211
|
+
channelz::PropertyList ChannelzProperties() const {
|
212
|
+
return channelz::PropertyList()
|
213
|
+
.Set("frame_type", "BEGIN_ENDPOINT_WRITE")
|
214
|
+
.Set("write_size", write_size);
|
202
215
|
}
|
203
216
|
};
|
204
217
|
|
205
218
|
struct H2EndWriteCycle {
|
206
|
-
|
207
|
-
|
219
|
+
channelz::PropertyList ChannelzProperties() const {
|
220
|
+
return channelz::PropertyList().Set("frame_type", "END_WRITE_CYCLE");
|
208
221
|
}
|
209
222
|
};
|
210
223
|
|
@@ -218,6 +231,37 @@ using Http2ZTraceCollector = channelz::ZTraceCollector<
|
|
218
231
|
H2UnknownFrameTrace, H2FlowControlStall, H2BeginWriteCycle, H2EndWriteCycle,
|
219
232
|
H2BeginEndpointWrite>;
|
220
233
|
|
234
|
+
struct PromiseEndpointReadTrace {
|
235
|
+
uint64_t bytes;
|
236
|
+
channelz::PropertyList ChannelzProperties() const {
|
237
|
+
return channelz::PropertyList().Set("read_bytes", bytes);
|
238
|
+
}
|
239
|
+
};
|
240
|
+
|
241
|
+
struct PromiseEndpointWriteTrace {
|
242
|
+
uint64_t bytes;
|
243
|
+
channelz::PropertyList ChannelzProperties() const {
|
244
|
+
return channelz::PropertyList().Set("written_bytes", bytes);
|
245
|
+
}
|
246
|
+
};
|
247
|
+
|
248
|
+
namespace promise_http2_ztrace_collector_detail {
|
249
|
+
class Config {
|
250
|
+
public:
|
251
|
+
explicit Config(const channelz::ZTrace::Args&) {}
|
252
|
+
|
253
|
+
template <typename T>
|
254
|
+
bool Finishes(const T&) {
|
255
|
+
return false;
|
256
|
+
}
|
257
|
+
};
|
258
|
+
} // namespace promise_http2_ztrace_collector_detail
|
259
|
+
|
260
|
+
using PromiseHttp2ZTraceCollector =
|
261
|
+
channelz::ZTraceCollector<promise_http2_ztrace_collector_detail::Config,
|
262
|
+
PromiseEndpointReadTrace,
|
263
|
+
PromiseEndpointWriteTrace>;
|
264
|
+
|
221
265
|
} // namespace grpc_core
|
222
266
|
|
223
267
|
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ZTRACE_COLLECTOR_H
|
@@ -115,6 +115,7 @@ typedef enum {
|
|
115
115
|
GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE,
|
116
116
|
} grpc_chttp2_write_state;
|
117
117
|
|
118
|
+
// Not getting used anywhere AFAIK
|
118
119
|
typedef enum {
|
119
120
|
GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY,
|
120
121
|
GRPC_CHTTP2_OPTIMIZE_FOR_THROUGHPUT,
|
@@ -238,7 +239,7 @@ struct grpc_chttp2_transport final : public grpc_core::FilterStackTransport,
|
|
238
239
|
public:
|
239
240
|
explicit ChannelzDataSource(grpc_chttp2_transport* transport)
|
240
241
|
: grpc_core::channelz::DataSource(transport->channelz_socket),
|
241
|
-
transport_(transport) {
|
242
|
+
transport_(transport->Ref()) { // Take a ref
|
242
243
|
SourceConstructed();
|
243
244
|
}
|
244
245
|
~ChannelzDataSource() { SourceDestructing(); }
|
@@ -248,7 +249,7 @@ struct grpc_chttp2_transport final : public grpc_core::FilterStackTransport,
|
|
248
249
|
absl::string_view name) override;
|
249
250
|
|
250
251
|
private:
|
251
|
-
grpc_chttp2_transport
|
252
|
+
grpc_core::RefCountedPtr<grpc_chttp2_transport> transport_;
|
252
253
|
};
|
253
254
|
|
254
255
|
void Orphan() override;
|
@@ -301,6 +302,8 @@ struct grpc_chttp2_transport final : public grpc_core::FilterStackTransport,
|
|
301
302
|
grpc_core::MemoryOwner memory_owner;
|
302
303
|
const grpc_core::MemoryAllocator::Reservation self_reservation;
|
303
304
|
grpc_core::ReclamationSweep active_reclamation;
|
305
|
+
grpc_core::InstrumentStorageRefPtr<grpc_core::ResourceQuotaDomain>
|
306
|
+
resource_quota_telemetry_storage;
|
304
307
|
|
305
308
|
std::shared_ptr<grpc_event_engine::experimental::EventEngine> event_engine;
|
306
309
|
grpc_core::Combiner* combiner;
|
@@ -714,7 +717,7 @@ struct grpc_chttp2_stream {
|
|
714
717
|
// annotations as soon as we have parsed initial metadata, but in our legacy
|
715
718
|
// stack, we create the stream before parsing headers. In the new v3 stack,
|
716
719
|
// that won't be an issue.
|
717
|
-
grpc_core::
|
720
|
+
grpc_core::CallTracer* call_tracer = nullptr;
|
718
721
|
// TODO(yashykt): Remove this once call_tracer_transport_fix is rolled out
|
719
722
|
grpc_core::CallTracerAnnotationInterface* parent_call_tracer = nullptr;
|
720
723
|
|
@@ -740,17 +743,6 @@ struct grpc_chttp2_stream {
|
|
740
743
|
grpc_core::Timestamp::InfPast();
|
741
744
|
};
|
742
745
|
|
743
|
-
// EXPERIMENTAL: provide protection against overloading a server with too many
|
744
|
-
// requests: wait for streams to be deallocated before they stop counting
|
745
|
-
// against MAX_CONCURRENT_STREAMS
|
746
|
-
#define GRPC_ARG_MAX_CONCURRENT_STREAMS_OVERLOAD_PROTECTION \
|
747
|
-
"grpc.http.overload_protection"
|
748
|
-
|
749
|
-
// EXPERIMENTAL: Fail requests at the client if the client is over max
|
750
|
-
// concurrent streams, so they may be retried elsewhere.
|
751
|
-
#define GRPC_ARG_MAX_CONCURRENT_STREAMS_REJECT_ON_CLIENT \
|
752
|
-
"grpc.http.max_concurrent_streams_reject_on_client"
|
753
|
-
|
754
746
|
/// Transport writing call flow:
|
755
747
|
/// grpc_chttp2_initiate_write() is called anywhere that we know bytes need to
|
756
748
|
/// go out on the wire.
|
@@ -22,13 +22,13 @@
|
|
22
22
|
#include <cstdint>
|
23
23
|
#include <utility>
|
24
24
|
|
25
|
-
#include "absl/log/check.h"
|
26
25
|
#include "src/core/call/message.h"
|
27
26
|
#include "src/core/ext/transport/chttp2/transport/frame.h"
|
28
27
|
#include "src/core/ext/transport/chttp2/transport/http2_status.h"
|
29
28
|
#include "src/core/lib/resource_quota/arena.h"
|
30
29
|
#include "src/core/lib/slice/slice.h"
|
31
30
|
#include "src/core/lib/slice/slice_buffer.h"
|
31
|
+
#include "src/core/util/grpc_check.h"
|
32
32
|
#include "src/core/util/ref_counted_ptr.h"
|
33
33
|
|
34
34
|
namespace grpc_core {
|
@@ -53,7 +53,7 @@ class GrpcMessageAssembler {
|
|
53
53
|
// This function will move the payload into an internal buffer.
|
54
54
|
Http2Status AppendNewDataFrame(SliceBuffer& payload,
|
55
55
|
const bool is_end_stream) {
|
56
|
-
|
56
|
+
GRPC_DCHECK(!is_end_stream_)
|
57
57
|
<< "Calling this function when a previous frame was marked as the last "
|
58
58
|
"frame does not make sense.";
|
59
59
|
is_end_stream_ = is_end_stream;
|
@@ -66,7 +66,7 @@ class GrpcMessageAssembler {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
payload.MoveFirstNBytesIntoSliceBuffer(payload.Length(), message_buffer_);
|
69
|
-
|
69
|
+
GRPC_DCHECK_EQ(payload.Length(), 0u);
|
70
70
|
return Http2Status::Ok();
|
71
71
|
}
|
72
72
|
|
@@ -135,14 +135,14 @@ class GrpcMessageDisassembler {
|
|
135
135
|
|
136
136
|
// GrpcMessageDisassembler object will take ownership of the message.
|
137
137
|
void PrepareSingleMessageForSending(MessageHandle message) {
|
138
|
-
|
138
|
+
GRPC_DCHECK_EQ(GetBufferedLength(), 0u);
|
139
139
|
PrepareMessageForSending(std::move(message));
|
140
140
|
}
|
141
141
|
|
142
142
|
// GrpcMessageDisassembler object will take ownership of the message.
|
143
143
|
void PrepareBatchedMessageForSending(MessageHandle message) {
|
144
144
|
PrepareMessageForSending(std::move(message));
|
145
|
-
|
145
|
+
GRPC_DCHECK_LE(GetBufferedLength(), kMaxMessageBatchSize)
|
146
146
|
<< "Avoid batches larger than " << kMaxMessageBatchSize << "bytes";
|
147
147
|
}
|
148
148
|
|
@@ -152,8 +152,8 @@ class GrpcMessageDisassembler {
|
|
152
152
|
Http2DataFrame GenerateNextFrame(const uint32_t stream_id,
|
153
153
|
const uint32_t max_length,
|
154
154
|
const bool is_end_stream = false) {
|
155
|
-
|
156
|
-
|
155
|
+
GRPC_DCHECK_GT(max_length, 0u);
|
156
|
+
GRPC_DCHECK_GT(GetBufferedLength(), 0u);
|
157
157
|
SliceBuffer temp;
|
158
158
|
const uint32_t current_length =
|
159
159
|
message_.Length() >= max_length ? max_length : message_.Length();
|
@@ -33,7 +33,6 @@
|
|
33
33
|
|
34
34
|
#include "absl/base/attributes.h"
|
35
35
|
#include "absl/container/flat_hash_map.h"
|
36
|
-
#include "absl/log/check.h"
|
37
36
|
#include "absl/log/log.h"
|
38
37
|
#include "absl/random/bit_gen_ref.h"
|
39
38
|
#include "absl/status/status.h"
|
@@ -73,6 +72,7 @@
|
|
73
72
|
#include "src/core/telemetry/call_tracer.h"
|
74
73
|
#include "src/core/telemetry/stats.h"
|
75
74
|
#include "src/core/telemetry/stats_data.h"
|
75
|
+
#include "src/core/util/grpc_check.h"
|
76
76
|
#include "src/core/util/random_early_detection.h"
|
77
77
|
#include "src/core/util/ref_counted_ptr.h"
|
78
78
|
#include "src/core/util/shared_bit_gen.h"
|
@@ -274,7 +274,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
274
274
|
}
|
275
275
|
[[fallthrough]];
|
276
276
|
case GRPC_DTS_FH_0:
|
277
|
-
|
277
|
+
GRPC_DCHECK_LT(cur, end);
|
278
278
|
t->incoming_frame_size = (static_cast<uint32_t>(*cur)) << 16;
|
279
279
|
if (++cur == end) {
|
280
280
|
t->deframe_state = GRPC_DTS_FH_1;
|
@@ -282,7 +282,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
282
282
|
}
|
283
283
|
[[fallthrough]];
|
284
284
|
case GRPC_DTS_FH_1:
|
285
|
-
|
285
|
+
GRPC_DCHECK_LT(cur, end);
|
286
286
|
t->incoming_frame_size |= (static_cast<uint32_t>(*cur)) << 8;
|
287
287
|
if (++cur == end) {
|
288
288
|
t->deframe_state = GRPC_DTS_FH_2;
|
@@ -290,7 +290,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
290
290
|
}
|
291
291
|
[[fallthrough]];
|
292
292
|
case GRPC_DTS_FH_2:
|
293
|
-
|
293
|
+
GRPC_DCHECK_LT(cur, end);
|
294
294
|
t->incoming_frame_size |= *cur;
|
295
295
|
if (++cur == end) {
|
296
296
|
t->deframe_state = GRPC_DTS_FH_3;
|
@@ -298,7 +298,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
298
298
|
}
|
299
299
|
[[fallthrough]];
|
300
300
|
case GRPC_DTS_FH_3:
|
301
|
-
|
301
|
+
GRPC_DCHECK_LT(cur, end);
|
302
302
|
t->incoming_frame_type = *cur;
|
303
303
|
if (++cur == end) {
|
304
304
|
t->deframe_state = GRPC_DTS_FH_4;
|
@@ -306,7 +306,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
306
306
|
}
|
307
307
|
[[fallthrough]];
|
308
308
|
case GRPC_DTS_FH_4:
|
309
|
-
|
309
|
+
GRPC_DCHECK_LT(cur, end);
|
310
310
|
t->incoming_frame_flags = *cur;
|
311
311
|
if (++cur == end) {
|
312
312
|
t->deframe_state = GRPC_DTS_FH_5;
|
@@ -314,7 +314,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
314
314
|
}
|
315
315
|
[[fallthrough]];
|
316
316
|
case GRPC_DTS_FH_5:
|
317
|
-
|
317
|
+
GRPC_DCHECK_LT(cur, end);
|
318
318
|
t->incoming_stream_id = ((static_cast<uint32_t>(*cur)) & 0x7f) << 24;
|
319
319
|
if (++cur == end) {
|
320
320
|
t->deframe_state = GRPC_DTS_FH_6;
|
@@ -322,7 +322,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
322
322
|
}
|
323
323
|
[[fallthrough]];
|
324
324
|
case GRPC_DTS_FH_6:
|
325
|
-
|
325
|
+
GRPC_DCHECK_LT(cur, end);
|
326
326
|
t->incoming_stream_id |= (static_cast<uint32_t>(*cur)) << 16;
|
327
327
|
if (++cur == end) {
|
328
328
|
t->deframe_state = GRPC_DTS_FH_7;
|
@@ -330,7 +330,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
330
330
|
}
|
331
331
|
[[fallthrough]];
|
332
332
|
case GRPC_DTS_FH_7:
|
333
|
-
|
333
|
+
GRPC_DCHECK_LT(cur, end);
|
334
334
|
t->incoming_stream_id |= (static_cast<uint32_t>(*cur)) << 8;
|
335
335
|
if (++cur == end) {
|
336
336
|
t->deframe_state = GRPC_DTS_FH_8;
|
@@ -338,7 +338,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
338
338
|
}
|
339
339
|
[[fallthrough]];
|
340
340
|
case GRPC_DTS_FH_8:
|
341
|
-
|
341
|
+
GRPC_DCHECK_LT(cur, end);
|
342
342
|
t->incoming_stream_id |= (static_cast<uint32_t>(*cur));
|
343
343
|
GRPC_TRACE_LOG(http, INFO)
|
344
344
|
<< "INCOMING[" << t << "]: "
|
@@ -372,7 +372,7 @@ std::variant<size_t, absl::Status> grpc_chttp2_perform_read(
|
|
372
372
|
}
|
373
373
|
[[fallthrough]];
|
374
374
|
case GRPC_DTS_FRAME:
|
375
|
-
|
375
|
+
GRPC_DCHECK_LT(cur, end);
|
376
376
|
if (static_cast<uint32_t>(end - cur) == t->incoming_frame_size) {
|
377
377
|
err = parse_frame_slice(
|
378
378
|
t,
|
@@ -671,10 +671,12 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
|
|
671
671
|
nullptr, &t->http2_ztrace_collector));
|
672
672
|
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
|
673
673
|
return init_header_skip_frame_parser(t, priority_type, is_eoh);
|
674
|
-
} else if (GPR_UNLIKELY(
|
674
|
+
} else if (GPR_UNLIKELY(
|
675
|
+
t->memory_owner.RejectNewStreamsUnderHighMemoryPressure())) {
|
675
676
|
// We have more streams allocated than we'd like, so apply some pushback
|
676
677
|
// by refusing this stream.
|
677
|
-
|
678
|
+
t->memory_owner.telemetry_storage()->Increment(
|
679
|
+
grpc_core::ResourceQuotaDomain::kCallsRejected);
|
678
680
|
++t->num_pending_induced_frames;
|
679
681
|
grpc_slice_buffer_add(
|
680
682
|
&t->qbuf, grpc_chttp2_rst_stream_create(
|
@@ -766,7 +768,7 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
|
|
766
768
|
} else {
|
767
769
|
t->incoming_stream = s;
|
768
770
|
}
|
769
|
-
|
771
|
+
GRPC_DCHECK_NE(s, nullptr);
|
770
772
|
s->call_tracer_wrapper.RecordIncomingBytes({9, 0, 0});
|
771
773
|
if (GPR_UNLIKELY(s->read_closed)) {
|
772
774
|
GRPC_CHTTP2_IF_TRACING(ERROR)
|
@@ -976,7 +978,7 @@ grpc_error_handle grpc_chttp2_header_parser_parse(void* hpack_parser,
|
|
976
978
|
const grpc_slice& slice,
|
977
979
|
int is_last) {
|
978
980
|
auto* parser = static_cast<grpc_core::HPackParser*>(hpack_parser);
|
979
|
-
grpc_core::
|
981
|
+
grpc_core::CallSpan* call_tracer = nullptr;
|
980
982
|
if (s != nullptr) {
|
981
983
|
s->call_tracer_wrapper.RecordIncomingBytes(
|
982
984
|
{0, 0, GRPC_SLICE_LENGTH(slice)});
|
@@ -18,9 +18,9 @@
|
|
18
18
|
|
19
19
|
#include <utility>
|
20
20
|
|
21
|
-
#include "absl/log/check.h"
|
22
21
|
#include "absl/meta/type_traits.h"
|
23
22
|
#include "absl/random/distributions.h"
|
23
|
+
#include "src/core/util/grpc_check.h"
|
24
24
|
|
25
25
|
namespace grpc_core {
|
26
26
|
|
@@ -93,7 +93,7 @@ std::optional<uint64_t> Chttp2PingCallbacks::OnPingTimeout(
|
|
93
93
|
Duration ping_timeout,
|
94
94
|
grpc_event_engine::experimental::EventEngine* event_engine,
|
95
95
|
Callback callback) {
|
96
|
-
|
96
|
+
GRPC_CHECK(started_new_ping_without_setting_timeout_);
|
97
97
|
started_new_ping_without_setting_timeout_ = false;
|
98
98
|
auto it = inflight_.find(most_recent_inflight_);
|
99
99
|
if (it == inflight_.end()) return std::nullopt;
|