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
@@ -35,7 +35,6 @@
|
|
35
35
|
|
36
36
|
#include <vector>
|
37
37
|
|
38
|
-
#include "absl/log/check.h"
|
39
38
|
#include "absl/log/log.h"
|
40
39
|
#include "absl/strings/str_cat.h"
|
41
40
|
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
@@ -58,6 +57,7 @@
|
|
58
57
|
#include "src/core/lib/resource_quota/resource_quota.h"
|
59
58
|
#include "src/core/lib/slice/slice_internal.h"
|
60
59
|
#include "src/core/util/crash.h"
|
60
|
+
#include "src/core/util/grpc_check.h"
|
61
61
|
|
62
62
|
#define MIN_SAFE_ACCEPT_QUEUE_SIZE 100
|
63
63
|
|
@@ -123,6 +123,9 @@ struct grpc_tcp_server {
|
|
123
123
|
// List of closures passed to shutdown_starting_add().
|
124
124
|
grpc_closure_list shutdown_starting;
|
125
125
|
|
126
|
+
// List of closures passed to shutdown_ending_add().
|
127
|
+
grpc_closure_list shutdown_ending;
|
128
|
+
|
126
129
|
// shutdown callback
|
127
130
|
grpc_closure* shutdown_complete;
|
128
131
|
|
@@ -188,6 +191,8 @@ static grpc_error_handle tcp_server_create(grpc_closure* shutdown_complete,
|
|
188
191
|
s->tail = NULL;
|
189
192
|
s->shutdown_starting.head = NULL;
|
190
193
|
s->shutdown_starting.tail = NULL;
|
194
|
+
s->shutdown_ending.head = NULL;
|
195
|
+
s->shutdown_ending.tail = NULL;
|
191
196
|
s->shutdown_complete = shutdown_complete;
|
192
197
|
new (&s->ee_listener) std::unique_ptr<EventEngine::Listener>(nullptr);
|
193
198
|
*server = s;
|
@@ -219,6 +224,7 @@ static void finish_shutdown_locked(grpc_tcp_server* s) {
|
|
219
224
|
absl::OkStatus());
|
220
225
|
}
|
221
226
|
|
227
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &s->shutdown_ending);
|
222
228
|
grpc_core::ExecCtx::Run(
|
223
229
|
DEBUG_LOCATION,
|
224
230
|
GRPC_CLOSURE_CREATE(destroy_server, s, grpc_schedule_on_exec_ctx),
|
@@ -238,6 +244,14 @@ static void tcp_server_shutdown_starting_add(grpc_tcp_server* s,
|
|
238
244
|
gpr_mu_unlock(&s->mu);
|
239
245
|
}
|
240
246
|
|
247
|
+
static void tcp_server_shutdown_ending_add(grpc_tcp_server* s,
|
248
|
+
grpc_closure* shutdown_ending) {
|
249
|
+
gpr_mu_lock(&s->mu);
|
250
|
+
grpc_closure_list_append(&s->shutdown_ending, shutdown_ending,
|
251
|
+
absl::OkStatus());
|
252
|
+
gpr_mu_unlock(&s->mu);
|
253
|
+
}
|
254
|
+
|
241
255
|
static void tcp_server_destroy(grpc_tcp_server* s) {
|
242
256
|
grpc_tcp_listener* sp;
|
243
257
|
gpr_mu_lock(&s->mu);
|
@@ -303,7 +317,7 @@ static grpc_error_handle prepare_socket(SOCKET sock,
|
|
303
317
|
return absl::OkStatus();
|
304
318
|
|
305
319
|
failure:
|
306
|
-
|
320
|
+
GRPC_CHECK(!error.ok());
|
307
321
|
error = GRPC_ERROR_CREATE_REFERENCING("Failed to prepare server socket",
|
308
322
|
&error, 1);
|
309
323
|
if (sock != INVALID_SOCKET) closesocket(sock);
|
@@ -312,7 +326,7 @@ failure:
|
|
312
326
|
|
313
327
|
static void decrement_active_ports_and_notify_locked(grpc_tcp_listener* sp) {
|
314
328
|
sp->shutting_down = 0;
|
315
|
-
|
329
|
+
GRPC_CHECK_GT(sp->server->active_ports, 0u);
|
316
330
|
if (0 == --sp->server->active_ports) {
|
317
331
|
finish_shutdown_locked(sp->server);
|
318
332
|
}
|
@@ -370,7 +384,7 @@ static grpc_error_handle start_accept_locked(grpc_tcp_listener* port) {
|
|
370
384
|
return error;
|
371
385
|
|
372
386
|
failure:
|
373
|
-
|
387
|
+
GRPC_CHECK(!error.ok());
|
374
388
|
if (sock != INVALID_SOCKET) closesocket(sock);
|
375
389
|
return error;
|
376
390
|
}
|
@@ -463,7 +477,7 @@ static void on_accept(void* arg, grpc_error_handle error) {
|
|
463
477
|
// the former socked we created has now either been destroy or assigned
|
464
478
|
// to the new connection. We need to create a new one for the next
|
465
479
|
// connection.
|
466
|
-
|
480
|
+
GRPC_CHECK(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(sp)));
|
467
481
|
if (0 == --sp->outstanding_calls) {
|
468
482
|
decrement_active_ports_and_notify_locked(sp);
|
469
483
|
}
|
@@ -499,7 +513,7 @@ static grpc_error_handle add_socket_to_server(grpc_tcp_server* s, SOCKET sock,
|
|
499
513
|
return error;
|
500
514
|
}
|
501
515
|
|
502
|
-
|
516
|
+
GRPC_CHECK_GE(port, 0);
|
503
517
|
gpr_mu_lock(&s->mu);
|
504
518
|
sp = (grpc_tcp_listener*)gpr_malloc(sizeof(grpc_tcp_listener));
|
505
519
|
sp->next = NULL;
|
@@ -519,7 +533,7 @@ static grpc_error_handle add_socket_to_server(grpc_tcp_server* s, SOCKET sock,
|
|
519
533
|
sp->port = port;
|
520
534
|
sp->port_index = port_index;
|
521
535
|
GRPC_CLOSURE_INIT(&sp->on_accept, on_accept, sp, grpc_schedule_on_exec_ctx);
|
522
|
-
|
536
|
+
GRPC_CHECK(sp->socket);
|
523
537
|
gpr_mu_unlock(&s->mu);
|
524
538
|
*listener = sp;
|
525
539
|
|
@@ -596,7 +610,7 @@ done:
|
|
596
610
|
error = error_out;
|
597
611
|
*port = -1;
|
598
612
|
} else {
|
599
|
-
|
613
|
+
GRPC_CHECK(sp != NULL);
|
600
614
|
*port = sp->port;
|
601
615
|
}
|
602
616
|
return error;
|
@@ -606,9 +620,9 @@ static void tcp_server_start(grpc_tcp_server* s,
|
|
606
620
|
const std::vector<grpc_pollset*>* /*pollsets*/) {
|
607
621
|
grpc_tcp_listener* sp;
|
608
622
|
gpr_mu_lock(&s->mu);
|
609
|
-
|
623
|
+
GRPC_CHECK_EQ(s->active_ports, 0u);
|
610
624
|
for (sp = s->head; sp; sp = sp->next) {
|
611
|
-
|
625
|
+
GRPC_CHECK(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(sp)));
|
612
626
|
s->active_ports++;
|
613
627
|
}
|
614
628
|
gpr_mu_unlock(&s->mu);
|
@@ -637,12 +651,19 @@ static int tcp_pre_allocated_fd(grpc_tcp_server* /* s */) { return -1; }
|
|
637
651
|
static void tcp_set_pre_allocated_fd(grpc_tcp_server* /* s */, int /* fd */) {}
|
638
652
|
|
639
653
|
grpc_tcp_server_vtable grpc_windows_tcp_server_vtable = {
|
640
|
-
tcp_server_create,
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
654
|
+
tcp_server_create,
|
655
|
+
tcp_server_start,
|
656
|
+
tcp_server_add_port,
|
657
|
+
tcp_server_create_fd_handler,
|
658
|
+
tcp_server_port_fd_count,
|
659
|
+
tcp_server_port_fd,
|
660
|
+
tcp_server_ref,
|
661
|
+
tcp_server_shutdown_starting_add,
|
662
|
+
tcp_server_shutdown_ending_add,
|
663
|
+
tcp_server_unref,
|
664
|
+
tcp_server_shutdown_listeners,
|
665
|
+
tcp_pre_allocated_fd,
|
666
|
+
tcp_set_pre_allocated_fd};
|
646
667
|
|
647
668
|
// ---- EventEngine shim ------------------------------------------------------
|
648
669
|
|
@@ -655,7 +676,7 @@ static grpc_error_handle event_engine_create(grpc_closure* shutdown_complete,
|
|
655
676
|
grpc_tcp_server** server) {
|
656
677
|
grpc_tcp_server* s = (grpc_tcp_server*)gpr_malloc(sizeof(grpc_tcp_server));
|
657
678
|
new (&s->ee_listener) std::unique_ptr<EventEngine::Listener>(nullptr);
|
658
|
-
|
679
|
+
GRPC_CHECK_NE(on_accept_cb, nullptr);
|
659
680
|
auto accept_cb = [s, on_accept_cb, on_accept_cb_arg](
|
660
681
|
std::unique_ptr<EventEngine::Endpoint> endpoint,
|
661
682
|
MemoryAllocator memory_allocator) {
|
@@ -677,7 +698,7 @@ static grpc_error_handle event_engine_create(grpc_closure* shutdown_complete,
|
|
677
698
|
grpc_core::RefCountedPtr<grpc_core::ResourceQuota> resource_quota;
|
678
699
|
{
|
679
700
|
void* tmp_quota = config.GetVoidPointer(GRPC_ARG_RESOURCE_QUOTA);
|
680
|
-
|
701
|
+
GRPC_CHECK_NE(tmp_quota, nullptr);
|
681
702
|
resource_quota =
|
682
703
|
reinterpret_cast<grpc_core::ResourceQuota*>(tmp_quota)->Ref();
|
683
704
|
}
|
@@ -685,13 +706,13 @@ static grpc_error_handle event_engine_create(grpc_closure* shutdown_complete,
|
|
685
706
|
gpr_mu_init(&s->mu);
|
686
707
|
EventEngine* engine = reinterpret_cast<EventEngine*>(
|
687
708
|
config.GetVoidPointer(GRPC_INTERNAL_ARG_EVENT_ENGINE));
|
688
|
-
|
709
|
+
GRPC_CHECK_NE(engine, nullptr);
|
689
710
|
auto listener = engine->CreateListener(
|
690
711
|
std::move(accept_cb), std::move(on_shutdown), config,
|
691
712
|
std::make_unique<MemoryQuotaBasedMemoryAllocatorFactory>(
|
692
713
|
resource_quota->memory_quota()));
|
693
714
|
GRPC_RETURN_IF_ERROR(listener.status());
|
694
|
-
|
715
|
+
GRPC_CHECK_NE(listener->get(), nullptr);
|
695
716
|
GRPC_TRACE_LOG(event_engine, INFO)
|
696
717
|
<< "EventEngine::" << engine << ": created Listener::" << listener->get();
|
697
718
|
s->ee_listener = std::move(*listener);
|
@@ -706,6 +727,8 @@ static grpc_error_handle event_engine_create(grpc_closure* shutdown_complete,
|
|
706
727
|
s->tail = nullptr;
|
707
728
|
s->shutdown_starting.head = nullptr;
|
708
729
|
s->shutdown_starting.tail = nullptr;
|
730
|
+
s->shutdown_ending.head = nullptr;
|
731
|
+
s->shutdown_ending.tail = nullptr;
|
709
732
|
s->shutdown_complete = grpc_core::NewClosure([](absl::Status) {
|
710
733
|
grpc_core::Crash("iomgr shutdown_complete callback should be unused");
|
711
734
|
});
|
@@ -715,13 +738,13 @@ static grpc_error_handle event_engine_create(grpc_closure* shutdown_complete,
|
|
715
738
|
|
716
739
|
static void event_engine_start(grpc_tcp_server* s,
|
717
740
|
const std::vector<grpc_pollset*>* /*pollsets*/) {
|
718
|
-
|
741
|
+
GRPC_CHECK(s->ee_listener->Start().ok());
|
719
742
|
}
|
720
743
|
|
721
744
|
static grpc_error_handle event_engine_add_port(
|
722
745
|
grpc_tcp_server* s, const grpc_resolved_address* addr, int* port) {
|
723
|
-
|
724
|
-
|
746
|
+
GRPC_CHECK_NE(addr, nullptr);
|
747
|
+
GRPC_CHECK_NE(port, nullptr);
|
725
748
|
auto ee_addr = CreateResolvedAddress(*addr);
|
726
749
|
auto out_port = s->ee_listener->Bind(ee_addr);
|
727
750
|
*port = out_port.ok() ? *out_port : -1;
|
@@ -767,6 +790,7 @@ static void event_engine_unref(grpc_tcp_server* s) {
|
|
767
790
|
gpr_mu_unlock(&s->mu);
|
768
791
|
gpr_mu_destroy(&s->mu);
|
769
792
|
std::destroy_at(&s->ee_listener);
|
793
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &s->shutdown_ending);
|
770
794
|
gpr_free(s);
|
771
795
|
}
|
772
796
|
}
|
@@ -779,14 +803,29 @@ static void event_engine_shutdown_starting_add(
|
|
779
803
|
gpr_mu_unlock(&s->mu);
|
780
804
|
}
|
781
805
|
|
806
|
+
static void event_engine_shutdown_ending_add(grpc_tcp_server* s,
|
807
|
+
grpc_closure* shutdown_ending) {
|
808
|
+
gpr_mu_lock(&s->mu);
|
809
|
+
grpc_closure_list_append(&s->shutdown_ending, shutdown_ending,
|
810
|
+
absl::OkStatus());
|
811
|
+
gpr_mu_unlock(&s->mu);
|
812
|
+
}
|
813
|
+
|
782
814
|
} // namespace
|
783
815
|
|
784
816
|
grpc_tcp_server_vtable grpc_windows_event_engine_tcp_server_vtable = {
|
785
|
-
event_engine_create,
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
817
|
+
event_engine_create,
|
818
|
+
event_engine_start,
|
819
|
+
event_engine_add_port,
|
820
|
+
event_engine_create_fd_handler,
|
821
|
+
event_engine_port_fd_count,
|
822
|
+
event_engine_port_fd,
|
823
|
+
event_engine_ref,
|
824
|
+
event_engine_shutdown_starting_add,
|
825
|
+
event_engine_shutdown_ending_add,
|
826
|
+
event_engine_unref,
|
827
|
+
event_engine_shutdown_listeners,
|
828
|
+
tcp_pre_allocated_fd,
|
829
|
+
tcp_set_pre_allocated_fd};
|
791
830
|
|
792
831
|
#endif // GRPC_WINSOCK_SOCKET
|
@@ -27,7 +27,6 @@
|
|
27
27
|
#include <grpc/support/string_util.h>
|
28
28
|
#include <limits.h>
|
29
29
|
|
30
|
-
#include "absl/log/check.h"
|
31
30
|
#include "absl/log/log.h"
|
32
31
|
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
33
32
|
#include "src/core/lib/iomgr/iocp_windows.h"
|
@@ -40,6 +39,7 @@
|
|
40
39
|
#include "src/core/lib/slice/slice_internal.h"
|
41
40
|
#include "src/core/lib/slice/slice_string_helpers.h"
|
42
41
|
#include "src/core/util/crash.h"
|
42
|
+
#include "src/core/util/grpc_check.h"
|
43
43
|
#include "src/core/util/string.h"
|
44
44
|
#include "src/core/util/useful.h"
|
45
45
|
|
@@ -182,7 +182,7 @@ static void on_read(void* tcpp, grpc_error_handle error) {
|
|
182
182
|
grpc_slice_buffer_reset_and_unref(tcp->read_slices);
|
183
183
|
} else {
|
184
184
|
if (info->bytes_transferred != 0 && !tcp->shutting_down) {
|
185
|
-
|
185
|
+
GRPC_CHECK((size_t)info->bytes_transferred <= tcp->read_slices->length);
|
186
186
|
if (static_cast<size_t>(info->bytes_transferred) !=
|
187
187
|
tcp->read_slices->length) {
|
188
188
|
grpc_slice_buffer_trim_end(
|
@@ -191,7 +191,7 @@ static void on_read(void* tcpp, grpc_error_handle error) {
|
|
191
191
|
static_cast<size_t>(info->bytes_transferred),
|
192
192
|
&tcp->last_read_buffer);
|
193
193
|
}
|
194
|
-
|
194
|
+
GRPC_CHECK((size_t)info->bytes_transferred == tcp->read_slices->length);
|
195
195
|
|
196
196
|
if (GRPC_TRACE_FLAG_ENABLED(tcp) && ABSL_VLOG_IS_ON(2)) {
|
197
197
|
size_t i;
|
@@ -256,7 +256,7 @@ static void win_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices,
|
|
256
256
|
GRPC_SLICE_MALLOC(DEFAULT_TARGET_READ_SIZE));
|
257
257
|
}
|
258
258
|
|
259
|
-
|
259
|
+
GRPC_CHECK(tcp->read_slices->count <= MAX_WSABUF_COUNT);
|
260
260
|
for (i = 0; i < tcp->read_slices->count; i++) {
|
261
261
|
buffers[i].len = (ULONG)GRPC_SLICE_LENGTH(
|
262
262
|
tcp->read_slices->slices[i]); // we know slice size fits in 32bit.
|
@@ -313,7 +313,7 @@ static void on_write(void* tcpp, grpc_error_handle error) {
|
|
313
313
|
if (info->wsa_error != 0) {
|
314
314
|
error = GRPC_WSA_ERROR(info->wsa_error, "WSASend");
|
315
315
|
} else {
|
316
|
-
|
316
|
+
GRPC_CHECK(info->bytes_transferred <= tcp->write_slices->length);
|
317
317
|
}
|
318
318
|
}
|
319
319
|
|
@@ -359,7 +359,7 @@ static void win_write(grpc_endpoint* ep, grpc_slice_buffer* slices,
|
|
359
359
|
|
360
360
|
tcp->write_cb = cb;
|
361
361
|
tcp->write_slices = slices;
|
362
|
-
|
362
|
+
GRPC_CHECK(tcp->write_slices->count <= UINT_MAX);
|
363
363
|
if (tcp->write_slices->count > GPR_ARRAY_SIZE(local_buffers)) {
|
364
364
|
buffers = (WSABUF*)gpr_malloc(sizeof(WSABUF) * tcp->write_slices->count);
|
365
365
|
allocated = buffers;
|
@@ -367,7 +367,7 @@ static void win_write(grpc_endpoint* ep, grpc_slice_buffer* slices,
|
|
367
367
|
|
368
368
|
for (i = 0; i < tcp->write_slices->count; i++) {
|
369
369
|
len = GRPC_SLICE_LENGTH(tcp->write_slices->slices[i]);
|
370
|
-
|
370
|
+
GRPC_CHECK(len <= ULONG_MAX);
|
371
371
|
buffers[i].len = (ULONG)len;
|
372
372
|
buffers[i].buf = (char*)GRPC_SLICE_START_PTR(tcp->write_slices->slices[i]);
|
373
373
|
}
|
@@ -24,7 +24,6 @@
|
|
24
24
|
|
25
25
|
#include <string>
|
26
26
|
|
27
|
-
#include "absl/log/check.h"
|
28
27
|
#include "absl/log/log.h"
|
29
28
|
#include "absl/strings/str_cat.h"
|
30
29
|
#include "absl/strings/str_format.h"
|
@@ -34,6 +33,7 @@
|
|
34
33
|
#include "src/core/lib/iomgr/timer.h"
|
35
34
|
#include "src/core/lib/iomgr/timer_heap.h"
|
36
35
|
#include "src/core/util/crash.h"
|
36
|
+
#include "src/core/util/grpc_check.h"
|
37
37
|
#include "src/core/util/manual_constructor.h"
|
38
38
|
#include "src/core/util/spinlock.h"
|
39
39
|
#include "src/core/util/time.h"
|
@@ -116,7 +116,7 @@ static bool is_in_ht(grpc_timer* t) {
|
|
116
116
|
}
|
117
117
|
|
118
118
|
static void add_to_ht(grpc_timer* t) {
|
119
|
-
|
119
|
+
GRPC_CHECK(!t->hash_table_next);
|
120
120
|
size_t i = grpc_core::HashPointer(t, NUM_HASH_BUCKETS);
|
121
121
|
|
122
122
|
gpr_mu_lock(&g_hash_mu[i]);
|
@@ -22,11 +22,11 @@
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
#include <inttypes.h>
|
24
24
|
|
25
|
-
#include "absl/log/check.h"
|
26
25
|
#include "absl/log/log.h"
|
27
26
|
#include "src/core/lib/debug/trace.h"
|
28
27
|
#include "src/core/lib/iomgr/timer.h"
|
29
28
|
#include "src/core/util/crash.h"
|
29
|
+
#include "src/core/util/grpc_check.h"
|
30
30
|
#include "src/core/util/thd.h"
|
31
31
|
|
32
32
|
struct completed_thread {
|
@@ -80,7 +80,7 @@ static void gc_completed_threads(void) {
|
|
80
80
|
}
|
81
81
|
|
82
82
|
static void start_timer_thread_and_unlock(void) {
|
83
|
-
|
83
|
+
GRPC_CHECK(g_threaded);
|
84
84
|
++g_waiter_count;
|
85
85
|
++g_thread_count;
|
86
86
|
gpr_mu_unlock(&g_mu);
|
@@ -35,20 +35,20 @@
|
|
35
35
|
|
36
36
|
#include <grpc/support/alloc.h>
|
37
37
|
|
38
|
-
#include "absl/log/check.h"
|
39
38
|
#include "absl/strings/str_cat.h"
|
40
39
|
#include "src/core/lib/address_utils/parse_address.h"
|
41
40
|
#include "src/core/lib/iomgr/sockaddr.h"
|
42
41
|
#include "src/core/lib/iomgr/unix_sockets_posix.h"
|
43
42
|
#include "src/core/lib/transport/error_utils.h"
|
44
43
|
#include "src/core/util/crash.h"
|
44
|
+
#include "src/core/util/grpc_check.h"
|
45
45
|
#include "src/core/util/useful.h"
|
46
46
|
|
47
47
|
void grpc_create_socketpair_if_unix(int sv[2]) {
|
48
48
|
#ifdef GPR_WINDOWS
|
49
49
|
grpc_core::Crash("AF_UNIX socket pairs are not supported on Windows");
|
50
50
|
#else
|
51
|
-
|
51
|
+
GRPC_CHECK_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0);
|
52
52
|
#endif
|
53
53
|
}
|
54
54
|
|
@@ -24,13 +24,13 @@
|
|
24
24
|
|
25
25
|
#include <string>
|
26
26
|
|
27
|
-
#include "
|
27
|
+
#include "src/core/util/grpc_check.h"
|
28
28
|
|
29
29
|
void grpc_create_socketpair_if_unix(int /* sv */[2]) {
|
30
30
|
// TODO: Either implement this for the non-Unix socket case or make
|
31
31
|
// sure that it is never called in any such case. Until then, leave an
|
32
32
|
// assertion to notify if this gets called inadvertently
|
33
|
-
|
33
|
+
GRPC_CHECK(0);
|
34
34
|
}
|
35
35
|
|
36
36
|
absl::StatusOr<std::vector<grpc_resolved_address>>
|
@@ -19,11 +19,11 @@
|
|
19
19
|
|
20
20
|
#include <vector>
|
21
21
|
|
22
|
-
#include "absl/log/check.h"
|
23
22
|
#include "absl/strings/str_cat.h"
|
24
23
|
#include "absl/strings/str_format.h"
|
25
24
|
#include "absl/strings/str_join.h"
|
26
25
|
#include "src/core/util/atomic_utils.h"
|
26
|
+
#include "src/core/util/grpc_check.h"
|
27
27
|
|
28
28
|
namespace grpc_core {
|
29
29
|
|
@@ -55,7 +55,7 @@ class FreestandingActivity::Handle final : public Wakeable {
|
|
55
55
|
// Activity is going away... drop its reference and sever the connection back.
|
56
56
|
void DropActivity() ABSL_LOCKS_EXCLUDED(mu_) {
|
57
57
|
mu_.Lock();
|
58
|
-
|
58
|
+
GRPC_CHECK_NE(activity_, nullptr);
|
59
59
|
activity_ = nullptr;
|
60
60
|
mu_.Unlock();
|
61
61
|
Unref();
|
@@ -26,7 +26,6 @@
|
|
26
26
|
#include <utility>
|
27
27
|
|
28
28
|
#include "absl/base/thread_annotations.h"
|
29
|
-
#include "absl/log/check.h"
|
30
29
|
#include "absl/status/status.h"
|
31
30
|
#include "absl/strings/str_cat.h"
|
32
31
|
#include "src/core/lib/debug/trace.h"
|
@@ -36,6 +35,7 @@
|
|
36
35
|
#include "src/core/lib/promise/poll.h"
|
37
36
|
#include "src/core/util/construct_destruct.h"
|
38
37
|
#include "src/core/util/dump_args.h"
|
38
|
+
#include "src/core/util/grpc_check.h"
|
39
39
|
#include "src/core/util/latent_see.h"
|
40
40
|
#include "src/core/util/no_destruct.h"
|
41
41
|
#include "src/core/util/orphanable.h"
|
@@ -512,11 +512,11 @@ class PromiseActivity final
|
|
512
512
|
// We shouldn't destruct without calling Cancel() first, and that must get
|
513
513
|
// us to be done_, so we assume that and have no logic to destruct the
|
514
514
|
// promise here.
|
515
|
-
|
515
|
+
GRPC_CHECK(done_);
|
516
516
|
}
|
517
517
|
|
518
518
|
void RunScheduledWakeup() {
|
519
|
-
|
519
|
+
GRPC_CHECK(wakeup_scheduled_.exchange(false, std::memory_order_acq_rel));
|
520
520
|
Step();
|
521
521
|
WakeupComplete();
|
522
522
|
}
|
@@ -582,7 +582,7 @@ class PromiseActivity final
|
|
582
582
|
// Notification that we're no longer executing - it's ok to destruct the
|
583
583
|
// promise.
|
584
584
|
void MarkDone() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) {
|
585
|
-
|
585
|
+
GRPC_CHECK(!std::exchange(done_, true));
|
586
586
|
ScopedContext contexts(this);
|
587
587
|
Destruct(&promise_holder_.promise);
|
588
588
|
}
|
@@ -629,10 +629,10 @@ class PromiseActivity final
|
|
629
629
|
// Until there are no wakeups from within and the promise is incomplete:
|
630
630
|
// poll the promise.
|
631
631
|
std::optional<ResultType> StepLoop() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) {
|
632
|
-
|
632
|
+
GRPC_CHECK(is_current());
|
633
633
|
while (true) {
|
634
634
|
// Run the promise.
|
635
|
-
|
635
|
+
GRPC_CHECK(!done_);
|
636
636
|
auto r = promise_holder_.promise();
|
637
637
|
if (auto* status = r.value_if_ready()) {
|
638
638
|
// If complete, destroy the promise, flag done, and exit this loop.
|
@@ -19,9 +19,9 @@
|
|
19
19
|
|
20
20
|
#include <utility>
|
21
21
|
|
22
|
-
#include "absl/log/check.h"
|
23
22
|
#include "absl/meta/type_traits.h"
|
24
23
|
#include "src/core/util/down_cast.h"
|
24
|
+
#include "src/core/util/grpc_check.h"
|
25
25
|
|
26
26
|
namespace grpc_core {
|
27
27
|
|
@@ -113,7 +113,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline bool HasContext() {
|
|
113
113
|
template <typename T>
|
114
114
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline T* GetContext() {
|
115
115
|
auto* p = promise_detail::Context<T>::get();
|
116
|
-
|
116
|
+
GRPC_DCHECK_NE(p, nullptr);
|
117
117
|
return p;
|
118
118
|
}
|
119
119
|
|
@@ -23,13 +23,13 @@
|
|
23
23
|
#include <type_traits>
|
24
24
|
#include <utility>
|
25
25
|
|
26
|
-
#include "absl/log/check.h"
|
27
26
|
#include "absl/log/log.h"
|
28
27
|
#include "src/core/lib/debug/trace.h"
|
29
28
|
#include "src/core/lib/promise/detail/promise_like.h"
|
30
29
|
#include "src/core/lib/promise/poll.h"
|
31
30
|
#include "src/core/util/bitset.h"
|
32
31
|
#include "src/core/util/construct_destruct.h"
|
32
|
+
#include "src/core/util/grpc_check.h"
|
33
33
|
|
34
34
|
namespace grpc_core {
|
35
35
|
namespace promise_detail {
|
@@ -62,7 +62,7 @@ struct JoinState<Traits, P0, P1> {
|
|
62
62
|
JoinState& operator=(const JoinState& other) = delete;
|
63
63
|
JoinState& operator=(JoinState&& other) = delete;
|
64
64
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
65
|
-
|
65
|
+
GRPC_DCHECK(other.ready.none());
|
66
66
|
Construct(&promise0, std::move(other.promise0));
|
67
67
|
Construct(&promise1, std::move(other.promise1));
|
68
68
|
}
|
@@ -165,7 +165,7 @@ struct JoinState<Traits, P0, P1, P2> {
|
|
165
165
|
JoinState& operator=(const JoinState& other) = delete;
|
166
166
|
JoinState& operator=(JoinState&& other) = delete;
|
167
167
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
168
|
-
|
168
|
+
GRPC_DCHECK(other.ready.none());
|
169
169
|
Construct(&promise0, std::move(other.promise0));
|
170
170
|
Construct(&promise1, std::move(other.promise1));
|
171
171
|
Construct(&promise2, std::move(other.promise2));
|
@@ -305,7 +305,7 @@ struct JoinState<Traits, P0, P1, P2, P3> {
|
|
305
305
|
JoinState& operator=(const JoinState& other) = delete;
|
306
306
|
JoinState& operator=(JoinState&& other) = delete;
|
307
307
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
308
|
-
|
308
|
+
GRPC_DCHECK(other.ready.none());
|
309
309
|
Construct(&promise0, std::move(other.promise0));
|
310
310
|
Construct(&promise1, std::move(other.promise1));
|
311
311
|
Construct(&promise2, std::move(other.promise2));
|
@@ -481,7 +481,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4> {
|
|
481
481
|
JoinState& operator=(const JoinState& other) = delete;
|
482
482
|
JoinState& operator=(JoinState&& other) = delete;
|
483
483
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
484
|
-
|
484
|
+
GRPC_DCHECK(other.ready.none());
|
485
485
|
Construct(&promise0, std::move(other.promise0));
|
486
486
|
Construct(&promise1, std::move(other.promise1));
|
487
487
|
Construct(&promise2, std::move(other.promise2));
|
@@ -693,7 +693,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5> {
|
|
693
693
|
JoinState& operator=(const JoinState& other) = delete;
|
694
694
|
JoinState& operator=(JoinState&& other) = delete;
|
695
695
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
696
|
-
|
696
|
+
GRPC_DCHECK(other.ready.none());
|
697
697
|
Construct(&promise0, std::move(other.promise0));
|
698
698
|
Construct(&promise1, std::move(other.promise1));
|
699
699
|
Construct(&promise2, std::move(other.promise2));
|
@@ -941,7 +941,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6> {
|
|
941
941
|
JoinState& operator=(const JoinState& other) = delete;
|
942
942
|
JoinState& operator=(JoinState&& other) = delete;
|
943
943
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
944
|
-
|
944
|
+
GRPC_DCHECK(other.ready.none());
|
945
945
|
Construct(&promise0, std::move(other.promise0));
|
946
946
|
Construct(&promise1, std::move(other.promise1));
|
947
947
|
Construct(&promise2, std::move(other.promise2));
|
@@ -1225,7 +1225,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6, P7> {
|
|
1225
1225
|
JoinState& operator=(const JoinState& other) = delete;
|
1226
1226
|
JoinState& operator=(JoinState&& other) = delete;
|
1227
1227
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
1228
|
-
|
1228
|
+
GRPC_DCHECK(other.ready.none());
|
1229
1229
|
Construct(&promise0, std::move(other.promise0));
|
1230
1230
|
Construct(&promise1, std::move(other.promise1));
|
1231
1231
|
Construct(&promise2, std::move(other.promise2));
|
@@ -1544,7 +1544,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6, P7, P8> {
|
|
1544
1544
|
JoinState& operator=(const JoinState& other) = delete;
|
1545
1545
|
JoinState& operator=(JoinState&& other) = delete;
|
1546
1546
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION JoinState(JoinState&& other) noexcept {
|
1547
|
-
|
1547
|
+
GRPC_DCHECK(other.ready.none());
|
1548
1548
|
Construct(&promise0, std::move(other.promise0));
|
1549
1549
|
Construct(&promise1, std::move(other.promise1));
|
1550
1550
|
Construct(&promise2, std::move(other.promise2));
|