grpc 1.70.1 → 1.71.0
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 +43 -79
- data/include/grpc/event_engine/endpoint_config.h +5 -5
- data/include/grpc/event_engine/event_engine.h +44 -5
- data/include/grpc/status.h +1 -1
- data/include/grpc/support/json.h +16 -16
- data/src/core/call/request_buffer.cc +22 -22
- data/src/core/call/request_buffer.h +4 -4
- data/src/core/channelz/channelz.cc +2 -2
- data/src/core/channelz/channelz.h +3 -22
- data/src/core/channelz/channelz_registry.cc +0 -7
- data/src/core/client_channel/client_channel.cc +16 -26
- data/src/core/client_channel/client_channel.h +2 -2
- data/src/core/client_channel/client_channel_filter.cc +54 -131
- data/src/core/client_channel/client_channel_filter.h +10 -6
- data/src/core/client_channel/client_channel_plugin.cc +2 -1
- data/src/core/client_channel/client_channel_service_config.cc +1 -1
- data/src/core/client_channel/client_channel_service_config.h +5 -5
- data/src/core/client_channel/direct_channel.cc +1 -1
- data/src/core/client_channel/direct_channel.h +1 -1
- data/src/core/client_channel/lb_metadata.cc +7 -8
- data/src/core/client_channel/lb_metadata.h +3 -3
- data/src/core/client_channel/load_balanced_call_destination.cc +4 -4
- data/src/core/client_channel/retry_filter.cc +1 -1
- data/src/core/client_channel/retry_filter.h +1 -1
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +10 -12
- data/src/core/client_channel/retry_filter_legacy_call_data.h +7 -7
- data/src/core/client_channel/retry_interceptor.cc +16 -14
- data/src/core/client_channel/retry_interceptor.h +2 -2
- data/src/core/client_channel/retry_service_config.cc +1 -1
- data/src/core/client_channel/retry_service_config.h +3 -3
- data/src/core/client_channel/subchannel.cc +43 -76
- data/src/core/client_channel/subchannel.h +4 -4
- data/src/core/client_channel/subchannel_stream_client.cc +0 -1
- data/src/core/client_channel/subchannel_stream_client.h +3 -3
- data/src/core/config/config_vars.cc +1 -0
- data/src/core/config/config_vars.h +1 -0
- data/src/core/config/load_config.cc +3 -2
- data/src/core/config/load_config.h +1 -1
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +4 -11
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.h +7 -7
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +1 -1
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +8 -15
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +6 -6
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +0 -7
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +6 -6
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.cc +1 -6
- data/src/core/ext/filters/http/client/http_client_filter.h +4 -4
- data/src/core/ext/filters/http/client_authority_filter.cc +6 -11
- data/src/core/ext/filters/http/client_authority_filter.h +6 -6
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +18 -22
- data/src/core/ext/filters/http/message_compress/compression_filter.h +18 -13
- data/src/core/ext/filters/http/server/http_server_filter.cc +3 -8
- data/src/core/ext/filters/http/server/http_server_filter.h +4 -4
- data/src/core/ext/filters/message_size/message_size_filter.cc +13 -25
- data/src/core/ext/filters/message_size/message_size_filter.h +20 -21
- data/src/core/ext/filters/rbac/rbac_filter.cc +0 -7
- data/src/core/ext/filters/rbac/rbac_filter.h +6 -6
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +1 -6
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +4 -4
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc +1 -1
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +2 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +1 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +4 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +30 -20
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +5 -5
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h +4 -4
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +84 -59
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +7 -7
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame.h +5 -5
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +8 -8
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +32 -31
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +6 -7
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +3 -3
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +2 -2
- data/src/core/ext/transport/chttp2/transport/internal.h +19 -8
- data/src/core/ext/transport/chttp2/transport/parsing.cc +14 -14
- data/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +2 -2
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +1 -39
- data/src/core/ext/transport/chttp2/transport/varint.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +16 -22
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -3
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +15 -10
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +16 -0
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +3 -2
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +30 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +5 -3
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +118 -0
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +31 -6
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +37 -7
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +7 -5
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +142 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +55 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h +32 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h +33 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c +7 -4
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c +6 -4
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +50 -47
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +210 -199
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +33 -33
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +19 -17
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h +33 -0
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.c +26 -19
- data/src/core/filter/blackboard.cc +2 -2
- data/src/core/filter/filter_args.h +2 -2
- data/src/core/handshaker/handshaker.cc +0 -3
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +3 -5
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +31 -32
- data/src/core/handshaker/http_connect/http_proxy_mapper.h +4 -4
- data/src/core/handshaker/http_connect/xds_http_proxy_mapper.cc +5 -5
- data/src/core/handshaker/http_connect/xds_http_proxy_mapper.h +5 -5
- data/src/core/handshaker/proxy_mapper.h +4 -4
- data/src/core/handshaker/proxy_mapper_registry.cc +5 -6
- data/src/core/handshaker/proxy_mapper_registry.h +4 -4
- data/src/core/handshaker/security/secure_endpoint.cc +2 -2
- data/src/core/handshaker/security/security_handshaker.cc +3 -5
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +6 -4
- data/src/core/lib/channel/channel_args.cc +13 -13
- data/src/core/lib/channel/channel_args.h +8 -8
- data/src/core/lib/channel/connected_channel.cc +1 -1
- data/src/core/lib/channel/promise_based_filter.cc +9 -9
- data/src/core/lib/channel/promise_based_filter.h +79 -80
- data/src/core/lib/compression/compression.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +9 -9
- data/src/core/lib/compression/compression_internal.h +3 -3
- data/src/core/lib/debug/trace_flags.cc +3 -2
- data/src/core/lib/debug/trace_flags.h +1 -1
- data/src/core/lib/event_engine/ares_resolver.cc +9 -11
- data/src/core/lib/event_engine/ares_resolver.h +6 -10
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +2 -4
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +2 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +6 -7
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -4
- data/src/core/lib/event_engine/cf_engine/cftype_unique_ref.h +2 -4
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +3 -7
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +2 -4
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +5 -7
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +6 -7
- data/src/core/lib/event_engine/common_closures.h +2 -4
- data/src/core/lib/event_engine/default_event_engine.cc +62 -33
- data/src/core/lib/event_engine/default_event_engine.h +24 -33
- data/src/core/lib/event_engine/default_event_engine_factory.cc +6 -12
- data/src/core/lib/event_engine/default_event_engine_factory.h +2 -4
- data/src/core/lib/event_engine/event_engine.cc +2 -4
- data/src/core/lib/event_engine/extensions/can_track_errors.h +2 -4
- data/src/core/lib/event_engine/extensions/chaotic_good_extension.h +2 -4
- data/src/core/lib/event_engine/extensions/supports_fd.h +2 -4
- data/src/core/lib/event_engine/extensions/tcp_trace.h +2 -4
- data/src/core/lib/event_engine/forkable.cc +2 -4
- data/src/core/lib/event_engine/forkable.h +2 -4
- data/src/core/lib/event_engine/grpc_polled_fd.h +2 -4
- data/src/core/lib/event_engine/handle_containers.h +2 -4
- data/src/core/lib/event_engine/memory_allocator_factory.h +2 -4
- data/src/core/lib/event_engine/poller.h +2 -4
- data/src/core/lib/event_engine/posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +4 -50
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +2 -4
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +4 -51
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller.h +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h +2 -4
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +2 -4
- data/src/core/lib/event_engine/posix_engine/lockfree_event.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/lockfree_event.h +2 -4
- data/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +6 -10
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_closure.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +3 -5
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +2 -4
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +5 -6
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +2 -4
- data/src/core/lib/event_engine/posix_engine/timer.cc +4 -6
- data/src/core/lib/event_engine/posix_engine/timer.h +4 -6
- data/src/core/lib/event_engine/posix_engine/timer_heap.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/timer_heap.h +2 -4
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +5 -7
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +4 -6
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +4 -8
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +24 -25
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +2 -4
- data/src/core/lib/event_engine/query_extensions.h +2 -4
- data/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h +2 -4
- data/src/core/lib/event_engine/resolved_address.cc +2 -4
- data/src/core/lib/event_engine/resolved_address_internal.h +2 -4
- data/src/core/lib/event_engine/shim.cc +2 -4
- data/src/core/lib/event_engine/shim.h +2 -4
- data/src/core/lib/event_engine/slice.cc +2 -4
- data/src/core/lib/event_engine/slice_buffer.cc +2 -4
- data/src/core/lib/event_engine/tcp_socket_utils.cc +6 -8
- data/src/core/lib/event_engine/tcp_socket_utils.h +5 -7
- data/src/core/lib/event_engine/thread_local.cc +2 -4
- data/src/core/lib/event_engine/thread_local.h +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_count.cc +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_count.h +4 -18
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +2 -4
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +3 -5
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +2 -4
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +2 -4
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h +2 -4
- data/src/core/lib/event_engine/time_util.cc +2 -4
- data/src/core/lib/event_engine/time_util.h +2 -4
- data/src/core/lib/event_engine/utils.cc +2 -4
- data/src/core/lib/event_engine/utils.h +2 -4
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +2 -4
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +2 -4
- data/src/core/lib/event_engine/windows/iocp.cc +2 -4
- data/src/core/lib/event_engine/windows/iocp.h +2 -4
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +2 -4
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.h +2 -4
- data/src/core/lib/event_engine/windows/win_socket.cc +2 -4
- data/src/core/lib/event_engine/windows/win_socket.h +2 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +2 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.h +4 -6
- data/src/core/lib/event_engine/windows/windows_engine.cc +2 -4
- data/src/core/lib/event_engine/windows/windows_engine.h +2 -4
- data/src/core/lib/event_engine/windows/windows_listener.cc +2 -4
- data/src/core/lib/event_engine/windows/windows_listener.h +2 -4
- data/src/core/lib/event_engine/work_queue/basic_work_queue.cc +2 -4
- data/src/core/lib/event_engine/work_queue/basic_work_queue.h +2 -4
- data/src/core/lib/event_engine/work_queue/work_queue.h +2 -4
- data/src/core/lib/experiments/experiments.cc +102 -213
- data/src/core/lib/experiments/experiments.h +53 -89
- data/src/core/lib/iomgr/buffer_list.h +22 -21
- data/src/core/lib/iomgr/cfstream_handle.cc +0 -2
- data/src/core/lib/iomgr/closure.h +1 -4
- data/src/core/lib/iomgr/combiner.cc +0 -1
- data/src/core/lib/iomgr/error.cc +2 -2
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +0 -1
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +0 -2
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +0 -1
- data/src/core/lib/iomgr/exec_ctx.cc +1 -7
- data/src/core/lib/iomgr/exec_ctx.h +1 -132
- data/src/core/lib/iomgr/executor.cc +0 -11
- data/src/core/lib/iomgr/resolve_address_posix.cc +0 -2
- data/src/core/lib/iomgr/resolve_address_windows.cc +0 -2
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -2
- data/src/core/lib/iomgr/tcp_posix.cc +3 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +1 -3
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
- data/src/core/lib/iomgr/timer_manager.cc +1 -9
- data/src/core/lib/promise/activity.h +4 -4
- data/src/core/lib/promise/detail/join_state.h +16 -68
- data/src/core/lib/promise/detail/promise_factory.h +85 -25
- data/src/core/lib/promise/detail/promise_like.h +16 -19
- data/src/core/lib/promise/detail/seq_state.h +102 -315
- data/src/core/lib/promise/for_each.h +14 -5
- data/src/core/lib/promise/if.h +48 -20
- data/src/core/lib/promise/interceptor_list.h +9 -9
- data/src/core/lib/promise/latch.h +14 -6
- data/src/core/lib/promise/loop.h +58 -18
- data/src/core/lib/promise/map.h +103 -49
- data/src/core/lib/promise/party.cc +48 -14
- data/src/core/lib/promise/party.h +216 -27
- data/src/core/lib/promise/pipe.h +12 -12
- data/src/core/lib/promise/poll.h +8 -5
- data/src/core/lib/promise/prioritized_race.h +16 -22
- data/src/core/lib/promise/promise.h +2 -3
- data/src/core/lib/promise/race.h +4 -12
- data/src/core/lib/promise/seq.h +41 -6
- data/src/core/lib/promise/sleep.cc +3 -3
- data/src/core/lib/promise/sleep.h +14 -1
- data/src/core/lib/promise/status_flag.h +9 -3
- data/src/core/lib/promise/try_join.h +119 -5
- data/src/core/lib/promise/try_seq.h +39 -12
- data/src/core/lib/resource_quota/arena.h +79 -0
- data/src/core/lib/resource_quota/memory_quota.cc +53 -49
- data/src/core/lib/resource_quota/memory_quota.h +4 -4
- data/src/core/lib/security/authorization/evaluate_args.cc +3 -3
- data/src/core/lib/security/authorization/evaluate_args.h +3 -3
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +0 -7
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +6 -6
- data/src/core/lib/security/authorization/matchers.h +3 -3
- data/src/core/lib/security/authorization/rbac_policy.cc +1 -1
- data/src/core/lib/security/authorization/rbac_policy.h +3 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +1 -2
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +1 -3
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +0 -1
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +1 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +2 -2
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +1 -1
- data/src/core/lib/security/credentials/iam/iam_credentials.h +2 -2
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +1 -2
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +2 -2
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +0 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +4 -4
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +3 -3
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +0 -1
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +2 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +12 -13
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +14 -14
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +23 -15
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc +0 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h +1 -2
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +2 -2
- data/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.cc +4 -5
- data/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h +4 -4
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +2 -1
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +1 -1
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +3 -3
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +1 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +9 -9
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +13 -13
- data/src/core/lib/security/transport/auth_filters.h +95 -7
- data/src/core/lib/security/transport/client_auth_filter.cc +96 -6
- data/src/core/lib/security/transport/server_auth_filter.cc +0 -8
- data/src/core/lib/slice/slice_buffer.cc +2 -2
- data/src/core/lib/slice/slice_buffer.h +2 -2
- data/src/core/lib/surface/call.cc +0 -4
- data/src/core/lib/surface/call.h +4 -3
- data/src/core/lib/surface/call_utils.cc +2 -2
- data/src/core/lib/surface/call_utils.h +8 -4
- data/src/core/lib/surface/channel.cc +6 -14
- data/src/core/lib/surface/channel.h +3 -3
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/client_call.cc +13 -6
- data/src/core/lib/surface/client_call.h +2 -2
- data/src/core/lib/surface/completion_queue.cc +10 -49
- data/src/core/lib/surface/filter_stack_call.cc +2 -4
- data/src/core/lib/surface/filter_stack_call.h +1 -1
- data/src/core/lib/surface/init.cc +17 -12
- data/src/core/lib/surface/legacy_channel.cc +10 -8
- data/src/core/lib/surface/legacy_channel.h +2 -2
- data/src/core/lib/surface/server_call.cc +23 -6
- data/src/core/lib/surface/server_call.h +2 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/call_filters.h +100 -59
- data/src/core/lib/transport/call_spine.cc +32 -34
- data/src/core/lib/transport/call_spine.h +66 -23
- data/src/core/lib/transport/call_state.h +8 -8
- data/src/core/lib/transport/connectivity_state.cc +8 -9
- data/src/core/lib/transport/connectivity_state.h +2 -4
- data/src/core/lib/transport/http2_errors.h +5 -3
- data/src/core/lib/transport/interception_chain.h +27 -7
- data/src/core/lib/transport/metadata.h +88 -0
- data/src/core/lib/transport/metadata_batch.cc +2 -2
- data/src/core/lib/transport/metadata_batch.h +79 -18
- data/src/core/lib/transport/timeout_encoding.cc +15 -15
- data/src/core/lib/transport/timeout_encoding.h +3 -2
- data/src/core/lib/transport/transport.cc +0 -1
- data/src/core/lib/transport/transport.h +12 -7
- data/src/core/load_balancing/backend_metric_parser.cc +21 -28
- data/src/core/load_balancing/endpoint_list.cc +1 -1
- data/src/core/load_balancing/endpoint_list.h +7 -7
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +1 -6
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.h +4 -4
- data/src/core/load_balancing/grpclb/grpclb.cc +21 -38
- data/src/core/load_balancing/health_check_client.cc +16 -48
- data/src/core/load_balancing/health_check_client_internal.h +7 -7
- data/src/core/load_balancing/lb_policy.cc +4 -6
- data/src/core/load_balancing/lb_policy.h +4 -4
- data/src/core/load_balancing/lb_policy_registry.cc +10 -8
- data/src/core/load_balancing/outlier_detection/outlier_detection.cc +57 -68
- data/src/core/load_balancing/outlier_detection/outlier_detection.h +4 -3
- data/src/core/load_balancing/pick_first/pick_first.cc +21 -21
- data/src/core/load_balancing/priority/priority.cc +8 -13
- data/src/core/load_balancing/ring_hash/ring_hash.cc +54 -90
- data/src/core/load_balancing/rls/rls.cc +105 -194
- data/src/core/load_balancing/rls/rls.h +97 -1
- data/src/core/load_balancing/round_robin/round_robin.cc +5 -5
- data/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc +4 -4
- data/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h +2 -2
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +8 -14
- data/src/core/load_balancing/weighted_target/weighted_target.cc +7 -15
- data/src/core/load_balancing/xds/cds.cc +11 -15
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +15 -18
- data/src/core/load_balancing/xds/xds_cluster_manager.cc +10 -18
- data/src/core/load_balancing/xds/xds_override_host.cc +45 -92
- data/src/core/load_balancing/xds/xds_wrr_locality.cc +10 -12
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +7 -7
- data/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +10 -15
- data/src/core/resolver/dns/native/dns_resolver.cc +1 -1
- data/src/core/resolver/fake/fake_resolver.cc +10 -11
- data/src/core/resolver/fake/fake_resolver.h +2 -2
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +9 -12
- data/src/core/resolver/polling_resolver.cc +2 -5
- data/src/core/resolver/polling_resolver.h +3 -3
- data/src/core/resolver/resolver_registry.cc +4 -3
- data/src/core/resolver/xds/xds_config.cc +6 -6
- data/src/core/resolver/xds/xds_config.h +2 -2
- data/src/core/resolver/xds/xds_dependency_manager.cc +80 -77
- data/src/core/resolver/xds/xds_dependency_manager.h +4 -0
- data/src/core/resolver/xds/xds_resolver.cc +53 -75
- data/src/core/server/server.cc +71 -79
- data/src/core/server/server.h +16 -5
- data/src/core/server/server_call_tracer_filter.cc +3 -7
- data/src/core/server/server_config_selector_filter.cc +8 -15
- data/src/core/server/xds_server_config_fetcher.cc +16 -18
- data/src/core/service_config/service_config_channel_arg_filter.cc +7 -19
- data/src/core/service_config/service_config_impl.cc +3 -3
- data/src/core/telemetry/call_tracer.cc +8 -8
- data/src/core/telemetry/call_tracer.h +6 -5
- data/src/core/telemetry/metrics.cc +3 -3
- data/src/core/telemetry/metrics.h +2 -8
- data/src/core/telemetry/tcp_tracer.h +32 -32
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +2 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +14 -14
- data/src/core/tsi/fake_transport_security.cc +5 -0
- data/src/core/util/dump_args.h +1 -9
- data/src/core/util/env.h +3 -4
- data/src/core/util/examine_stack.cc +2 -2
- data/src/core/util/examine_stack.h +3 -4
- data/src/core/util/gpr_time.cc +0 -2
- data/src/core/util/http_client/httpcli.cc +4 -5
- data/src/core/util/http_client/httpcli.h +4 -4
- data/src/core/util/http_client/httpcli_security_connector.cc +2 -2
- data/src/core/util/json/json_channel_args.h +2 -1
- data/src/core/util/json/json_object_loader.cc +4 -4
- data/src/core/util/json/json_object_loader.h +12 -12
- data/src/core/util/json/json_reader.cc +4 -4
- data/src/core/util/json/json_writer.cc +3 -3
- data/src/core/util/latent_see.cc +3 -3
- data/src/core/util/latent_see.h +2 -2
- data/src/core/util/linux/env.cc +3 -4
- data/src/core/util/lru_cache.h +4 -4
- data/src/core/util/match.h +7 -7
- data/src/core/util/matchers.cc +1 -2
- data/src/core/util/matchers.h +2 -2
- data/src/core/util/posix/env.cc +2 -2
- data/src/core/util/posix/sync.cc +0 -1
- data/src/core/util/posix/time.cc +0 -1
- data/src/core/util/ring_buffer.h +4 -5
- data/src/core/util/status_helper.cc +16 -20
- data/src/core/util/status_helper.h +5 -5
- data/src/core/util/sync_abseil.cc +0 -1
- data/src/core/util/table.h +6 -21
- data/src/core/util/time.cc +1 -1
- data/src/core/util/time.h +3 -3
- data/src/core/util/time_precise.cc +0 -1
- data/src/core/util/type_list.h +56 -0
- data/src/core/util/uri.cc +6 -4
- data/src/core/util/uri.h +7 -0
- data/src/core/util/useful.h +4 -4
- data/src/core/util/validation_errors.cc +5 -5
- data/src/core/util/wait_for_single_owner.h +62 -0
- data/src/core/util/windows/env.cc +3 -3
- data/src/core/util/windows/sync.cc +0 -1
- data/src/core/util/windows/time.cc +0 -1
- data/src/core/util/work_serializer.cc +27 -267
- data/src/core/util/work_serializer.h +3 -27
- data/src/core/xds/grpc/certificate_provider_store.cc +12 -17
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -2
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +1 -1
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +11 -14
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +2 -2
- data/src/core/xds/grpc/xds_certificate_provider.cc +15 -15
- data/src/core/xds/grpc/xds_client_grpc.cc +7 -8
- data/src/core/xds/grpc/xds_cluster.h +4 -4
- data/src/core/xds/grpc/xds_cluster_parser.cc +26 -26
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +4 -4
- data/src/core/xds/grpc/xds_common_types.cc +2 -2
- data/src/core/xds/grpc/xds_common_types.h +4 -4
- data/src/core/xds/grpc/xds_common_types_parser.cc +29 -31
- data/src/core/xds/grpc/xds_common_types_parser.h +8 -7
- data/src/core/xds/grpc/xds_endpoint.cc +3 -4
- data/src/core/xds/grpc/xds_endpoint_parser.cc +14 -14
- data/src/core/xds/grpc/xds_health_status.cc +4 -4
- data/src/core/xds/grpc/xds_health_status.h +4 -3
- data/src/core/xds/grpc/xds_http_fault_filter.cc +18 -20
- data/src/core/xds/grpc/xds_http_fault_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_filter.h +3 -3
- data/src/core/xds/grpc/xds_http_filter_registry.cc +7 -7
- data/src/core/xds/grpc/xds_http_filter_registry.h +3 -3
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +7 -7
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +30 -23
- data/src/core/xds/grpc/xds_http_rbac_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +10 -10
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +4 -3
- data/src/core/xds/grpc/xds_lb_policy_registry.cc +4 -4
- data/src/core/xds/grpc/xds_listener.cc +4 -6
- data/src/core/xds/grpc/xds_listener.h +10 -10
- data/src/core/xds/grpc/xds_listener_parser.cc +58 -51
- data/src/core/xds/grpc/xds_listener_parser.h +2 -1
- data/src/core/xds/grpc/xds_metadata.cc +5 -5
- data/src/core/xds/grpc/xds_metadata_parser.cc +65 -52
- data/src/core/xds/grpc/xds_route_config.cc +9 -15
- data/src/core/xds/grpc/xds_route_config.h +9 -9
- data/src/core/xds/grpc/xds_route_config_parser.cc +114 -116
- data/src/core/xds/grpc/xds_route_config_parser.h +4 -4
- data/src/core/xds/grpc/xds_routing.cc +6 -6
- data/src/core/xds/grpc/xds_routing.h +5 -5
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -1
- data/src/core/xds/grpc/xds_server_grpc.h +5 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +33 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +5 -6
- data/src/core/xds/xds_client/lrs_client.cc +71 -83
- data/src/core/xds/xds_client/lrs_client.h +8 -8
- data/src/core/xds/xds_client/xds_api.cc +5 -5
- data/src/core/xds/xds_client/xds_bootstrap.cc +11 -1
- data/src/core/xds/xds_client/xds_bootstrap.h +7 -0
- data/src/core/xds/xds_client/xds_client.cc +552 -359
- data/src/core/xds/xds_client/xds_client.h +39 -14
- data/src/core/xds/xds_client/xds_resource_type.h +2 -3
- data/src/core/xds/xds_client/xds_resource_type_impl.h +3 -3
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.cc +17 -59
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strex.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.cc +41 -76
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.cc +17 -91
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/asn1/posix_time.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bcm_support.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.cc +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/bio/errno.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.cc +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.cc +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.cc +18 -58
- data/third_party/boringssl-with-bazel/src/crypto/bio/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.cc +15 -51
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.cc +17 -60
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{bn_extra → bn}/bn_asn1.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{bn_extra → bn}/convert.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.cc +14 -57
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.cc +23 -15
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +18 -18
- data/third_party/boringssl-with-bazel/src/crypto/cipher/derive_key.cc +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_aesctrhmac.cc +18 -23
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_aesgcmsiv.cc +20 -13
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_chacha20poly1305.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_des.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/cipher/e_null.cc +51 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_rc2.cc +27 -69
- data/third_party/boringssl-with-bazel/src/crypto/cipher/e_rc4.cc +54 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/e_tls.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cipher/get_cipher.cc +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/internal.h +29 -69
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/tls_cbc.cc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf.cc +14 -58
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_apple.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_fuchsia.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_linux.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_openbsd.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_sysreg.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_freebsd.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_intel.cc +13 -67
- data/third_party/boringssl-with-bazel/src/crypto/crypto.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_64_adx.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.cc +15 -13
- data/third_party/boringssl-with-bazel/src/crypto/des/des.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/des/internal.h +27 -69
- data/third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.cc +124 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh_extra → dh}/params.cc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/{digest_extra → digest}/digest_extra.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.cc +13 -58
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.cc +13 -53
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra → ec}/ec_asn1.cc +24 -61
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra → ec}/ec_derive.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra → ec}/hash_to_curve.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra → ec}/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/ecdh/ecdh.cc +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/{ecdsa_extra → ecdsa}/ecdsa_asn1.cc +17 -61
- data/third_party/boringssl-with-bazel/src/crypto/engine/engine.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/err/err.cc +17 -107
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.cc +29 -79
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.cc +122 -198
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/evp/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dh.cc +15 -8
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dh_asn1.cc +13 -8
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.cc +56 -110
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.cc +20 -66
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_hkdf.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.cc +19 -57
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.cc +29 -77
- data/third_party/boringssl-with-bazel/src/crypto/evp/print.cc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.cc +13 -8
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.cc +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.cc.inc +112 -48
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes → aes}/cbc.cc.inc +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes → aes}/cfb.cc.inc +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/ctr.cc.inc +100 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes → aes}/gcm.cc.inc +127 -314
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes → aes}/gcm_nohw.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +419 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.cc.inc +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.cc.inc +13 -53
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/ofb.cc.inc +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes → aes}/polyval.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.cc +28 -20
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm_interface.h +501 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +15 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.cc.inc +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.cc.inc +16 -109
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.cc.inc +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +25 -134
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.cc.inc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.cc.inc +14 -109
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.cc.inc +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.cc.inc +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.cc.inc +18 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h +20 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.cc.inc +13 -53
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.cc.inc +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.cc.inc +69 -283
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aesccm.cc.inc +21 -58
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h +14 -65
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cmac/cmac.cc.inc +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digestsign/digestsign.cc.inc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/builtin_curves.h +91 -91
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.cc.inc +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.cc.inc +14 -72
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.cc.inc +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +19 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.cc.inc +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz-table.h +15 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.cc.inc +22 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.h +22 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.cc.inc +21 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.cc.inc +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.cc.inc +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.cc.inc +14 -65
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hkdf/hkdf.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/{keccak → fipsmodule/keccak}/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{keccak/keccak.cc → fipsmodule/keccak/keccak.cc.inc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/mldsa/mldsa.cc.inc +1993 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/mlkem/mlkem.cc.inc +1165 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.cc.inc +18 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +18 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.cc.inc +15 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.cc.inc +14 -109
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +13 -56
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.cc.inc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.cc.inc +18 -77
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.cc.inc +38 -90
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/internal.h +34 -34
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/service_indicator.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +44 -56
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.cc.inc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/{slhdsa → fipsmodule/slhdsa}/address.h +28 -32
- data/third_party/boringssl-with-bazel/src/crypto/{slhdsa/fors.cc → fipsmodule/slhdsa/fors.cc.inc} +44 -44
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/fors.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/{slhdsa/merkle.cc → fipsmodule/slhdsa/merkle.cc.inc} +46 -46
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/merkle.h +70 -0
- data/third_party/boringssl-with-bazel/src/crypto/{slhdsa → fipsmodule/slhdsa}/params.h +20 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/slhdsa.cc.inc +329 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/thash.cc.inc +173 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/thash.h +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/{slhdsa/wots.cc → fipsmodule/slhdsa/wots.cc.inc} +46 -46
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/wots.h +50 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.cc.inc +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.cc +21 -13
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +62 -205
- data/third_party/boringssl-with-bazel/src/crypto/kyber/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/kyber/kyber.cc +52 -28
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +31 -75
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/md4/md4.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/md5/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/md5/md5.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/mem.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.cc +47 -1747
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc +97 -1042
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/internal.h +44 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.cc +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.cc +18 -58
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.cc +56 -103
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.cc +15 -13
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pool/pool.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/deterministic.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/fork_detect.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rand/forkunsafe.cc +44 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/getentropy.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/getrandom_fillin.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rand/ios.cc +42 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/passive.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/rand_extra.cc → rand/rand.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rand/sysrand_internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand/trusty.cc +46 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/urandom.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/windows.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/refcount.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rsa/internal.h +36 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rsa_extra → rsa}/rsa_asn1.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/{rsa_extra → rsa}/rsa_crypt.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/rsa/rsa_extra.cc +19 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa/rsa_print.cc +27 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha1.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha256.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha512.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/slhdsa.cc +62 -256
- data/third_party/boringssl-with-bazel/src/crypto/spake2plus/internal.h +204 -0
- data/third_party/boringssl-with-bazel/src/crypto/spake2plus/spake2plus.cc +501 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/thread.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/thread_none.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.cc +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.cc +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.cc +25 -71
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/ext_dat.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/policy.cc +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_akey.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_akeya.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_alt.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bcons.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bitst.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_conf.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_cpols.cc +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_crld.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_enum.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_extku.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_genn.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_ia5.cc +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_info.cc +17 -66
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_int.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_lib.cc +14 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_ncons.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_ocsp.cc +13 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_pcons.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_pmaps.cc +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_prn.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_purp.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_skey.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_utl.cc +17 -70
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.cc +14 -60
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.cc +13 -58
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.cc +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.cc +13 -55
- data/third_party/boringssl-with-bazel/src/gen/crypto/err_data.cc +465 -451
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +13 -47
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +13 -51
- data/third_party/boringssl-with-bazel/src/include/openssl/asm_base.h +14 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +23 -62
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +14 -56
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +15 -53
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/bcm_public.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/blowfish.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +14 -121
- data/third_party/boringssl-with-bazel/src/include/openssl/buf.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +31 -16
- data/third_party/boringssl-with-bazel/src/include/openssl/cast.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +31 -59
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ctrdrbg.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +13 -58
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +14 -66
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +14 -71
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdh.h +14 -65
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +13 -51
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +13 -107
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/ex_data.h +13 -107
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/kyber.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/kdf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/md4.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/md5.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/mldsa.h +13 -19
- data/third_party/boringssl-with-bazel/src/include/openssl/mlkem.h +13 -37
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +27 -69
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +22 -60
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/posix_time.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/rc4.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/ripemd.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +13 -58
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/service_indicator.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/slhdsa.h +54 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +19 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +198 -174
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +14 -114
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/target.h +23 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/time.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +27 -156
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +15 -15
- data/third_party/boringssl-with-bazel/src/include/openssl/type_check.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +14 -61
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3_errors.h +13 -53
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +13 -8
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +15 -114
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +13 -55
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +13 -110
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +17 -115
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +13 -55
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +16 -115
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +32 -34
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +314 -132
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +19 -16
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +23 -123
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +55 -174
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +26 -157
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +104 -240
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +22 -120
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +16 -148
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +16 -110
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +16 -16
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +14 -81
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +15 -20
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +14 -113
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +19 -145
- data/third_party/boringssl-with-bazel/src/ssl/ssl_credential.cc +164 -37
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +13 -109
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +15 -17
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +51 -184
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +23 -67
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +25 -144
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +14 -82
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +20 -143
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +15 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +15 -139
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +28 -156
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +16 -16
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +91 -43
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +68 -80
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +154 -52
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +13 -55
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +15 -109
- metadata +75 -66
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.cc +0 -127
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.cc +0 -152
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.cc +0 -93
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.cc +0 -96
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.cc +0 -165
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.cc +0 -124
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.cc.inc +0 -196
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +0 -448
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.cc.inc +0 -87
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/internal.h +0 -76
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/internal.h +0 -90
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.cc +0 -44
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.cc +0 -42
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/sysrand_internal.h +0 -37
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.cc +0 -46
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/internal.h +0 -79
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_extra.cc +0 -17
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.cc +0 -22
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/fors.h +0 -58
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/internal.h +0 -63
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/merkle.h +0 -70
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/thash.cc +0 -173
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/thash.h +0 -85
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/wots.h +0 -50
@@ -24,6 +24,7 @@
|
|
24
24
|
#include <algorithm>
|
25
25
|
#include <functional>
|
26
26
|
#include <memory>
|
27
|
+
#include <optional>
|
27
28
|
#include <string>
|
28
29
|
#include <type_traits>
|
29
30
|
#include <vector>
|
@@ -37,7 +38,6 @@
|
|
37
38
|
#include "absl/strings/str_split.h"
|
38
39
|
#include "absl/strings/string_view.h"
|
39
40
|
#include "absl/strings/strip.h"
|
40
|
-
#include "absl/types/optional.h"
|
41
41
|
#include "envoy/config/core/v3/base.upb.h"
|
42
42
|
#include "envoy/service/discovery/v3/discovery.upb.h"
|
43
43
|
#include "envoy/service/discovery/v3/discovery.upbdefs.h"
|
@@ -111,7 +111,7 @@ class XdsClient::XdsChannel::RetryableCall final
|
|
111
111
|
|
112
112
|
// Retry state.
|
113
113
|
BackOff backoff_;
|
114
|
-
|
114
|
+
std::optional<EventEngine::TaskHandle> timer_handle_
|
115
115
|
ABSL_GUARDED_BY(&XdsClient::mu_);
|
116
116
|
|
117
117
|
bool shutting_down_ = false;
|
@@ -124,7 +124,10 @@ class XdsClient::XdsChannel::AdsCall final
|
|
124
124
|
// The ctor and dtor should not be used directly.
|
125
125
|
explicit AdsCall(RefCountedPtr<RetryableCall<AdsCall>> retryable_call);
|
126
126
|
|
127
|
-
|
127
|
+
// Disable thread-safety analysis because this method is called via
|
128
|
+
// OrphanablePtr<>, but there's no way to pass the lock annotation
|
129
|
+
// through there.
|
130
|
+
void Orphan() override ABSL_NO_THREAD_SAFETY_ANALYSIS;
|
128
131
|
|
129
132
|
RetryableCall<AdsCall>* retryable_call() const {
|
130
133
|
return retryable_call_.get();
|
@@ -204,14 +207,20 @@ class XdsClient::XdsChannel::AdsCall final
|
|
204
207
|
// optimize by not resending the resource that we already have.
|
205
208
|
auto& authority_state =
|
206
209
|
ads_call->xds_client()->authority_state_map_[name_.authority];
|
207
|
-
ResourceState& state = authority_state.
|
210
|
+
ResourceState& state = authority_state.type_map[type_][name_.key];
|
208
211
|
if (state.HasResource()) return;
|
209
212
|
// Start timer.
|
210
213
|
ads_call_ = std::move(ads_call);
|
214
|
+
Duration timeout = ads_call_->xds_client()->request_timeout_;
|
215
|
+
if (timeout == Duration::Zero()) {
|
216
|
+
timeout = XdsDataErrorHandlingEnabled() &&
|
217
|
+
ads_call_->xds_channel()
|
218
|
+
->server_.ResourceTimerIsTransientFailure()
|
219
|
+
? Duration::Seconds(30)
|
220
|
+
: Duration::Seconds(15);
|
221
|
+
}
|
211
222
|
timer_handle_ = ads_call_->xds_client()->engine()->RunAfter(
|
212
|
-
|
213
|
-
[self = Ref(DEBUG_LOCATION, "timer")]() {
|
214
|
-
ApplicationCallbackExecCtx callback_exec_ctx;
|
223
|
+
timeout, [self = Ref(DEBUG_LOCATION, "timer")]() {
|
215
224
|
ExecCtx exec_ctx;
|
216
225
|
self->OnTimer();
|
217
226
|
});
|
@@ -223,7 +232,7 @@ class XdsClient::XdsChannel::AdsCall final
|
|
223
232
|
timer_handle_.reset();
|
224
233
|
auto& authority_state =
|
225
234
|
ads_call_->xds_client()->authority_state_map_[name_.authority];
|
226
|
-
ResourceState& state = authority_state.
|
235
|
+
ResourceState& state = authority_state.type_map[type_][name_.key];
|
227
236
|
// We might have received the resource after the timer fired but before
|
228
237
|
// the callback ran.
|
229
238
|
if (!state.HasResource()) {
|
@@ -236,13 +245,20 @@ class XdsClient::XdsChannel::AdsCall final
|
|
236
245
|
name_.authority, type_->type_url(), name_.key)
|
237
246
|
<< "} from xds server";
|
238
247
|
resource_seen_ = true;
|
239
|
-
|
248
|
+
if (XdsDataErrorHandlingEnabled() &&
|
249
|
+
ads_call_->xds_channel()
|
250
|
+
->server_.ResourceTimerIsTransientFailure()) {
|
251
|
+
state.SetTimeout(
|
252
|
+
absl::StrCat("timeout obtaining resource from xDS server ",
|
253
|
+
ads_call_->xds_channel()->server_uri()));
|
254
|
+
} else {
|
255
|
+
state.SetDoesNotExistOnTimeout();
|
256
|
+
}
|
240
257
|
ads_call_->xds_client()->NotifyWatchersOnResourceChanged(
|
241
|
-
|
258
|
+
state.failed_status(), state.watchers(),
|
242
259
|
ReadDelayHandle::NoWait());
|
243
260
|
}
|
244
261
|
}
|
245
|
-
ads_call_->xds_client()->work_serializer_.DrainQueue();
|
246
262
|
ads_call_.reset();
|
247
263
|
}
|
248
264
|
|
@@ -257,7 +273,7 @@ class XdsClient::XdsChannel::AdsCall final
|
|
257
273
|
// stream or (b) declared the resource to not exist due to the timer
|
258
274
|
// firing.
|
259
275
|
bool resource_seen_ ABSL_GUARDED_BY(&XdsClient::mu_) = false;
|
260
|
-
|
276
|
+
std::optional<EventEngine::TaskHandle> timer_handle_
|
261
277
|
ABSL_GUARDED_BY(&XdsClient::mu_);
|
262
278
|
};
|
263
279
|
|
@@ -319,6 +335,11 @@ class XdsClient::XdsChannel::AdsCall final
|
|
319
335
|
absl::string_view serialized_resource,
|
320
336
|
DecodeContext* context)
|
321
337
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_);
|
338
|
+
void HandleServerReportedResourceError(size_t idx,
|
339
|
+
absl::string_view resource_name,
|
340
|
+
absl::Status status,
|
341
|
+
DecodeContext* context)
|
342
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_);
|
322
343
|
absl::Status DecodeAdsResponse(absl::string_view encoded_response,
|
323
344
|
DecodeContext* context)
|
324
345
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_);
|
@@ -427,16 +448,12 @@ void XdsClient::XdsChannel::Orphaned() ABSL_NO_THREAD_SAFETY_ANALYSIS {
|
|
427
448
|
|
428
449
|
void XdsClient::XdsChannel::ResetBackoff() { transport_->ResetBackoff(); }
|
429
450
|
|
430
|
-
XdsClient::XdsChannel::AdsCall* XdsClient::XdsChannel::ads_call() const {
|
431
|
-
return ads_call_->call();
|
432
|
-
}
|
433
|
-
|
434
451
|
void XdsClient::XdsChannel::SubscribeLocked(const XdsResourceType* type,
|
435
452
|
const XdsResourceName& name) {
|
436
453
|
if (ads_call_ == nullptr) {
|
437
454
|
// Start the ADS call if this is the first request.
|
438
|
-
ads_call_
|
439
|
-
|
455
|
+
ads_call_ = MakeOrphanable<RetryableCall<AdsCall>>(
|
456
|
+
WeakRef(DEBUG_LOCATION, "XdsChannel+ads"));
|
440
457
|
// Note: AdsCall's ctor will automatically subscribe to all
|
441
458
|
// resources that the XdsClient already has watchers for, so we can
|
442
459
|
// return here.
|
@@ -444,9 +461,9 @@ void XdsClient::XdsChannel::SubscribeLocked(const XdsResourceType* type,
|
|
444
461
|
}
|
445
462
|
// If the ADS call is in backoff state, we don't need to do anything now
|
446
463
|
// because when the call is restarted it will resend all necessary requests.
|
447
|
-
if (
|
464
|
+
if (ads_call_->call() == nullptr) return;
|
448
465
|
// Subscribe to this resource if the ADS call is active.
|
449
|
-
|
466
|
+
ads_call_->call()->SubscribeLocked(type, name, /*delay_send=*/false);
|
450
467
|
}
|
451
468
|
|
452
469
|
void XdsClient::XdsChannel::UnsubscribeLocked(const XdsResourceType* type,
|
@@ -459,6 +476,12 @@ void XdsClient::XdsChannel::UnsubscribeLocked(const XdsResourceType* type,
|
|
459
476
|
if (!call->HasSubscribedResources()) {
|
460
477
|
ads_call_.reset();
|
461
478
|
}
|
479
|
+
} else {
|
480
|
+
// If there is currently no ADS call because we're in retry backoff,
|
481
|
+
// then we immediately trigger deletion of unsubscribed cache entries.
|
482
|
+
// This may orphan the XdsChannel, which would stop the retry
|
483
|
+
// timer, since we would no longer need to restart the ADS call.
|
484
|
+
xds_client_->MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(this, type);
|
462
485
|
}
|
463
486
|
}
|
464
487
|
}
|
@@ -478,10 +501,12 @@ bool XdsClient::XdsChannel::MaybeFallbackLocked(
|
|
478
501
|
++i) {
|
479
502
|
authority_state.xds_channels.emplace_back(
|
480
503
|
xds_client_->GetOrCreateXdsChannelLocked(*xds_servers[i], "fallback"));
|
481
|
-
for (const auto&
|
482
|
-
for (const auto&
|
483
|
-
|
484
|
-
|
504
|
+
for (const auto& [type, resource_map] : authority_state.type_map) {
|
505
|
+
for (const auto& [key, resource_state] : resource_map) {
|
506
|
+
if (resource_state.HasWatchers()) {
|
507
|
+
authority_state.xds_channels.back()->SubscribeLocked(
|
508
|
+
type, {authority, key});
|
509
|
+
}
|
485
510
|
}
|
486
511
|
}
|
487
512
|
GRPC_TRACE_LOG(xds_client, INFO)
|
@@ -502,28 +527,32 @@ void XdsClient::XdsChannel::SetHealthyLocked() {
|
|
502
527
|
// 1. Channel is on the list of authority channels
|
503
528
|
// 2. Channel is not the last channel on the list (i.e. not the active
|
504
529
|
// channel)
|
505
|
-
for (auto& authority : xds_client_->authority_state_map_) {
|
506
|
-
auto& channels =
|
530
|
+
for (auto& [authority, authority_state] : xds_client_->authority_state_map_) {
|
531
|
+
auto& channels = authority_state.xds_channels;
|
507
532
|
// Skip if channel is active.
|
508
533
|
if (channels.back() == this) continue;
|
509
534
|
auto channel_it = std::find(channels.begin(), channels.end(), this);
|
510
535
|
// Skip if this is not on the list
|
511
536
|
if (channel_it != channels.end()) {
|
512
537
|
GRPC_TRACE_LOG(xds_client, INFO)
|
513
|
-
<< "[xds_client " << xds_client_.get() << "] authority "
|
514
|
-
<<
|
538
|
+
<< "[xds_client " << xds_client_.get() << "] authority " << authority
|
539
|
+
<< ": Falling forward to " << server_.server_uri();
|
515
540
|
// Lower priority channels are no longer needed, connection is back!
|
541
|
+
// Note that we move the lower priority channels out of the vector
|
542
|
+
// before we unref them, or else
|
543
|
+
// MaybeRemoveUnsubscribedCacheEntriesForTypeLocked() will try to
|
544
|
+
// access the vector while we are modifying it.
|
545
|
+
std::vector<RefCountedPtr<XdsChannel>> channels_to_unref(
|
546
|
+
std::make_move_iterator(channel_it + 1),
|
547
|
+
std::make_move_iterator(channels.end()));
|
516
548
|
channels.erase(channel_it + 1, channels.end());
|
517
549
|
}
|
518
550
|
}
|
519
551
|
}
|
520
552
|
|
521
553
|
void XdsClient::XdsChannel::OnConnectivityFailure(absl::Status status) {
|
522
|
-
|
523
|
-
|
524
|
-
SetChannelStatusLocked(std::move(status));
|
525
|
-
}
|
526
|
-
xds_client_->work_serializer_.DrainQueue();
|
554
|
+
MutexLock lock(&xds_client_->mu_);
|
555
|
+
SetChannelStatusLocked(std::move(status));
|
527
556
|
}
|
528
557
|
|
529
558
|
void XdsClient::XdsChannel::SetChannelStatusLocked(absl::Status status) {
|
@@ -542,17 +571,18 @@ void XdsClient::XdsChannel::SetChannelStatusLocked(absl::Status status) {
|
|
542
571
|
// Find all watchers for this channel.
|
543
572
|
WatcherSet watchers_cached;
|
544
573
|
WatcherSet watchers_uncached;
|
545
|
-
for (auto&
|
546
|
-
if (
|
547
|
-
|
574
|
+
for (auto& [authority, authority_state] : xds_client_->authority_state_map_) {
|
575
|
+
if (authority_state.xds_channels.empty() ||
|
576
|
+
authority_state.xds_channels.back() != this ||
|
577
|
+
MaybeFallbackLocked(authority, authority_state)) {
|
548
578
|
continue;
|
549
579
|
}
|
550
|
-
for (const auto&
|
551
|
-
for (const auto&
|
580
|
+
for (const auto& [_, resource_map] : authority_state.type_map) {
|
581
|
+
for (const auto& [_, resource_state] : resource_map) {
|
552
582
|
auto& watchers =
|
553
|
-
|
554
|
-
for (const auto&
|
555
|
-
watchers.insert(
|
583
|
+
resource_state.HasResource() ? watchers_cached : watchers_uncached;
|
584
|
+
for (const auto& watcher : resource_state.watchers()) {
|
585
|
+
watchers.insert(watcher);
|
556
586
|
}
|
557
587
|
}
|
558
588
|
}
|
@@ -631,7 +661,6 @@ void XdsClient::XdsChannel::RetryableCall<T>::StartRetryTimerLocked() {
|
|
631
661
|
timer_handle_ = xds_channel()->xds_client()->engine()->RunAfter(
|
632
662
|
delay,
|
633
663
|
[self = this->Ref(DEBUG_LOCATION, "RetryableCall+retry_timer_start")]() {
|
634
|
-
ApplicationCallbackExecCtx callback_exec_ctx;
|
635
664
|
ExecCtx exec_ctx;
|
636
665
|
self->OnRetryTimer();
|
637
666
|
});
|
@@ -699,30 +728,37 @@ XdsClient::XdsChannel::AdsCall::AdsCall(
|
|
699
728
|
<< ", streaming_call: " << streaming_call_.get() << ")";
|
700
729
|
// If this is a reconnect, add any necessary subscriptions from what's
|
701
730
|
// already in the cache.
|
702
|
-
for (auto&
|
703
|
-
|
704
|
-
auto it = std::find(
|
705
|
-
|
731
|
+
for (auto& [authority, authority_state] :
|
732
|
+
xds_client()->authority_state_map_) {
|
733
|
+
auto it = std::find(authority_state.xds_channels.begin(),
|
734
|
+
authority_state.xds_channels.end(), xds_channel());
|
706
735
|
// Skip authorities that are not using this xDS channel. The channel can be
|
707
736
|
// anywhere in the list.
|
708
|
-
if (it ==
|
709
|
-
for (const auto&
|
710
|
-
const
|
711
|
-
|
712
|
-
|
713
|
-
|
737
|
+
if (it == authority_state.xds_channels.end()) continue;
|
738
|
+
for (const auto& [type, resource_map] : authority_state.type_map) {
|
739
|
+
for (const auto& [resource_key, resource_state] : resource_map) {
|
740
|
+
if (resource_state.HasWatchers()) {
|
741
|
+
SubscribeLocked(type, {authority, resource_key}, /*delay_send=*/true);
|
742
|
+
}
|
714
743
|
}
|
715
744
|
}
|
716
745
|
}
|
717
746
|
// Send initial message if we added any subscriptions above.
|
718
|
-
for (const auto&
|
719
|
-
SendMessageLocked(
|
747
|
+
for (const auto& [type, _] : state_map_) {
|
748
|
+
SendMessageLocked(type);
|
720
749
|
}
|
721
750
|
streaming_call_->StartRecvMessage();
|
722
751
|
}
|
723
752
|
|
724
753
|
void XdsClient::XdsChannel::AdsCall::Orphan() {
|
725
754
|
state_map_.clear();
|
755
|
+
// We may have unsubscriptions for which we have not yet actually sent
|
756
|
+
// unsubscribe messages, and now we never will, so do a pass to delete
|
757
|
+
// any cache entries for which we've unsubscribed.
|
758
|
+
for (const auto& [_, type] : xds_client()->resource_types_) {
|
759
|
+
xds_client()->MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(
|
760
|
+
xds_channel(), type);
|
761
|
+
}
|
726
762
|
// Note that the initial ref is held by the StreamEventHandler, which
|
727
763
|
// will be destroyed when streaming_call_ is destroyed, which may not happen
|
728
764
|
// here, since there may be other refs held to streaming_call_ by internal
|
@@ -761,8 +797,8 @@ void XdsClient::XdsChannel::AdsCall::UnsubscribeLocked(
|
|
761
797
|
}
|
762
798
|
|
763
799
|
bool XdsClient::XdsChannel::AdsCall::HasSubscribedResources() const {
|
764
|
-
for (const auto&
|
765
|
-
if (!
|
800
|
+
for (const auto& [_, resource_type_state] : state_map_) {
|
801
|
+
if (!resource_type_state.subscribed_resources.empty()) return true;
|
766
802
|
}
|
767
803
|
return false;
|
768
804
|
}
|
@@ -861,6 +897,8 @@ void XdsClient::XdsChannel::AdsCall::SendMessageLocked(
|
|
861
897
|
buffered_requests_.insert(type);
|
862
898
|
return;
|
863
899
|
}
|
900
|
+
xds_client()->MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(xds_channel(),
|
901
|
+
type);
|
864
902
|
auto& state = state_map_[type];
|
865
903
|
std::string serialized_message = CreateAdsRequest(
|
866
904
|
type->type_url(), xds_channel()->resource_type_version_map_[type],
|
@@ -883,9 +921,10 @@ void XdsClient::XdsChannel::AdsCall::OnRequestSent(bool ok) {
|
|
883
921
|
// resource timer if needed.
|
884
922
|
if (ok) {
|
885
923
|
auto& resource_type_state = state_map_[send_message_pending_];
|
886
|
-
for (const auto&
|
887
|
-
|
888
|
-
|
924
|
+
for (const auto& [_, resource_map] :
|
925
|
+
resource_type_state.subscribed_resources) {
|
926
|
+
for (auto& [_, resource_timer] : resource_map) {
|
927
|
+
resource_timer->MaybeMarkSubscriptionSendComplete(
|
889
928
|
Ref(DEBUG_LOCATION, "ResourceTimer"));
|
890
929
|
}
|
891
930
|
}
|
@@ -925,8 +964,8 @@ void XdsClient::XdsChannel::AdsCall::ParseResource(
|
|
925
964
|
}
|
926
965
|
// Parse the resource.
|
927
966
|
XdsResourceType::DecodeContext resource_type_context = {
|
928
|
-
xds_client(), xds_channel()->server_,
|
929
|
-
|
967
|
+
xds_client(), xds_channel()->server_, xds_client()->def_pool_.ptr(),
|
968
|
+
context->arena.ptr()};
|
930
969
|
XdsResourceType::DecodeResult decode_result =
|
931
970
|
context->type->Decode(resource_type_context, serialized_resource);
|
932
971
|
// If we didn't already have the resource name from the Resource
|
@@ -961,13 +1000,14 @@ void XdsClient::XdsChannel::AdsCall::ParseResource(
|
|
961
1000
|
return;
|
962
1001
|
}
|
963
1002
|
// Cancel resource-does-not-exist timer, if needed.
|
964
|
-
auto
|
965
|
-
|
966
|
-
auto
|
1003
|
+
if (auto it = state_map_.find(context->type); it != state_map_.end()) {
|
1004
|
+
auto& resource_type_state = it->second;
|
1005
|
+
auto authority_it = resource_type_state.subscribed_resources.find(
|
967
1006
|
parsed_resource_name->authority);
|
968
|
-
if (
|
969
|
-
auto
|
970
|
-
|
1007
|
+
if (authority_it != resource_type_state.subscribed_resources.end()) {
|
1008
|
+
auto& resource_map = authority_it->second;
|
1009
|
+
auto res_it = resource_map.find(parsed_resource_name->key);
|
1010
|
+
if (res_it != resource_map.end()) {
|
971
1011
|
res_it->second->MarkSeen();
|
972
1012
|
}
|
973
1013
|
}
|
@@ -978,50 +1018,35 @@ void XdsClient::XdsChannel::AdsCall::ParseResource(
|
|
978
1018
|
if (authority_it == xds_client()->authority_state_map_.end()) {
|
979
1019
|
return; // Skip resource -- we don't have a subscription for it.
|
980
1020
|
}
|
981
|
-
// Found authority, so look up type.
|
982
1021
|
AuthorityState& authority_state = authority_it->second;
|
983
|
-
|
984
|
-
|
1022
|
+
// Found authority, so look up type.
|
1023
|
+
auto type_it = authority_state.type_map.find(context->type);
|
1024
|
+
if (type_it == authority_state.type_map.end()) {
|
985
1025
|
return; // Skip resource -- we don't have a subscription for it.
|
986
1026
|
}
|
987
1027
|
auto& type_map = type_it->second;
|
988
1028
|
// Found type, so look up resource key.
|
989
|
-
auto
|
990
|
-
if (
|
1029
|
+
auto res_it = type_map.find(parsed_resource_name->key);
|
1030
|
+
if (res_it == type_map.end()) {
|
991
1031
|
return; // Skip resource -- we don't have a subscription for it.
|
992
1032
|
}
|
993
|
-
ResourceState& resource_state =
|
1033
|
+
ResourceState& resource_state = res_it->second;
|
994
1034
|
// If needed, record that we've seen this resource.
|
995
1035
|
if (context->type->AllResourcesRequiredInSotW()) {
|
996
1036
|
context->resources_seen[parsed_resource_name->authority].insert(
|
997
1037
|
parsed_resource_name->key);
|
998
1038
|
}
|
999
|
-
// If we previously ignored the resource's deletion, log that we're
|
1000
|
-
// now re-adding it.
|
1001
|
-
if (resource_state.ignored_deletion()) {
|
1002
|
-
LOG(INFO) << "[xds_client " << xds_client() << "] xds server "
|
1003
|
-
<< xds_channel()->server_.server_uri()
|
1004
|
-
<< ": server returned new version of resource for which we "
|
1005
|
-
"previously ignored a deletion: type "
|
1006
|
-
<< type_url << " name " << resource_name;
|
1007
|
-
resource_state.set_ignored_deletion(false);
|
1008
|
-
}
|
1009
1039
|
// Update resource state based on whether the resource is valid.
|
1010
|
-
absl::Status status = absl::InvalidArgumentError(
|
1011
|
-
absl::StrCat("invalid resource: ", decode_status.ToString()));
|
1012
1040
|
if (!decode_status.ok()) {
|
1013
|
-
if (!resource_state.HasResource()) {
|
1014
|
-
xds_client()->NotifyWatchersOnResourceChanged(std::move(status),
|
1015
|
-
resource_state.watchers(),
|
1016
|
-
context->read_delay_handle);
|
1017
|
-
} else {
|
1018
|
-
xds_client()->NotifyWatchersOnAmbientError(std::move(status),
|
1019
|
-
resource_state.watchers(),
|
1020
|
-
context->read_delay_handle);
|
1021
|
-
}
|
1022
|
-
resource_state.SetNacked(context->version, decode_status.ToString(),
|
1023
|
-
context->update_time);
|
1024
1041
|
++context->num_invalid_resources;
|
1042
|
+
// If the fail_on_data_errors server feature is present, drop the
|
1043
|
+
// existing cached resource, if any.
|
1044
|
+
const bool drop_cached_resource = XdsDataErrorHandlingEnabled() &&
|
1045
|
+
xds_channel()->server_.FailOnDataErrors();
|
1046
|
+
resource_state.SetNacked(context->version, decode_status.message(),
|
1047
|
+
context->update_time, drop_cached_resource);
|
1048
|
+
xds_client()->NotifyWatchersOnError(resource_state,
|
1049
|
+
context->read_delay_handle);
|
1025
1050
|
return;
|
1026
1051
|
}
|
1027
1052
|
// Resource is valid.
|
@@ -1059,6 +1084,91 @@ void XdsClient::XdsChannel::AdsCall::ParseResource(
|
|
1059
1084
|
context->read_delay_handle);
|
1060
1085
|
}
|
1061
1086
|
|
1087
|
+
void XdsClient::XdsChannel::AdsCall::HandleServerReportedResourceError(
|
1088
|
+
size_t idx, absl::string_view resource_name, absl::Status status,
|
1089
|
+
DecodeContext* context) {
|
1090
|
+
std::string error_prefix = absl::StrCat(
|
1091
|
+
"resource_errors index ", idx, ": ",
|
1092
|
+
resource_name.empty() ? "" : absl::StrCat(resource_name, ": "));
|
1093
|
+
if (resource_name.empty()) {
|
1094
|
+
context->errors.emplace_back(
|
1095
|
+
absl::StrCat(error_prefix, "resource_name unset"));
|
1096
|
+
++context->num_invalid_resources;
|
1097
|
+
return;
|
1098
|
+
}
|
1099
|
+
if (status.ok()) {
|
1100
|
+
context->errors.emplace_back(
|
1101
|
+
absl::StrCat(error_prefix, "error_detail must be non-OK"));
|
1102
|
+
++context->num_invalid_resources;
|
1103
|
+
return;
|
1104
|
+
}
|
1105
|
+
// Check the resource name.
|
1106
|
+
auto parsed_resource_name =
|
1107
|
+
xds_client()->ParseXdsResourceName(resource_name, context->type);
|
1108
|
+
if (!parsed_resource_name.ok()) {
|
1109
|
+
context->errors.emplace_back(
|
1110
|
+
absl::StrCat(error_prefix, "Cannot parse xDS resource name"));
|
1111
|
+
++context->num_invalid_resources;
|
1112
|
+
return;
|
1113
|
+
}
|
1114
|
+
// Cancel resource-does-not-exist timer, if needed.
|
1115
|
+
auto timer_it = state_map_.find(context->type);
|
1116
|
+
if (timer_it != state_map_.end()) {
|
1117
|
+
auto it = timer_it->second.subscribed_resources.find(
|
1118
|
+
parsed_resource_name->authority);
|
1119
|
+
if (it != timer_it->second.subscribed_resources.end()) {
|
1120
|
+
auto res_it = it->second.find(parsed_resource_name->key);
|
1121
|
+
if (res_it != it->second.end()) {
|
1122
|
+
res_it->second->MarkSeen();
|
1123
|
+
}
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
// Lookup the authority in the cache.
|
1127
|
+
auto authority_it =
|
1128
|
+
xds_client()->authority_state_map_.find(parsed_resource_name->authority);
|
1129
|
+
if (authority_it == xds_client()->authority_state_map_.end()) {
|
1130
|
+
return; // Skip resource -- we don't have a subscription for it.
|
1131
|
+
}
|
1132
|
+
AuthorityState& authority_state = authority_it->second;
|
1133
|
+
// Found authority, so look up type.
|
1134
|
+
auto type_it = authority_state.type_map.find(context->type);
|
1135
|
+
if (type_it == authority_state.type_map.end()) {
|
1136
|
+
return; // Skip resource -- we don't have a subscription for it.
|
1137
|
+
}
|
1138
|
+
auto& type_map = type_it->second;
|
1139
|
+
// Found type, so look up resource key.
|
1140
|
+
auto it = type_map.find(parsed_resource_name->key);
|
1141
|
+
if (it == type_map.end()) {
|
1142
|
+
return; // Skip resource -- we don't have a subscription for it.
|
1143
|
+
}
|
1144
|
+
ResourceState& resource_state = it->second;
|
1145
|
+
// If needed, record that we've seen this resource.
|
1146
|
+
if (context->type->AllResourcesRequiredInSotW()) {
|
1147
|
+
context->resources_seen[parsed_resource_name->authority].insert(
|
1148
|
+
parsed_resource_name->key);
|
1149
|
+
}
|
1150
|
+
++context->num_invalid_resources;
|
1151
|
+
// Update cache state.
|
1152
|
+
const bool drop_cached_resource =
|
1153
|
+
xds_channel()->server_.FailOnDataErrors() &&
|
1154
|
+
(status.code() == absl::StatusCode::kNotFound ||
|
1155
|
+
status.code() == absl::StatusCode::kPermissionDenied);
|
1156
|
+
resource_state.SetReceivedError(context->version, std::move(status),
|
1157
|
+
context->update_time, drop_cached_resource);
|
1158
|
+
// If there is no cached resource (either because we didn't have one
|
1159
|
+
// or because we just dropped it due to fail_on_data_errors), then notify
|
1160
|
+
// via OnResourceChanged(); otherwise, notify via OnAmbientError().
|
1161
|
+
if (!resource_state.HasResource()) {
|
1162
|
+
xds_client()->NotifyWatchersOnResourceChanged(
|
1163
|
+
resource_state.failed_status(), resource_state.watchers(),
|
1164
|
+
context->read_delay_handle);
|
1165
|
+
} else {
|
1166
|
+
xds_client()->NotifyWatchersOnAmbientError(resource_state.failed_status(),
|
1167
|
+
resource_state.watchers(),
|
1168
|
+
context->read_delay_handle);
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
|
1062
1172
|
namespace {
|
1063
1173
|
|
1064
1174
|
void MaybeLogDiscoveryResponse(
|
@@ -1089,7 +1199,8 @@ absl::Status XdsClient::XdsChannel::AdsCall::DecodeAdsResponse(
|
|
1089
1199
|
}
|
1090
1200
|
MaybeLogDiscoveryResponse(xds_client(), xds_client()->def_pool_.ptr(),
|
1091
1201
|
response);
|
1092
|
-
// Get the type_url, version, nonce,
|
1202
|
+
// Get the type_url, version, nonce, number of resources, and number
|
1203
|
+
// of errors.
|
1093
1204
|
context->type_url = std::string(absl::StripPrefix(
|
1094
1205
|
UpbStringToAbsl(
|
1095
1206
|
envoy_service_discovery_v3_DiscoveryResponse_type_url(response)),
|
@@ -1102,12 +1213,18 @@ absl::Status XdsClient::XdsChannel::AdsCall::DecodeAdsResponse(
|
|
1102
1213
|
const google_protobuf_Any* const* resources =
|
1103
1214
|
envoy_service_discovery_v3_DiscoveryResponse_resources(response,
|
1104
1215
|
&num_resources);
|
1216
|
+
size_t num_errors = 0;
|
1217
|
+
const envoy_service_discovery_v3_ResourceError* const* errors = nullptr;
|
1218
|
+
if (XdsDataErrorHandlingEnabled()) {
|
1219
|
+
errors = envoy_service_discovery_v3_DiscoveryResponse_resource_errors(
|
1220
|
+
response, &num_errors);
|
1221
|
+
}
|
1105
1222
|
GRPC_TRACE_LOG(xds_client, INFO)
|
1106
1223
|
<< "[xds_client " << xds_client() << "] xds server "
|
1107
1224
|
<< xds_channel()->server_.server_uri()
|
1108
1225
|
<< ": received ADS response: type_url=" << context->type_url
|
1109
1226
|
<< ", version=" << context->version << ", nonce=" << context->nonce
|
1110
|
-
<< ", num_resources=" << num_resources;
|
1227
|
+
<< ", num_resources=" << num_resources << ", num_errors=" << num_errors;
|
1111
1228
|
context->type = xds_client()->GetResourceTypeLocked(context->type_url);
|
1112
1229
|
if (context->type == nullptr) {
|
1113
1230
|
return absl::InvalidArgumentError(
|
@@ -1152,6 +1269,29 @@ absl::Status XdsClient::XdsChannel::AdsCall::DecodeAdsResponse(
|
|
1152
1269
|
}
|
1153
1270
|
ParseResource(i, type_url, resource_name, serialized_resource, context);
|
1154
1271
|
}
|
1272
|
+
// Process each error.
|
1273
|
+
for (size_t i = 0; i < num_errors; ++i) {
|
1274
|
+
absl::string_view name;
|
1275
|
+
{
|
1276
|
+
const envoy_service_discovery_v3_ResourceName* resource_name =
|
1277
|
+
envoy_service_discovery_v3_ResourceError_resource_name(errors[i]);
|
1278
|
+
if (resource_name != nullptr) {
|
1279
|
+
name = UpbStringToAbsl(
|
1280
|
+
envoy_service_discovery_v3_ResourceName_name(resource_name));
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
absl::Status status;
|
1284
|
+
{
|
1285
|
+
const google_rpc_Status* error_detail =
|
1286
|
+
envoy_service_discovery_v3_ResourceError_error_detail(errors[i]);
|
1287
|
+
if (error_detail != nullptr) {
|
1288
|
+
status = absl::Status(
|
1289
|
+
static_cast<absl::StatusCode>(google_rpc_Status_code(error_detail)),
|
1290
|
+
UpbStringToAbsl(google_rpc_Status_message(error_detail)));
|
1291
|
+
}
|
1292
|
+
}
|
1293
|
+
HandleServerReportedResourceError(i, name, std::move(status), context);
|
1294
|
+
}
|
1155
1295
|
return absl::OkStatus();
|
1156
1296
|
}
|
1157
1297
|
|
@@ -1159,134 +1299,116 @@ void XdsClient::XdsChannel::AdsCall::OnRecvMessage(absl::string_view payload) {
|
|
1159
1299
|
// context.read_delay_handle needs to be destroyed after the mutex is
|
1160
1300
|
// released.
|
1161
1301
|
DecodeContext context;
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1302
|
+
MutexLock lock(&xds_client()->mu_);
|
1303
|
+
if (!IsCurrentCallOnChannel()) return;
|
1304
|
+
// Parse and validate the response.
|
1305
|
+
absl::Status status = DecodeAdsResponse(payload, &context);
|
1306
|
+
if (!status.ok()) {
|
1307
|
+
// Ignore unparsable response.
|
1308
|
+
LOG(ERROR) << "[xds_client " << xds_client() << "] xds server "
|
1309
|
+
<< xds_channel()->server_.server_uri()
|
1310
|
+
<< ": error parsing ADS response (" << status << ") -- ignoring";
|
1311
|
+
} else {
|
1312
|
+
seen_response_ = true;
|
1313
|
+
xds_channel()->SetHealthyLocked();
|
1314
|
+
// Update nonce.
|
1315
|
+
auto& state = state_map_[context.type];
|
1316
|
+
state.nonce = context.nonce;
|
1317
|
+
// If we got an error, set state.status so that we'll NACK the update.
|
1318
|
+
if (!context.errors.empty()) {
|
1319
|
+
state.status = absl::UnavailableError(
|
1320
|
+
absl::StrCat("xDS response validation errors: [",
|
1321
|
+
absl::StrJoin(context.errors, "; "), "]"));
|
1169
1322
|
LOG(ERROR) << "[xds_client " << xds_client() << "] xds server "
|
1170
1323
|
<< xds_channel()->server_.server_uri()
|
1171
|
-
<< ":
|
1172
|
-
<< "
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
seen_authority_it->second.find(resource_key) ==
|
1210
|
-
seen_authority_it->second.end()) {
|
1211
|
-
// If the resource was newly requested but has not yet been
|
1212
|
-
// received, we don't want to generate an error for the
|
1213
|
-
// watchers, because this ADS response may be in reaction to an
|
1214
|
-
// earlier request that did not yet request the new resource, so
|
1215
|
-
// its absence from the response does not necessarily indicate
|
1216
|
-
// that the resource does not exist. For that case, we rely on
|
1217
|
-
// the request timeout instead.
|
1218
|
-
if (!resource_state.HasResource()) continue;
|
1219
|
-
if (xds_channel()->server_.IgnoreResourceDeletion()) {
|
1220
|
-
if (!resource_state.ignored_deletion()) {
|
1221
|
-
LOG(ERROR)
|
1222
|
-
<< "[xds_client " << xds_client() << "] xds server "
|
1223
|
-
<< xds_channel()->server_.server_uri()
|
1224
|
-
<< ": ignoring deletion for resource type "
|
1225
|
-
<< context.type_url << " name "
|
1226
|
-
<< XdsClient::ConstructFullXdsResourceName(
|
1227
|
-
authority, context.type_url.c_str(), resource_key);
|
1228
|
-
resource_state.set_ignored_deletion(true);
|
1229
|
-
}
|
1230
|
-
} else {
|
1231
|
-
resource_state.SetDoesNotExist();
|
1232
|
-
xds_client()->NotifyWatchersOnResourceChanged(
|
1233
|
-
absl::NotFoundError("does not exist"),
|
1234
|
-
resource_state.watchers(), context.read_delay_handle);
|
1235
|
-
}
|
1236
|
-
}
|
1324
|
+
<< ": ADS response invalid for resource type "
|
1325
|
+
<< context.type_url << " version " << context.version
|
1326
|
+
<< ", will NACK: nonce=" << state.nonce
|
1327
|
+
<< " status=" << state.status;
|
1328
|
+
}
|
1329
|
+
// Delete resources not seen in update if needed.
|
1330
|
+
if (context.type->AllResourcesRequiredInSotW()) {
|
1331
|
+
for (auto& [authority, authority_state] :
|
1332
|
+
xds_client()->authority_state_map_) {
|
1333
|
+
// Skip authorities that are not using this xDS channel.
|
1334
|
+
if (authority_state.xds_channels.back() != xds_channel()) {
|
1335
|
+
continue;
|
1336
|
+
}
|
1337
|
+
auto seen_authority_it = context.resources_seen.find(authority);
|
1338
|
+
// Find this resource type.
|
1339
|
+
auto type_it = authority_state.type_map.find(context.type);
|
1340
|
+
if (type_it == authority_state.type_map.end()) continue;
|
1341
|
+
// Iterate over resource ids.
|
1342
|
+
for (auto& [resource_key, resource_state] : type_it->second) {
|
1343
|
+
if (seen_authority_it == context.resources_seen.end() ||
|
1344
|
+
seen_authority_it->second.find(resource_key) ==
|
1345
|
+
seen_authority_it->second.end()) {
|
1346
|
+
// If the resource was newly requested but has not yet been
|
1347
|
+
// received, we don't want to generate an error for the
|
1348
|
+
// watchers, because this ADS response may be in reaction to an
|
1349
|
+
// earlier request that did not yet request the new resource, so
|
1350
|
+
// its absence from the response does not necessarily indicate
|
1351
|
+
// that the resource does not exist. For that case, we rely on
|
1352
|
+
// the request timeout instead.
|
1353
|
+
if (!resource_state.HasResource()) continue;
|
1354
|
+
const bool drop_cached_resource =
|
1355
|
+
XdsDataErrorHandlingEnabled()
|
1356
|
+
? xds_channel()->server_.FailOnDataErrors()
|
1357
|
+
: !xds_channel()->server_.IgnoreResourceDeletion();
|
1358
|
+
resource_state.SetDoesNotExistOnLdsOrCdsDeletion(
|
1359
|
+
context.version, context.update_time, drop_cached_resource);
|
1360
|
+
xds_client()->NotifyWatchersOnError(resource_state,
|
1361
|
+
context.read_delay_handle);
|
1237
1362
|
}
|
1238
1363
|
}
|
1239
1364
|
}
|
1240
|
-
// If we had valid resources or the update was empty, update the version.
|
1241
|
-
if (context.num_valid_resources > 0 || context.errors.empty()) {
|
1242
|
-
xds_channel()->resource_type_version_map_[context.type] =
|
1243
|
-
std::move(context.version);
|
1244
|
-
}
|
1245
|
-
// Send ACK or NACK.
|
1246
|
-
SendMessageLocked(context.type);
|
1247
1365
|
}
|
1248
|
-
//
|
1249
|
-
if (
|
1250
|
-
|
1251
|
-
|
1252
|
-
context.num_valid_resources, context.num_invalid_resources);
|
1366
|
+
// If we had valid resources or the update was empty, update the version.
|
1367
|
+
if (context.num_valid_resources > 0 || context.errors.empty()) {
|
1368
|
+
xds_channel()->resource_type_version_map_[context.type] =
|
1369
|
+
std::move(context.version);
|
1253
1370
|
}
|
1371
|
+
// Send ACK or NACK.
|
1372
|
+
SendMessageLocked(context.type);
|
1373
|
+
}
|
1374
|
+
// Update metrics.
|
1375
|
+
if (xds_client()->metrics_reporter_ != nullptr) {
|
1376
|
+
xds_client()->metrics_reporter_->ReportResourceUpdates(
|
1377
|
+
xds_channel()->server_.server_uri(), context.type_url,
|
1378
|
+
context.num_valid_resources, context.num_invalid_resources);
|
1254
1379
|
}
|
1255
|
-
xds_client()->work_serializer_.DrainQueue();
|
1256
1380
|
}
|
1257
1381
|
|
1258
1382
|
void XdsClient::XdsChannel::AdsCall::OnStatusReceived(absl::Status status) {
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
for (const auto&
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
}
|
1383
|
+
MutexLock lock(&xds_client()->mu_);
|
1384
|
+
GRPC_TRACE_LOG(xds_client, INFO)
|
1385
|
+
<< "[xds_client " << xds_client() << "] xds server "
|
1386
|
+
<< xds_channel()->server_.server_uri()
|
1387
|
+
<< ": ADS call status received (xds_channel=" << xds_channel()
|
1388
|
+
<< ", ads_call=" << this << ", streaming_call=" << streaming_call_.get()
|
1389
|
+
<< "): " << status;
|
1390
|
+
// Cancel any does-not-exist timers that may be pending.
|
1391
|
+
for (const auto& [_, resource_type_state] : state_map_) {
|
1392
|
+
for (const auto& [_, resource_map] :
|
1393
|
+
resource_type_state.subscribed_resources) {
|
1394
|
+
for (auto& [_, resource_timer] : resource_map) {
|
1395
|
+
resource_timer->MaybeCancelTimer();
|
1273
1396
|
}
|
1274
1397
|
}
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1398
|
+
}
|
1399
|
+
// Ignore status from a stale call.
|
1400
|
+
if (IsCurrentCallOnChannel()) {
|
1401
|
+
// Try to restart the call.
|
1402
|
+
retryable_call_->OnCallFinishedLocked();
|
1403
|
+
// If we didn't receive a response on the stream, report the
|
1404
|
+
// stream failure as a connectivity failure, which will report the
|
1405
|
+
// error to all watchers of resources on this channel.
|
1406
|
+
if (!seen_response_) {
|
1407
|
+
xds_channel()->SetChannelStatusLocked(absl::UnavailableError(
|
1408
|
+
absl::StrCat("xDS call failed with no responses received; status: ",
|
1409
|
+
status.ToString())));
|
1287
1410
|
}
|
1288
1411
|
}
|
1289
|
-
xds_client()->work_serializer_.DrainQueue();
|
1290
1412
|
}
|
1291
1413
|
|
1292
1414
|
bool XdsClient::XdsChannel::AdsCall::IsCurrentCallOnChannel() const {
|
@@ -1302,13 +1424,10 @@ XdsClient::XdsChannel::AdsCall::ResourceNamesForRequest(
|
|
1302
1424
|
std::vector<std::string> resource_names;
|
1303
1425
|
auto it = state_map_.find(type);
|
1304
1426
|
if (it != state_map_.end()) {
|
1305
|
-
for (auto&
|
1306
|
-
|
1307
|
-
for (auto& p : a.second) {
|
1308
|
-
const XdsResourceKey& resource_key = p.first;
|
1427
|
+
for (auto& [authority, authority_state] : it->second.subscribed_resources) {
|
1428
|
+
for (auto& [resource_key, resource_timer] : authority_state) {
|
1309
1429
|
resource_names.emplace_back(XdsClient::ConstructFullXdsResourceName(
|
1310
1430
|
authority, type->type_url(), resource_key));
|
1311
|
-
OrphanablePtr<ResourceTimer>& resource_timer = p.second;
|
1312
1431
|
resource_timer->MarkSubscriptionSendStarted();
|
1313
1432
|
}
|
1314
1433
|
}
|
@@ -1329,22 +1448,60 @@ void XdsClient::ResourceState::SetAcked(
|
|
1329
1448
|
update_time_ = update_time;
|
1330
1449
|
version_ = std::move(version);
|
1331
1450
|
failed_version_.clear();
|
1332
|
-
|
1451
|
+
failed_status_ = absl::OkStatus();
|
1333
1452
|
}
|
1334
1453
|
|
1335
1454
|
void XdsClient::ResourceState::SetNacked(const std::string& version,
|
1336
|
-
|
1337
|
-
Timestamp update_time
|
1455
|
+
absl::string_view details,
|
1456
|
+
Timestamp update_time,
|
1457
|
+
bool drop_cached_resource) {
|
1458
|
+
if (drop_cached_resource) {
|
1459
|
+
resource_.reset();
|
1460
|
+
serialized_proto_.clear();
|
1461
|
+
}
|
1338
1462
|
client_status_ = ClientResourceStatus::NACKED;
|
1463
|
+
failed_status_ =
|
1464
|
+
absl::InvalidArgumentError(absl::StrCat("invalid resource: ", details));
|
1339
1465
|
failed_version_ = version;
|
1340
|
-
failed_details_ = details;
|
1341
1466
|
failed_update_time_ = update_time;
|
1342
1467
|
}
|
1343
1468
|
|
1344
|
-
void XdsClient::ResourceState::
|
1345
|
-
|
1346
|
-
|
1469
|
+
void XdsClient::ResourceState::SetReceivedError(const std::string& version,
|
1470
|
+
absl::Status status,
|
1471
|
+
Timestamp update_time,
|
1472
|
+
bool drop_cached_resource) {
|
1473
|
+
if (drop_cached_resource) {
|
1474
|
+
resource_.reset();
|
1475
|
+
serialized_proto_.clear();
|
1476
|
+
}
|
1477
|
+
client_status_ = ClientResourceStatus::RECEIVED_ERROR;
|
1478
|
+
failed_version_ = version;
|
1479
|
+
failed_status_ = std::move(status);
|
1480
|
+
failed_update_time_ = update_time;
|
1481
|
+
}
|
1482
|
+
|
1483
|
+
void XdsClient::ResourceState::SetDoesNotExistOnLdsOrCdsDeletion(
|
1484
|
+
const std::string& version, Timestamp update_time,
|
1485
|
+
bool drop_cached_resource) {
|
1486
|
+
if (drop_cached_resource) {
|
1487
|
+
resource_.reset();
|
1488
|
+
serialized_proto_.clear();
|
1489
|
+
}
|
1490
|
+
client_status_ = ClientResourceStatus::DOES_NOT_EXIST;
|
1491
|
+
failed_status_ = absl::NotFoundError("does not exist");
|
1492
|
+
failed_version_ = version;
|
1493
|
+
failed_update_time_ = update_time;
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
void XdsClient::ResourceState::SetDoesNotExistOnTimeout() {
|
1347
1497
|
client_status_ = ClientResourceStatus::DOES_NOT_EXIST;
|
1498
|
+
failed_status_ = absl::NotFoundError("does not exist");
|
1499
|
+
failed_version_.clear();
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
void XdsClient::ResourceState::SetTimeout(const std::string& details) {
|
1503
|
+
client_status_ = ClientResourceStatus::TIMEOUT;
|
1504
|
+
failed_status_ = absl::UnavailableError(details);
|
1348
1505
|
failed_version_.clear();
|
1349
1506
|
}
|
1350
1507
|
|
@@ -1353,11 +1510,17 @@ absl::string_view XdsClient::ResourceState::CacheStateString() const {
|
|
1353
1510
|
case ClientResourceStatus::REQUESTED:
|
1354
1511
|
return "requested";
|
1355
1512
|
case ClientResourceStatus::DOES_NOT_EXIST:
|
1356
|
-
return "
|
1513
|
+
return resource_ != nullptr ? "does_not_exist_but_cached"
|
1514
|
+
: "does_not_exist";
|
1357
1515
|
case ClientResourceStatus::ACKED:
|
1358
1516
|
return "acked";
|
1359
1517
|
case ClientResourceStatus::NACKED:
|
1360
1518
|
return resource_ != nullptr ? "nacked_but_cached" : "nacked";
|
1519
|
+
case ClientResourceStatus::RECEIVED_ERROR:
|
1520
|
+
return resource_ != nullptr ? "received_error_but_cached"
|
1521
|
+
: "received_error";
|
1522
|
+
case ClientResourceStatus::TIMEOUT:
|
1523
|
+
return "timeout";
|
1361
1524
|
}
|
1362
1525
|
Crash("unknown resource state");
|
1363
1526
|
}
|
@@ -1395,14 +1558,16 @@ void XdsClient::ResourceState::FillGenericXdsConfig(
|
|
1395
1558
|
google_protobuf_Any_set_value(any_field,
|
1396
1559
|
StdStringToUpbString(serialized_proto_));
|
1397
1560
|
}
|
1398
|
-
if (
|
1561
|
+
if (!failed_status_.ok()) {
|
1399
1562
|
auto* update_failure_state = envoy_admin_v3_UpdateFailureState_new(arena);
|
1400
1563
|
envoy_admin_v3_UpdateFailureState_set_details(
|
1401
|
-
update_failure_state, StdStringToUpbString(
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1564
|
+
update_failure_state, StdStringToUpbString(failed_status_.message()));
|
1565
|
+
if (!failed_version_.empty()) {
|
1566
|
+
envoy_admin_v3_UpdateFailureState_set_version_info(
|
1567
|
+
update_failure_state, StdStringToUpbString(failed_version_));
|
1568
|
+
envoy_admin_v3_UpdateFailureState_set_last_update_attempt(
|
1569
|
+
update_failure_state, EncodeTimestamp(failed_update_time_, arena));
|
1570
|
+
}
|
1406
1571
|
envoy_service_status_v3_ClientConfig_GenericXdsConfig_set_error_state(
|
1407
1572
|
entry, update_failure_state);
|
1408
1573
|
}
|
@@ -1453,7 +1618,12 @@ void XdsClient::Orphaned() {
|
|
1453
1618
|
MutexLock lock(&mu_);
|
1454
1619
|
shutting_down_ = true;
|
1455
1620
|
// Clear cache and any remaining watchers that may not have been cancelled.
|
1456
|
-
authority_state_map_
|
1621
|
+
// Note: We move authority_state_map_ out of the way before clearing
|
1622
|
+
// it, because clearing the map will trigger calls to
|
1623
|
+
// MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(), which would try to
|
1624
|
+
// modify the map while we are iterating over it.
|
1625
|
+
auto authority_state_map = std::move(authority_state_map_);
|
1626
|
+
authority_state_map.clear();
|
1457
1627
|
invalid_watchers_.clear();
|
1458
1628
|
}
|
1459
1629
|
|
@@ -1472,10 +1642,11 @@ RefCountedPtr<XdsClient::XdsChannel> XdsClient::GetOrCreateXdsChannelLocked(
|
|
1472
1642
|
}
|
1473
1643
|
|
1474
1644
|
bool XdsClient::HasUncachedResources(const AuthorityState& authority_state) {
|
1475
|
-
for (const auto&
|
1476
|
-
for (const auto&
|
1477
|
-
if (
|
1478
|
-
|
1645
|
+
for (const auto& [_, resource_map] : authority_state.type_map) {
|
1646
|
+
for (const auto& [_, resource_state] : resource_map) {
|
1647
|
+
if (resource_state.HasWatchers() &&
|
1648
|
+
resource_state.client_status() ==
|
1649
|
+
ResourceState::ClientResourceStatus::REQUESTED) {
|
1479
1650
|
return true;
|
1480
1651
|
}
|
1481
1652
|
}
|
@@ -1495,7 +1666,6 @@ void XdsClient::WatchResource(const XdsResourceType* type,
|
|
1495
1666
|
}
|
1496
1667
|
NotifyWatchersOnResourceChanged(std::move(status), {watcher},
|
1497
1668
|
ReadDelayHandle::NoWait());
|
1498
|
-
work_serializer_.DrainQueue();
|
1499
1669
|
};
|
1500
1670
|
auto resource_name = ParseXdsResourceName(name, type);
|
1501
1671
|
if (!resource_name.ok()) {
|
@@ -1517,90 +1687,67 @@ void XdsClient::WatchResource(const XdsResourceType* type,
|
|
1517
1687
|
xds_servers = authority->servers();
|
1518
1688
|
}
|
1519
1689
|
if (xds_servers.empty()) xds_servers = bootstrap_->servers();
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
GetOrCreateXdsChannelLocked(*xds_servers[i], "start watch"));
|
1549
|
-
if (authority_state.xds_channels.back()->status().ok()) {
|
1550
|
-
break;
|
1551
|
-
}
|
1690
|
+
MutexLock lock(&mu_);
|
1691
|
+
MaybeRegisterResourceTypeLocked(type);
|
1692
|
+
AuthorityState& authority_state =
|
1693
|
+
authority_state_map_[resource_name->authority];
|
1694
|
+
auto [it, created_entry] = authority_state.type_map[type].emplace(
|
1695
|
+
resource_name->key, ResourceState());
|
1696
|
+
ResourceState& resource_state = it->second;
|
1697
|
+
resource_state.AddWatcher(watcher);
|
1698
|
+
if (created_entry) {
|
1699
|
+
// We try to add new channels in 2 cases:
|
1700
|
+
// - This is the first resource for this authority (i.e., the list
|
1701
|
+
// of channels is empty).
|
1702
|
+
// - The last channel in the list is failing. That failure may not
|
1703
|
+
// have previously triggered fallback if there were no uncached
|
1704
|
+
// resources, but we've just added a new uncached resource,
|
1705
|
+
// so we need to trigger fallback now.
|
1706
|
+
//
|
1707
|
+
// Note that when we add a channel, it might already be failing
|
1708
|
+
// due to being used in a different authority. So we keep going
|
1709
|
+
// until either we add one that isn't failing or we've added them all.
|
1710
|
+
if (authority_state.xds_channels.empty() ||
|
1711
|
+
!authority_state.xds_channels.back()->status().ok()) {
|
1712
|
+
for (size_t i = authority_state.xds_channels.size();
|
1713
|
+
i < xds_servers.size(); ++i) {
|
1714
|
+
authority_state.xds_channels.emplace_back(
|
1715
|
+
GetOrCreateXdsChannelLocked(*xds_servers[i], "start watch"));
|
1716
|
+
if (authority_state.xds_channels.back()->status().ok()) {
|
1717
|
+
break;
|
1552
1718
|
}
|
1553
1719
|
}
|
1554
|
-
for (const auto& channel : authority_state.xds_channels) {
|
1555
|
-
channel->SubscribeLocked(type, *resource_name);
|
1556
|
-
}
|
1557
|
-
} else {
|
1558
|
-
// If we already have a cached value for the resource, notify the new
|
1559
|
-
// watcher immediately.
|
1560
|
-
if (resource_state.HasResource()) {
|
1561
|
-
GRPC_TRACE_LOG(xds_client, INFO)
|
1562
|
-
<< "[xds_client " << this << "] returning cached listener data for "
|
1563
|
-
<< name;
|
1564
|
-
NotifyWatchersOnResourceChanged(resource_state.resource(), {watcher},
|
1565
|
-
ReadDelayHandle::NoWait());
|
1566
|
-
notified_watcher = true;
|
1567
|
-
} else if (resource_state.client_status() ==
|
1568
|
-
ResourceState::ClientResourceStatus::DOES_NOT_EXIST) {
|
1569
|
-
GRPC_TRACE_LOG(xds_client, INFO)
|
1570
|
-
<< "[xds_client " << this
|
1571
|
-
<< "] reporting cached does-not-exist for " << name;
|
1572
|
-
NotifyWatchersOnResourceChanged(absl::NotFoundError("does not exist"),
|
1573
|
-
{watcher}, ReadDelayHandle::NoWait());
|
1574
|
-
notified_watcher = true;
|
1575
|
-
} else if (resource_state.client_status() ==
|
1576
|
-
ResourceState::ClientResourceStatus::NACKED) {
|
1577
|
-
GRPC_TRACE_LOG(xds_client, INFO)
|
1578
|
-
<< "[xds_client " << this
|
1579
|
-
<< "] reporting cached validation failure for " << name << ": "
|
1580
|
-
<< resource_state.failed_details();
|
1581
|
-
NotifyWatchersOnResourceChanged(
|
1582
|
-
absl::InvalidArgumentError(absl::StrCat(
|
1583
|
-
"invalid resource: ", resource_state.failed_details())),
|
1584
|
-
{watcher}, ReadDelayHandle::NoWait());
|
1585
|
-
notified_watcher = true;
|
1586
|
-
}
|
1587
1720
|
}
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1721
|
+
} else {
|
1722
|
+
// If we already have a cached value for the resource, notify the new
|
1723
|
+
// watcher immediately.
|
1724
|
+
if (resource_state.HasResource()) {
|
1725
|
+
GRPC_TRACE_LOG(xds_client, INFO)
|
1726
|
+
<< "[xds_client " << this << "] returning cached data for " << name;
|
1727
|
+
NotifyWatchersOnResourceChanged(resource_state.resource(), {watcher},
|
1728
|
+
ReadDelayHandle::NoWait());
|
1729
|
+
}
|
1730
|
+
if (!resource_state.failed_status().ok()) {
|
1591
1731
|
GRPC_TRACE_LOG(xds_client, INFO)
|
1592
|
-
<< "[xds_client " << this << "] returning cached
|
1593
|
-
<<
|
1594
|
-
|
1595
|
-
|
1596
|
-
ReadDelayHandle::NoWait());
|
1597
|
-
} else {
|
1598
|
-
NotifyWatchersOnResourceChanged(std::move(channel_status), {watcher},
|
1599
|
-
ReadDelayHandle::NoWait());
|
1600
|
-
}
|
1732
|
+
<< "[xds_client " << this << "] returning cached error for " << name
|
1733
|
+
<< ": " << resource_state.failed_status();
|
1734
|
+
NotifyWatchersOnError(resource_state, ReadDelayHandle::NoWait(),
|
1735
|
+
{watcher});
|
1601
1736
|
}
|
1602
1737
|
}
|
1603
|
-
|
1738
|
+
// Make sure all channels are subscribing to the resource.
|
1739
|
+
for (const auto& channel : authority_state.xds_channels) {
|
1740
|
+
channel->SubscribeLocked(type, *resource_name);
|
1741
|
+
}
|
1742
|
+
// If the channel is not connected, report an error to the watcher.
|
1743
|
+
absl::Status channel_status = authority_state.xds_channels.back()->status();
|
1744
|
+
if (!channel_status.ok()) {
|
1745
|
+
GRPC_TRACE_LOG(xds_client, INFO)
|
1746
|
+
<< "[xds_client " << this << "] returning cached channel error for "
|
1747
|
+
<< name << ": " << channel_status;
|
1748
|
+
NotifyWatchersOnError(resource_state, ReadDelayHandle::NoWait(), {watcher},
|
1749
|
+
std::move(channel_status));
|
1750
|
+
}
|
1604
1751
|
}
|
1605
1752
|
|
1606
1753
|
void XdsClient::CancelResourceWatch(const XdsResourceType* type,
|
@@ -1618,34 +1765,63 @@ void XdsClient::CancelResourceWatch(const XdsResourceType* type,
|
|
1618
1765
|
if (authority_it == authority_state_map_.end()) return;
|
1619
1766
|
AuthorityState& authority_state = authority_it->second;
|
1620
1767
|
// Find type map.
|
1621
|
-
auto type_it = authority_state.
|
1622
|
-
if (type_it == authority_state.
|
1623
|
-
auto&
|
1768
|
+
auto type_it = authority_state.type_map.find(type);
|
1769
|
+
if (type_it == authority_state.type_map.end()) return;
|
1770
|
+
auto& resource_map = type_it->second;
|
1624
1771
|
// Find resource key.
|
1625
|
-
auto resource_it =
|
1626
|
-
if (resource_it ==
|
1772
|
+
auto resource_it = resource_map.find(resource_name->key);
|
1773
|
+
if (resource_it == resource_map.end()) return;
|
1627
1774
|
ResourceState& resource_state = resource_it->second;
|
1628
1775
|
// Remove watcher.
|
1629
1776
|
resource_state.RemoveWatcher(watcher);
|
1630
|
-
//
|
1777
|
+
// If this was the last watcher, clean up.
|
1631
1778
|
if (!resource_state.HasWatchers()) {
|
1632
|
-
|
1633
|
-
LOG(INFO) << "[xds_client " << this
|
1634
|
-
<< "] unsubscribing from a resource for which we "
|
1635
|
-
<< "previously ignored a deletion: type " << type->type_url()
|
1636
|
-
<< " name " << name;
|
1637
|
-
}
|
1779
|
+
// Unsubscribe from this resource on all XdsChannels.
|
1638
1780
|
for (const auto& xds_channel : authority_state.xds_channels) {
|
1639
1781
|
xds_channel->UnsubscribeLocked(type, *resource_name,
|
1640
1782
|
delay_unsubscription);
|
1641
1783
|
}
|
1642
|
-
|
1643
|
-
if
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1784
|
+
// Note: We wait to remove the cache entry until we actualle send
|
1785
|
+
// the unsubscription message on the ADS stream, so that if a watch is
|
1786
|
+
// stopped and then started again before we send the next request
|
1787
|
+
// for that resource type, we don't lose the cache entry without the
|
1788
|
+
// xDS server knowing it needs to re-send it.
|
1789
|
+
//
|
1790
|
+
// Note: Because the cache cleanup may have been triggered by the
|
1791
|
+
// unsubscription, it's no longer safe to access any of the
|
1792
|
+
// iterators that we have from above.
|
1793
|
+
}
|
1794
|
+
}
|
1795
|
+
|
1796
|
+
void XdsClient::MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(
|
1797
|
+
XdsChannel* xds_channel, const XdsResourceType* type) {
|
1798
|
+
for (auto authority_it = authority_state_map_.begin();
|
1799
|
+
authority_it != authority_state_map_.end();) {
|
1800
|
+
AuthorityState& authority_state = authority_it->second;
|
1801
|
+
if (authority_state.xds_channels.back() == xds_channel) {
|
1802
|
+
// Find type map.
|
1803
|
+
auto type_it = authority_state.type_map.find(type);
|
1804
|
+
if (type_it != authority_state.type_map.end()) {
|
1805
|
+
auto& resource_map = type_it->second;
|
1806
|
+
// Remove the cache entry for any resource without watchers.
|
1807
|
+
for (auto resource_it = resource_map.begin();
|
1808
|
+
resource_it != resource_map.end();) {
|
1809
|
+
ResourceState& resource_state = resource_it->second;
|
1810
|
+
if (!resource_state.HasWatchers()) {
|
1811
|
+
resource_map.erase(resource_it++);
|
1812
|
+
} else {
|
1813
|
+
++resource_it;
|
1814
|
+
}
|
1815
|
+
}
|
1816
|
+
// Clean up empty entries in the map.
|
1817
|
+
if (resource_map.empty()) authority_state.type_map.erase(type_it);
|
1647
1818
|
}
|
1648
1819
|
}
|
1820
|
+
if (authority_state.type_map.empty()) {
|
1821
|
+
authority_state_map_.erase(authority_it++);
|
1822
|
+
} else {
|
1823
|
+
++authority_it;
|
1824
|
+
}
|
1649
1825
|
}
|
1650
1826
|
}
|
1651
1827
|
|
@@ -1688,9 +1864,9 @@ absl::StatusOr<XdsClient::XdsResourceName> XdsClient::ParseXdsResourceName(
|
|
1688
1864
|
}
|
1689
1865
|
// Canonicalize order of query params.
|
1690
1866
|
std::vector<URI::QueryParam> query_params;
|
1691
|
-
for (const auto&
|
1867
|
+
for (const auto& [key, value] : uri->query_parameter_map()) {
|
1692
1868
|
query_params.emplace_back(
|
1693
|
-
URI::QueryParam{std::string(
|
1869
|
+
URI::QueryParam{std::string(key), std::string(value)});
|
1694
1870
|
}
|
1695
1871
|
return XdsResourceName{
|
1696
1872
|
uri->authority(),
|
@@ -1713,8 +1889,8 @@ std::string XdsClient::ConstructFullXdsResourceName(
|
|
1713
1889
|
|
1714
1890
|
void XdsClient::ResetBackoff() {
|
1715
1891
|
MutexLock lock(&mu_);
|
1716
|
-
for (auto&
|
1717
|
-
|
1892
|
+
for (auto& [_, xds_channel] : xds_channel_map_) {
|
1893
|
+
xds_channel->ResetBackoff();
|
1718
1894
|
}
|
1719
1895
|
}
|
1720
1896
|
|
@@ -1731,12 +1907,12 @@ void XdsClient::NotifyWatchersOnResourceChanged(
|
|
1731
1907
|
resource,
|
1732
1908
|
WatcherSet watchers, RefCountedPtr<ReadDelayHandle> read_delay_handle) {
|
1733
1909
|
if (!resource.ok()) resource = AppendNodeToStatus(resource.status());
|
1734
|
-
work_serializer_.
|
1910
|
+
work_serializer_.Run(
|
1735
1911
|
[watchers = std::move(watchers), resource = std::move(resource),
|
1736
1912
|
read_delay_handle = std::move(read_delay_handle)]()
|
1737
1913
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) {
|
1738
|
-
for (const auto&
|
1739
|
-
|
1914
|
+
for (const auto& watcher : watchers) {
|
1915
|
+
watcher->OnGenericResourceChanged(resource, read_delay_handle);
|
1740
1916
|
}
|
1741
1917
|
},
|
1742
1918
|
DEBUG_LOCATION);
|
@@ -1746,17 +1922,32 @@ void XdsClient::NotifyWatchersOnAmbientError(
|
|
1746
1922
|
absl::Status status, WatcherSet watchers,
|
1747
1923
|
RefCountedPtr<ReadDelayHandle> read_delay_handle) {
|
1748
1924
|
if (!status.ok()) status = AppendNodeToStatus(status);
|
1749
|
-
work_serializer_.
|
1925
|
+
work_serializer_.Run(
|
1750
1926
|
[watchers = std::move(watchers), status = std::move(status),
|
1751
1927
|
read_delay_handle = std::move(read_delay_handle)]()
|
1752
1928
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) {
|
1753
|
-
for (const auto&
|
1754
|
-
|
1929
|
+
for (const auto& watcher : watchers) {
|
1930
|
+
watcher->OnAmbientError(status, read_delay_handle);
|
1755
1931
|
}
|
1756
1932
|
},
|
1757
1933
|
DEBUG_LOCATION);
|
1758
1934
|
}
|
1759
1935
|
|
1936
|
+
void XdsClient::NotifyWatchersOnError(
|
1937
|
+
const ResourceState& resource_state,
|
1938
|
+
RefCountedPtr<ReadDelayHandle> read_delay_handle, WatcherSet watchers,
|
1939
|
+
absl::Status status) {
|
1940
|
+
if (watchers.empty()) watchers = resource_state.watchers();
|
1941
|
+
if (status.ok()) status = resource_state.failed_status();
|
1942
|
+
if (!resource_state.HasResource()) {
|
1943
|
+
NotifyWatchersOnResourceChanged(std::move(status), std::move(watchers),
|
1944
|
+
std::move(read_delay_handle));
|
1945
|
+
} else {
|
1946
|
+
NotifyWatchersOnAmbientError(std::move(status), std::move(watchers),
|
1947
|
+
std::move(read_delay_handle));
|
1948
|
+
}
|
1949
|
+
}
|
1950
|
+
|
1760
1951
|
void XdsClient::DumpClientConfig(
|
1761
1952
|
std::set<std::string>* string_pool, upb_Arena* arena,
|
1762
1953
|
envoy_service_status_v3_ClientConfig* client_config) {
|
@@ -1767,25 +1958,25 @@ void XdsClient::DumpClientConfig(
|
|
1767
1958
|
PopulateXdsNode(bootstrap_->node(), user_agent_name_, user_agent_version_,
|
1768
1959
|
node, arena);
|
1769
1960
|
// Dump each resource.
|
1770
|
-
for (const auto&
|
1771
|
-
const
|
1772
|
-
for (const auto& t : a.second.resource_map) { // type
|
1773
|
-
const XdsResourceType* type = t.first;
|
1961
|
+
for (const auto& [authority, authority_state] : authority_state_map_) {
|
1962
|
+
for (const auto& [type, resource_map] : authority_state.type_map) {
|
1774
1963
|
auto it =
|
1775
1964
|
string_pool
|
1776
1965
|
->emplace(absl::StrCat("type.googleapis.com/", type->type_url()))
|
1777
1966
|
.first;
|
1778
1967
|
upb_StringView type_url = StdStringToUpbString(*it);
|
1779
|
-
for (const auto&
|
1968
|
+
for (const auto& [resource_key, resource_state] : resource_map) {
|
1969
|
+
if (!resource_state.HasWatchers()) continue;
|
1780
1970
|
auto it2 = string_pool
|
1781
1971
|
->emplace(ConstructFullXdsResourceName(
|
1782
|
-
authority, type->type_url(),
|
1972
|
+
authority, type->type_url(), resource_key))
|
1783
1973
|
.first;
|
1784
1974
|
upb_StringView resource_name = StdStringToUpbString(*it2);
|
1785
1975
|
envoy_service_status_v3_ClientConfig_GenericXdsConfig* entry =
|
1786
1976
|
envoy_service_status_v3_ClientConfig_add_generic_xds_configs(
|
1787
1977
|
client_config, arena);
|
1788
|
-
|
1978
|
+
resource_state.FillGenericXdsConfig(type_url, resource_name, arena,
|
1979
|
+
entry);
|
1789
1980
|
}
|
1790
1981
|
}
|
1791
1982
|
}
|
@@ -1794,19 +1985,21 @@ void XdsClient::DumpClientConfig(
|
|
1794
1985
|
void XdsClient::ReportResourceCounts(
|
1795
1986
|
absl::FunctionRef<void(const ResourceCountLabels&, uint64_t)> func) {
|
1796
1987
|
ResourceCountLabels labels;
|
1797
|
-
for (const auto&
|
1798
|
-
labels.xds_authority =
|
1799
|
-
for (const auto&
|
1800
|
-
labels.resource_type =
|
1988
|
+
for (const auto& [authority, authority_state] : authority_state_map_) {
|
1989
|
+
labels.xds_authority = authority;
|
1990
|
+
for (const auto& [type, resource_map] : authority_state.type_map) {
|
1991
|
+
labels.resource_type = type->type_url();
|
1801
1992
|
// Count the number of entries in each state.
|
1802
1993
|
std::map<absl::string_view, uint64_t> counts;
|
1803
|
-
for (const auto&
|
1804
|
-
|
1994
|
+
for (const auto& [_, resource_state] : resource_map) {
|
1995
|
+
if (resource_state.HasWatchers()) {
|
1996
|
+
++counts[resource_state.CacheStateString()];
|
1997
|
+
}
|
1805
1998
|
}
|
1806
1999
|
// Report the count for each state.
|
1807
|
-
for (const auto&
|
1808
|
-
labels.cache_state =
|
1809
|
-
func(labels,
|
2000
|
+
for (const auto& [state, count] : counts) {
|
2001
|
+
labels.cache_state = state;
|
2002
|
+
func(labels, count);
|
1810
2003
|
}
|
1811
2004
|
}
|
1812
2005
|
}
|
@@ -1814,8 +2007,8 @@ void XdsClient::ReportResourceCounts(
|
|
1814
2007
|
|
1815
2008
|
void XdsClient::ReportServerConnections(
|
1816
2009
|
absl::FunctionRef<void(absl::string_view, bool)> func) {
|
1817
|
-
for (const auto&
|
1818
|
-
func(
|
2010
|
+
for (const auto& [_, xds_channel] : xds_channel_map_) {
|
2011
|
+
func(xds_channel->server_uri(), xds_channel->status().ok());
|
1819
2012
|
}
|
1820
2013
|
}
|
1821
2014
|
|