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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d455b23434382eb727e7c8181e40de0f84503c73d79af628863f6ebfabd6c983
|
4
|
+
data.tar.gz: 856a8a574cfc3c57beb4219463ea6b634a3cd149406ca17bd8ca03957142521a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed2df9988f821b7b755d7e1d8192902402e5703c3ebe65740d44fbe689a25ba0de97588a21cdd7d795c0b26bc09ddac3edf469f73a4da906984fc4b72a4ddb7
|
7
|
+
data.tar.gz: a43f9d3b3fead6491649a8e7bbfb8045c1f00eb72f4beb67a72bfaa052371f2f1d1c2350dd9266cc5e81c2ba82e0940697118c31f71c8de73e43e952c8914727
|
data/Makefile
CHANGED
@@ -367,8 +367,8 @@ E = @echo
|
|
367
367
|
Q = @
|
368
368
|
endif
|
369
369
|
|
370
|
-
CORE_VERSION =
|
371
|
-
CPP_VERSION = 1.
|
370
|
+
CORE_VERSION = 51.0.0
|
371
|
+
CPP_VERSION = 1.76.0-pre1
|
372
372
|
|
373
373
|
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
|
374
374
|
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
|
@@ -404,7 +404,7 @@ SHARED_EXT_CORE = dll
|
|
404
404
|
SHARED_EXT_CPP = dll
|
405
405
|
|
406
406
|
SHARED_PREFIX =
|
407
|
-
SHARED_VERSION_CORE = -
|
407
|
+
SHARED_VERSION_CORE = -51
|
408
408
|
SHARED_VERSION_CPP = -1
|
409
409
|
else ifeq ($(SYSTEM),Darwin)
|
410
410
|
EXECUTABLE_SUFFIX =
|
@@ -685,6 +685,7 @@ LIBGRPC_SRC = \
|
|
685
685
|
src/core/channelz/channelz.cc \
|
686
686
|
src/core/channelz/channelz_registry.cc \
|
687
687
|
src/core/channelz/property_list.cc \
|
688
|
+
src/core/channelz/text_encode.cc \
|
688
689
|
src/core/channelz/v2tov1/convert.cc \
|
689
690
|
src/core/channelz/v2tov1/legacy_api.cc \
|
690
691
|
src/core/channelz/v2tov1/property_list.cc \
|
@@ -962,6 +963,7 @@ LIBGRPC_SRC = \
|
|
962
963
|
src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c \
|
963
964
|
src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c \
|
964
965
|
src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c \
|
966
|
+
src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.c \
|
965
967
|
src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c \
|
966
968
|
src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c \
|
967
969
|
src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c \
|
@@ -1125,8 +1127,10 @@ LIBGRPC_SRC = \
|
|
1125
1127
|
src/core/ext/upbdefs-gen/google/protobuf/wrappers.upbdefs.c \
|
1126
1128
|
src/core/ext/upbdefs-gen/google/rpc/status.upbdefs.c \
|
1127
1129
|
src/core/ext/upbdefs-gen/src/proto/grpc/channelz/channelz.upbdefs.c \
|
1130
|
+
src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.c \
|
1128
1131
|
src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c \
|
1129
1132
|
src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c \
|
1133
|
+
src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/service.upbdefs.c \
|
1130
1134
|
src/core/ext/upbdefs-gen/src/proto/grpc/lookup/v1/rls_config.upbdefs.c \
|
1131
1135
|
src/core/ext/upbdefs-gen/udpa/annotations/migrate.upbdefs.c \
|
1132
1136
|
src/core/ext/upbdefs-gen/udpa/annotations/security.upbdefs.c \
|
@@ -1325,6 +1329,7 @@ LIBGRPC_SRC = \
|
|
1325
1329
|
src/core/lib/resource_quota/periodic_update.cc \
|
1326
1330
|
src/core/lib/resource_quota/resource_quota.cc \
|
1327
1331
|
src/core/lib/resource_quota/thread_quota.cc \
|
1332
|
+
src/core/lib/resource_tracker/resource_tracker.cc \
|
1328
1333
|
src/core/lib/security/authorization/audit_logging.cc \
|
1329
1334
|
src/core/lib/security/authorization/authorization_policy_provider_vtable.cc \
|
1330
1335
|
src/core/lib/security/authorization/evaluate_args.cc \
|
@@ -1431,6 +1436,7 @@ LIBGRPC_SRC = \
|
|
1431
1436
|
src/core/telemetry/context_list_entry.cc \
|
1432
1437
|
src/core/telemetry/default_tcp_tracer.cc \
|
1433
1438
|
src/core/telemetry/histogram_view.cc \
|
1439
|
+
src/core/telemetry/instrument.cc \
|
1434
1440
|
src/core/telemetry/metrics.cc \
|
1435
1441
|
src/core/telemetry/stats.cc \
|
1436
1442
|
src/core/telemetry/stats_data.cc \
|
@@ -1479,6 +1485,7 @@ LIBGRPC_SRC = \
|
|
1479
1485
|
src/core/util/gethostname_sysconf.cc \
|
1480
1486
|
src/core/util/glob.cc \
|
1481
1487
|
src/core/util/gpr_time.cc \
|
1488
|
+
src/core/util/grpc_check.cc \
|
1482
1489
|
src/core/util/grpc_if_nametoindex_posix.cc \
|
1483
1490
|
src/core/util/grpc_if_nametoindex_unsupported.cc \
|
1484
1491
|
src/core/util/host_port.cc \
|
@@ -1509,6 +1516,7 @@ LIBGRPC_SRC = \
|
|
1509
1516
|
src/core/util/posix/thd.cc \
|
1510
1517
|
src/core/util/posix/time.cc \
|
1511
1518
|
src/core/util/posix/tmpfile.cc \
|
1519
|
+
src/core/util/postmortem_emit.cc \
|
1512
1520
|
src/core/util/random_early_detection.cc \
|
1513
1521
|
src/core/util/ref_counted_string.cc \
|
1514
1522
|
src/core/util/shared_bit_gen.cc \
|
@@ -1559,6 +1567,11 @@ LIBGRPC_SRC = \
|
|
1559
1567
|
src/core/xds/grpc/xds_lb_policy_registry.cc \
|
1560
1568
|
src/core/xds/grpc/xds_listener.cc \
|
1561
1569
|
src/core/xds/grpc/xds_listener_parser.cc \
|
1570
|
+
src/core/xds/grpc/xds_matcher.cc \
|
1571
|
+
src/core/xds/grpc/xds_matcher_action.cc \
|
1572
|
+
src/core/xds/grpc/xds_matcher_context.cc \
|
1573
|
+
src/core/xds/grpc/xds_matcher_input.cc \
|
1574
|
+
src/core/xds/grpc/xds_matcher_parse.cc \
|
1562
1575
|
src/core/xds/grpc/xds_metadata.cc \
|
1563
1576
|
src/core/xds/grpc/xds_metadata_parser.cc \
|
1564
1577
|
src/core/xds/grpc/xds_route_config.cc \
|
@@ -1872,8 +1885,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_
|
|
1872
1885
|
ifeq ($(SYSTEM),Darwin)
|
1873
1886
|
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libcares.a $(OPENSSL_MERGE_LIBS) $(ZLIB_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS)
|
1874
1887
|
else
|
1875
|
-
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.
|
1876
|
-
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.
|
1888
|
+
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.51 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libcares.a $(OPENSSL_MERGE_LIBS) $(ZLIB_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS)
|
1889
|
+
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.51
|
1877
1890
|
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so
|
1878
1891
|
endif
|
1879
1892
|
endif
|
data/include/grpc/credentials.h
CHANGED
@@ -214,19 +214,27 @@ GRPCAPI void grpc_call_credentials_release(grpc_call_credentials* creds);
|
|
214
214
|
identity of the default service account of the machine. Supplying any other
|
215
215
|
sort of call credential will result in undefined behavior, up to and
|
216
216
|
including the sudden and unexpected failure of RPCs.
|
217
|
+
It is in the caller's responsibility to ensure that both specified
|
218
|
+
credentials assert the correct identities.
|
217
219
|
|
218
220
|
If nullptr is supplied, the returned channel credentials object will use a
|
219
221
|
default call credentials object based on the Application Default Credentials
|
220
222
|
mechanism.
|
221
223
|
|
222
224
|
The caller may choose to create the default credential with a secondary alts
|
223
|
-
credentials object to attach to the channel for ALTS connections. If
|
224
|
-
credentials
|
225
|
-
type is ALTS.
|
225
|
+
credentials object to attach to the channel for ALTS connections. If
|
226
|
+
credentials options are specified, it will be used to configure an underlying
|
227
|
+
channel which type is ALTS. If the field create_hard_bound_credentials is
|
228
|
+
true, the call_creds_for_alts field will be ignored.
|
226
229
|
*/
|
230
|
+
typedef struct {
|
231
|
+
bool create_hard_bound_credentials;
|
232
|
+
grpc_call_credentials* call_creds_for_alts;
|
233
|
+
} grpc_google_default_credentials_options;
|
234
|
+
|
227
235
|
GRPCAPI grpc_channel_credentials* grpc_google_default_credentials_create(
|
228
236
|
grpc_call_credentials* call_creds_for_tls,
|
229
|
-
|
237
|
+
grpc_google_default_credentials_options* options);
|
230
238
|
|
231
239
|
/** Server certificate config object holds the server's public certificates and
|
232
240
|
associated private keys, as well as any CA certificates needed for client
|
@@ -485,11 +493,19 @@ GRPCAPI grpc_call_credentials* grpc_composite_call_credentials_create(
|
|
485
493
|
grpc_call_credentials* creds1, grpc_call_credentials* creds2,
|
486
494
|
void* reserved);
|
487
495
|
|
496
|
+
/** Context that can be used by the google compute engine create credentials api
|
497
|
+
in order to configure the desired credentials. */
|
498
|
+
typedef struct {
|
499
|
+
/// Indicates if the created credentials should be ALTS with hard bound
|
500
|
+
/// tokens.
|
501
|
+
bool alts_hard_bound;
|
502
|
+
} grpc_google_compute_engine_credentials_options;
|
503
|
+
|
488
504
|
/** Creates a compute engine credentials object for connecting to Google.
|
489
505
|
WARNING: Do NOT use this credentials to connect to a non-google service as
|
490
506
|
this could result in an oauth2 token leak. */
|
491
507
|
GRPCAPI grpc_call_credentials* grpc_google_compute_engine_credentials_create(
|
492
|
-
|
508
|
+
grpc_google_compute_engine_credentials_options* options);
|
493
509
|
|
494
510
|
/** Creates a composite channel credentials object. The security level of
|
495
511
|
* resulting connection is determined by channel_creds. */
|
@@ -16,10 +16,10 @@
|
|
16
16
|
|
17
17
|
#include <grpc/support/port_platform.h>
|
18
18
|
|
19
|
-
#include "absl/log/check.h"
|
20
19
|
#include "absl/log/log.h"
|
21
20
|
#include "src/core/call/metadata.h"
|
22
21
|
#include "src/core/util/crash.h"
|
22
|
+
#include "src/core/util/grpc_check.h"
|
23
23
|
|
24
24
|
namespace grpc_core {
|
25
25
|
// Call data for those calls that don't have any call data
|
@@ -30,7 +30,7 @@ char CallFilters::g_empty_call_data_;
|
|
30
30
|
// CallFilters
|
31
31
|
|
32
32
|
void CallFilters::Start() {
|
33
|
-
|
33
|
+
GRPC_CHECK_EQ(call_data_, nullptr);
|
34
34
|
size_t call_data_alignment = 1;
|
35
35
|
for (const auto& stack : stacks_) {
|
36
36
|
call_data_alignment =
|
@@ -83,11 +83,11 @@ void CallFilters::CancelDueToFailedPipeOperation(SourceLocation but_where) {
|
|
83
83
|
}
|
84
84
|
|
85
85
|
void CallFilters::PushServerTrailingMetadata(ServerMetadataHandle md) {
|
86
|
-
|
86
|
+
GRPC_CHECK(md != nullptr);
|
87
87
|
GRPC_TRACE_LOG(call, INFO)
|
88
88
|
<< GetContext<Activity>()->DebugTag() << " PushServerTrailingMetadata["
|
89
89
|
<< this << "]: " << md->DebugString() << " into " << DebugString();
|
90
|
-
|
90
|
+
GRPC_CHECK(md != nullptr);
|
91
91
|
if (call_state_.PushServerTrailingMetadata(
|
92
92
|
md->get(GrpcCallWasCancelled()).value_or(false))) {
|
93
93
|
push_server_trailing_metadata_ = std::move(md);
|
@@ -23,7 +23,6 @@
|
|
23
23
|
#include <ostream>
|
24
24
|
#include <type_traits>
|
25
25
|
|
26
|
-
#include "absl/log/check.h"
|
27
26
|
#include "src/core/call/call_state.h"
|
28
27
|
#include "src/core/call/message.h"
|
29
28
|
#include "src/core/call/metadata.h"
|
@@ -37,6 +36,7 @@
|
|
37
36
|
#include "src/core/lib/promise/try_seq.h"
|
38
37
|
#include "src/core/lib/transport/call_final_info.h"
|
39
38
|
#include "src/core/util/dump_args.h"
|
39
|
+
#include "src/core/util/grpc_check.h"
|
40
40
|
#include "src/core/util/ref_counted.h"
|
41
41
|
#include "src/core/util/ref_counted_ptr.h"
|
42
42
|
|
@@ -146,9 +146,9 @@ class NextMessage {
|
|
146
146
|
NextMessage() = default;
|
147
147
|
explicit NextMessage(Failure) : message_(error()), call_state_(nullptr) {}
|
148
148
|
NextMessage(MessageHandle message, CallState* call_state) {
|
149
|
-
|
150
|
-
|
151
|
-
|
149
|
+
GRPC_DCHECK_NE(call_state, nullptr);
|
150
|
+
GRPC_DCHECK_NE(message.get(), nullptr);
|
151
|
+
GRPC_DCHECK(message.get_deleter().has_freelist());
|
152
152
|
message_ = message.release();
|
153
153
|
call_state_ = call_state;
|
154
154
|
}
|
@@ -171,37 +171,37 @@ class NextMessage {
|
|
171
171
|
}
|
172
172
|
|
173
173
|
bool ok() const {
|
174
|
-
|
174
|
+
GRPC_DCHECK_NE(message_, taken());
|
175
175
|
return message_ != error();
|
176
176
|
}
|
177
177
|
bool has_value() const {
|
178
|
-
|
179
|
-
|
178
|
+
GRPC_DCHECK_NE(message_, taken());
|
179
|
+
GRPC_DCHECK(ok());
|
180
180
|
return message_ != end_of_stream();
|
181
181
|
}
|
182
182
|
StatusFlag status() const { return StatusFlag(ok()); }
|
183
183
|
Message& value() {
|
184
|
-
|
185
|
-
|
186
|
-
|
184
|
+
GRPC_DCHECK_NE(message_, taken());
|
185
|
+
GRPC_DCHECK(ok());
|
186
|
+
GRPC_DCHECK(has_value());
|
187
187
|
return *message_;
|
188
188
|
}
|
189
189
|
const Message& value() const {
|
190
|
-
|
191
|
-
|
192
|
-
|
190
|
+
GRPC_DCHECK_NE(message_, taken());
|
191
|
+
GRPC_DCHECK(ok());
|
192
|
+
GRPC_DCHECK(has_value());
|
193
193
|
return *message_;
|
194
194
|
}
|
195
195
|
MessageHandle TakeValue() {
|
196
|
-
|
197
|
-
|
198
|
-
|
196
|
+
GRPC_DCHECK_NE(message_, taken());
|
197
|
+
GRPC_DCHECK(ok());
|
198
|
+
GRPC_DCHECK(has_value());
|
199
199
|
return MessageHandle(std::exchange(message_, taken()),
|
200
200
|
Arena::PooledDeleter());
|
201
201
|
}
|
202
202
|
bool progressed() const { return call_state_ == nullptr; }
|
203
203
|
void Progress() {
|
204
|
-
|
204
|
+
GRPC_DCHECK(!progressed());
|
205
205
|
(call_state_->*on_progress)();
|
206
206
|
call_state_ = nullptr;
|
207
207
|
}
|
@@ -283,7 +283,7 @@ template <typename T>
|
|
283
283
|
struct ResultOr {
|
284
284
|
ResultOr(T ok, ServerMetadataHandle error)
|
285
285
|
: ok(std::move(ok)), error(std::move(error)) {
|
286
|
-
|
286
|
+
GRPC_CHECK((this->ok == nullptr) ^ (this->error == nullptr));
|
287
287
|
}
|
288
288
|
T ok;
|
289
289
|
ServerMetadataHandle error;
|
@@ -1221,13 +1221,13 @@ struct StackData {
|
|
1221
1221
|
|
1222
1222
|
template <typename FilterType>
|
1223
1223
|
void AddFinalizer(FilterType*, size_t, const NoInterceptor* p) {
|
1224
|
-
|
1224
|
+
GRPC_DCHECK(p == &FilterType::Call::OnFinalize);
|
1225
1225
|
}
|
1226
1226
|
|
1227
1227
|
template <typename FilterType>
|
1228
1228
|
void AddFinalizer(FilterType* channel_data, size_t call_offset,
|
1229
1229
|
void (FilterType::Call::*p)(const grpc_call_final_info*)) {
|
1230
|
-
|
1230
|
+
GRPC_DCHECK(p == &FilterType::Call::OnFinalize);
|
1231
1231
|
finalizers.push_back(Finalizer{
|
1232
1232
|
channel_data,
|
1233
1233
|
call_offset,
|
@@ -1242,7 +1242,7 @@ struct StackData {
|
|
1242
1242
|
void AddFinalizer(FilterType* channel_data, size_t call_offset,
|
1243
1243
|
void (FilterType::Call::*p)(const grpc_call_final_info*,
|
1244
1244
|
FilterType*)) {
|
1245
|
-
|
1245
|
+
GRPC_DCHECK(p == &FilterType::Call::OnFinalize);
|
1246
1246
|
finalizers.push_back(Finalizer{
|
1247
1247
|
channel_data,
|
1248
1248
|
call_offset,
|
@@ -1272,11 +1272,11 @@ class OperationExecutor {
|
|
1272
1272
|
OperationExecutor(OperationExecutor&& other) noexcept
|
1273
1273
|
: ops_(other.ops_), end_ops_(other.end_ops_) {
|
1274
1274
|
// Movable iff we're not running.
|
1275
|
-
|
1275
|
+
GRPC_DCHECK_EQ(other.promise_data_, nullptr);
|
1276
1276
|
}
|
1277
1277
|
OperationExecutor& operator=(OperationExecutor&& other) noexcept {
|
1278
|
-
|
1279
|
-
|
1278
|
+
GRPC_DCHECK_EQ(other.promise_data_, nullptr);
|
1279
|
+
GRPC_DCHECK_EQ(promise_data_, nullptr);
|
1280
1280
|
ops_ = other.ops_;
|
1281
1281
|
end_ops_ = other.end_ops_;
|
1282
1282
|
return *this;
|
@@ -1329,7 +1329,7 @@ OperationExecutor<T>::Start(const Layout<T>* layout, T input, void* call_data) {
|
|
1329
1329
|
if (layout->promise_size == 0) {
|
1330
1330
|
// No call state ==> instantaneously ready
|
1331
1331
|
auto r = InitStep(std::move(input), call_data);
|
1332
|
-
|
1332
|
+
GRPC_CHECK(r.ready());
|
1333
1333
|
return r;
|
1334
1334
|
}
|
1335
1335
|
promise_data_ =
|
@@ -1340,7 +1340,7 @@ OperationExecutor<T>::Start(const Layout<T>* layout, T input, void* call_data) {
|
|
1340
1340
|
template <typename T>
|
1341
1341
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll<ResultOr<T>>
|
1342
1342
|
OperationExecutor<T>::InitStep(T input, void* call_data) {
|
1343
|
-
|
1343
|
+
GRPC_CHECK(input != nullptr);
|
1344
1344
|
while (true) {
|
1345
1345
|
if (ops_ == end_ops_) {
|
1346
1346
|
return ResultOr<T>{std::move(input), nullptr};
|
@@ -1364,7 +1364,7 @@ OperationExecutor<T>::InitStep(T input, void* call_data) {
|
|
1364
1364
|
template <typename T>
|
1365
1365
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll<ResultOr<T>>
|
1366
1366
|
OperationExecutor<T>::Step(void* call_data) {
|
1367
|
-
|
1367
|
+
GRPC_DCHECK_NE(promise_data_, nullptr);
|
1368
1368
|
auto p = ContinueStep(call_data);
|
1369
1369
|
if (p.ready()) {
|
1370
1370
|
gpr_free_aligned(promise_data_);
|
@@ -1489,7 +1489,7 @@ struct FailureStatusCastImpl<filters_detail::NextMessage<on_progress>,
|
|
1489
1489
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static filters_detail::NextMessage<
|
1490
1490
|
on_progress>
|
1491
1491
|
Cast(StatusFlag flag) {
|
1492
|
-
|
1492
|
+
GRPC_DCHECK_EQ(flag, Failure{});
|
1493
1493
|
return filters_detail::NextMessage<on_progress>(Failure{});
|
1494
1494
|
}
|
1495
1495
|
};
|
@@ -1509,12 +1509,12 @@ struct TrySeqTraitsWithSfinae<filters_detail::NextMessage<on_progress>> {
|
|
1509
1509
|
return value.ok();
|
1510
1510
|
}
|
1511
1511
|
static const char* ErrorString(const WrappedType& status) {
|
1512
|
-
|
1512
|
+
GRPC_DCHECK(!status.ok());
|
1513
1513
|
return "failed";
|
1514
1514
|
}
|
1515
1515
|
template <typename R>
|
1516
1516
|
static R ReturnValue(WrappedType&& status) {
|
1517
|
-
|
1517
|
+
GRPC_DCHECK(!status.ok());
|
1518
1518
|
return WrappedType(Failure{});
|
1519
1519
|
}
|
1520
1520
|
template <typename F, typename Elem>
|
@@ -1658,13 +1658,13 @@ class CallFilters {
|
|
1658
1658
|
: stack_current_(stack_begin),
|
1659
1659
|
stack_end_(stack_end),
|
1660
1660
|
filters_(filters) {
|
1661
|
-
|
1661
|
+
GRPC_DCHECK_NE((filters_->*input_location).get(), nullptr);
|
1662
1662
|
}
|
1663
1663
|
|
1664
1664
|
Poll<ValueOrFailure<Output>> operator()() {
|
1665
1665
|
if ((filters_->*input_location) != nullptr) {
|
1666
1666
|
if (stack_current_ == stack_end_) {
|
1667
|
-
|
1667
|
+
GRPC_DCHECK_NE((filters_->*input_location).get(), nullptr);
|
1668
1668
|
(filters_->call_state_.*on_done)();
|
1669
1669
|
return Output(std::move(filters_->*input_location));
|
1670
1670
|
}
|
@@ -1718,13 +1718,13 @@ class CallFilters {
|
|
1718
1718
|
: stack_current_(stack_begin),
|
1719
1719
|
stack_end_(stack_end),
|
1720
1720
|
filters_(filters) {
|
1721
|
-
|
1721
|
+
GRPC_DCHECK_NE((filters_->*input_location).get(), nullptr);
|
1722
1722
|
}
|
1723
1723
|
|
1724
1724
|
Poll<NextMsg> operator()() {
|
1725
1725
|
if ((filters_->*input_location) != nullptr) {
|
1726
1726
|
if (stack_current_ == stack_end_) {
|
1727
|
-
|
1727
|
+
GRPC_DCHECK_NE((filters_->*input_location).get(), nullptr);
|
1728
1728
|
return NextMsg(std::move(filters_->*input_location),
|
1729
1729
|
&filters_->call_state_);
|
1730
1730
|
}
|
@@ -1815,8 +1815,8 @@ class CallFilters {
|
|
1815
1815
|
// Returns a promise that resolves to a StatusFlag indicating success
|
1816
1816
|
GRPC_MUST_USE_RESULT auto PushClientToServerMessage(MessageHandle message) {
|
1817
1817
|
call_state_.BeginPushClientToServerMessage();
|
1818
|
-
|
1819
|
-
|
1818
|
+
GRPC_DCHECK_NE(message.get(), nullptr);
|
1819
|
+
GRPC_DCHECK_EQ(push_client_to_server_message_.get(), nullptr);
|
1820
1820
|
push_client_to_server_message_ = std::move(message);
|
1821
1821
|
return [this]() { return call_state_.PollPushClientToServerMessage(); };
|
1822
1822
|
}
|
data/src/core/call/call_spine.h
CHANGED
@@ -17,7 +17,6 @@
|
|
17
17
|
|
18
18
|
#include <grpc/support/port_platform.h>
|
19
19
|
|
20
|
-
#include "absl/log/check.h"
|
21
20
|
#include "src/core/call/call_arena_allocator.h"
|
22
21
|
#include "src/core/call/call_filters.h"
|
23
22
|
#include "src/core/call/message.h"
|
@@ -32,6 +31,7 @@
|
|
32
31
|
#include "src/core/lib/promise/status_flag.h"
|
33
32
|
#include "src/core/lib/promise/try_seq.h"
|
34
33
|
#include "src/core/util/dual_ref_counted.h"
|
34
|
+
#include "src/core/util/grpc_check.h"
|
35
35
|
|
36
36
|
namespace grpc_core {
|
37
37
|
|
@@ -132,7 +132,7 @@ class CallSpine final : public Party {
|
|
132
132
|
// The resulting (returned) promise will resolve to Empty.
|
133
133
|
template <typename Promise>
|
134
134
|
auto CancelIfFails(Promise promise) {
|
135
|
-
|
135
|
+
GRPC_DCHECK(GetContext<Activity>() == this);
|
136
136
|
using P = promise_detail::PromiseLike<Promise>;
|
137
137
|
using ResultType = typename P::Result;
|
138
138
|
return Map(std::move(promise),
|
@@ -324,7 +324,7 @@ class CallInitiator {
|
|
324
324
|
CallInitiator() = default;
|
325
325
|
explicit CallInitiator(RefCountedPtr<CallSpine> spine)
|
326
326
|
: spine_(std::move(spine)) {
|
327
|
-
|
327
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
328
328
|
}
|
329
329
|
|
330
330
|
// Wrap a promise so that if it returns failure it automatically cancels
|
@@ -332,118 +332,118 @@ class CallInitiator {
|
|
332
332
|
// The resulting (returned) promise will resolve to Empty.
|
333
333
|
template <typename Promise>
|
334
334
|
auto CancelIfFails(Promise promise) {
|
335
|
-
|
335
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
336
336
|
return spine_->CancelIfFails(std::move(promise));
|
337
337
|
}
|
338
338
|
|
339
339
|
auto PullServerInitialMetadata() {
|
340
|
-
|
340
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
341
341
|
return spine_->PullServerInitialMetadata();
|
342
342
|
}
|
343
343
|
|
344
344
|
auto PushMessage(MessageHandle message) {
|
345
|
-
|
345
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
346
346
|
return spine_->PushClientToServerMessage(std::move(message));
|
347
347
|
}
|
348
348
|
|
349
349
|
void SpawnPushMessage(MessageHandle message) {
|
350
|
-
|
350
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
351
351
|
spine_->SpawnPushClientToServerMessage(std::move(message));
|
352
352
|
}
|
353
353
|
|
354
354
|
void FinishSends() {
|
355
|
-
|
355
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
356
356
|
spine_->FinishSends();
|
357
357
|
}
|
358
358
|
|
359
359
|
void SpawnFinishSends() {
|
360
|
-
|
360
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
361
361
|
spine_->SpawnFinishSends();
|
362
362
|
}
|
363
363
|
|
364
364
|
auto PullMessage() {
|
365
|
-
|
365
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
366
366
|
return spine_->PullServerToClientMessage();
|
367
367
|
}
|
368
368
|
|
369
369
|
auto PullServerTrailingMetadata() {
|
370
|
-
|
370
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
371
371
|
return spine_->PullServerTrailingMetadata();
|
372
372
|
}
|
373
373
|
|
374
374
|
void Cancel(absl::Status error) {
|
375
|
-
|
376
|
-
|
375
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
376
|
+
GRPC_CHECK(!error.ok());
|
377
377
|
auto status = ServerMetadataFromStatus(error);
|
378
378
|
status->Set(GrpcCallWasCancelled(), true);
|
379
379
|
spine_->PushServerTrailingMetadata(std::move(status));
|
380
380
|
}
|
381
381
|
|
382
382
|
void SpawnCancel(absl::Status error) {
|
383
|
-
|
384
|
-
|
383
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
384
|
+
GRPC_CHECK(!error.ok());
|
385
385
|
auto status = ServerMetadataFromStatus(error);
|
386
386
|
status->Set(GrpcCallWasCancelled(), true);
|
387
387
|
spine_->SpawnPushServerTrailingMetadata(std::move(status));
|
388
388
|
}
|
389
389
|
|
390
390
|
void Cancel() {
|
391
|
-
|
391
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
392
392
|
spine_->Cancel();
|
393
393
|
}
|
394
394
|
|
395
395
|
void SpawnCancel() {
|
396
|
-
|
396
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
397
397
|
spine_->SpawnCancel();
|
398
398
|
}
|
399
399
|
|
400
400
|
GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable<void(bool)> fn) {
|
401
|
-
|
401
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
402
402
|
return spine_->OnDone(std::move(fn));
|
403
403
|
}
|
404
404
|
|
405
405
|
template <typename Promise>
|
406
406
|
auto UntilCallCompletes(Promise promise) {
|
407
|
-
|
407
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
408
408
|
return spine_->UntilCallCompletes(std::move(promise));
|
409
409
|
}
|
410
410
|
|
411
411
|
template <typename PromiseFactory>
|
412
412
|
void SpawnGuarded(absl::string_view name, PromiseFactory promise_factory) {
|
413
|
-
|
413
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
414
414
|
spine_->SpawnGuarded(name, std::move(promise_factory));
|
415
415
|
}
|
416
416
|
|
417
417
|
template <typename PromiseFactory>
|
418
418
|
void SpawnGuardedUntilCallCompletes(absl::string_view name,
|
419
419
|
PromiseFactory promise_factory) {
|
420
|
-
|
420
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
421
421
|
spine_->SpawnGuardedUntilCallCompletes(name, std::move(promise_factory));
|
422
422
|
}
|
423
423
|
|
424
424
|
template <typename PromiseFactory>
|
425
425
|
void SpawnInfallible(absl::string_view name, PromiseFactory promise_factory) {
|
426
|
-
|
426
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
427
427
|
spine_->SpawnInfallible(name, std::move(promise_factory));
|
428
428
|
}
|
429
429
|
|
430
430
|
template <typename PromiseFactory>
|
431
431
|
auto SpawnWaitable(absl::string_view name, PromiseFactory promise_factory) {
|
432
|
-
|
432
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
433
433
|
return spine_->SpawnWaitable(name, std::move(promise_factory));
|
434
434
|
}
|
435
435
|
|
436
436
|
bool WasCancelledPushed() const {
|
437
|
-
|
437
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
438
438
|
return spine_->call_filters().WasCancelledPushed();
|
439
439
|
}
|
440
440
|
|
441
441
|
Arena* arena() {
|
442
|
-
|
442
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
443
443
|
return spine_->arena();
|
444
444
|
}
|
445
445
|
Party* party() {
|
446
|
-
|
446
|
+
GRPC_DCHECK_NE(spine_.get(), nullptr);
|
447
447
|
return spine_.get();
|
448
448
|
}
|
449
449
|
|
@@ -535,7 +535,7 @@ class CallHandler {
|
|
535
535
|
}
|
536
536
|
|
537
537
|
void AddChildCall(const CallInitiator& initiator) {
|
538
|
-
|
538
|
+
GRPC_CHECK(initiator.spine_ != nullptr);
|
539
539
|
spine_->AddChildCall(initiator.spine_);
|
540
540
|
}
|
541
541
|
|
@@ -39,7 +39,6 @@
|
|
39
39
|
#include <string>
|
40
40
|
#include <utility>
|
41
41
|
|
42
|
-
#include "absl/log/check.h"
|
43
42
|
#include "absl/status/status.h"
|
44
43
|
#include "absl/strings/string_view.h"
|
45
44
|
#include "src/core/call/metadata.h"
|
@@ -54,6 +53,7 @@
|
|
54
53
|
#include "src/core/telemetry/stats_data.h"
|
55
54
|
#include "src/core/util/bitset.h"
|
56
55
|
#include "src/core/util/crash.h"
|
56
|
+
#include "src/core/util/grpc_check.h"
|
57
57
|
#include "src/core/util/latent_see.h"
|
58
58
|
#include "src/core/util/ref_counted.h"
|
59
59
|
#include "src/core/util/ref_counted_ptr.h"
|
@@ -376,7 +376,7 @@ void ClientCall::CommitBatch(const grpc_op* ops, size_t nops, void* notify_tag,
|
|
376
376
|
[this, out_status, out_status_details, out_error_string,
|
377
377
|
out_trailing_metadata]() {
|
378
378
|
auto* status = cancel_status_.Get();
|
379
|
-
|
379
|
+
GRPC_CHECK_NE(status, nullptr);
|
380
380
|
*out_status = static_cast<grpc_status_code>(status->code());
|
381
381
|
*out_status_details =
|
382
382
|
Slice::FromCopiedString(status->message()).TakeCSlice();
|
@@ -445,9 +445,10 @@ grpc_call* MakeClientCall(grpc_call* parent_call, uint32_t propagation_mask,
|
|
445
445
|
grpc_compression_options compression_options,
|
446
446
|
RefCountedPtr<Arena> arena,
|
447
447
|
RefCountedPtr<UnstartedCallDestination> destination) {
|
448
|
-
|
449
|
-
|
450
|
-
|
448
|
+
GRPC_DCHECK_NE(arena.get(), nullptr);
|
449
|
+
GRPC_DCHECK_NE(
|
450
|
+
arena->GetContext<grpc_event_engine::experimental::EventEngine>(),
|
451
|
+
nullptr);
|
451
452
|
return arena
|
452
453
|
->New<ClientCall>(parent_call, propagation_mask, cq, std::move(path),
|
453
454
|
std::move(authority), registered_method, deadline,
|