grpc 1.31.1 → 1.32.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +595 -15723
- data/include/grpc/grpc_security.h +31 -14
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/port_platform.h +6 -1
- data/src/core/ext/filters/client_channel/backup_poller.cc +3 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +64 -20
- data/src/core/ext/filters/client_channel/client_channel.h +1 -1
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -3
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +6 -1
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +2 -3
- data/src/core/ext/filters/client_channel/lb_policy.h +2 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +6 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +20 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +0 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +0 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +1 -37
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +19 -13
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +29 -10
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +5 -4
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +20 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +18 -12
- data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +22 -14
- data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +18 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +54 -56
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +363 -14
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +0 -1
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -4
- data/src/core/ext/filters/client_channel/server_address.cc +40 -7
- data/src/core/ext/filters/client_channel/server_address.h +42 -4
- data/src/core/ext/filters/client_channel/subchannel.cc +64 -23
- data/src/core/ext/filters/client_channel/subchannel.h +16 -4
- data/src/core/ext/filters/max_age/max_age_filter.cc +2 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +87 -31
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +18 -1
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +10 -35
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +19 -25
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +2 -1
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +2 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +6 -6
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +239 -277
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/internal.h +5 -1
- data/src/core/ext/transport/chttp2/transport/parsing.cc +1 -28
- data/src/core/ext/transport/chttp2/transport/writing.cc +6 -5
- data/src/core/ext/transport/inproc/inproc_transport.cc +12 -12
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +224 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +700 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +226 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +380 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1378 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cluster → config/cluster/v3}/filter.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +69 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cluster → config/cluster/v3}/outlier_detection.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +323 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +334 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/backoff.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +79 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +309 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +869 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +96 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +328 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +195 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +634 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +684 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/http_uri.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +80 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +152 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +536 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +58 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/socket_option.upb.c +6 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +220 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +273 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +332 -0
- data/src/core/ext/upb-generated/envoy/config/listener/{v2 → v3}/api_listener.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +108 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +401 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +490 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +41 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +174 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +599 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +204 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +773 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +2855 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +59 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +135 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +50 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +108 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +312 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1125 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +20 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +34 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +111 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +401 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +72 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +198 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +105 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +388 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/cluster/v3}/cds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/{v2 → v3}/ads.upb.c +5 -4
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +129 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +386 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/endpoint/v3}/eds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/listener/v3}/lds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/rds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/srds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +114 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +77 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +145 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +127 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +188 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +250 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +2 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +8 -8
- data/src/core/ext/upb-generated/envoy/type/{percent.upb.c → v3/percent.upb.c} +9 -8
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +86 -0
- data/src/core/ext/upb-generated/envoy/type/{range.upb.c → v3/range.upb.c} +12 -11
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +111 -0
- data/src/core/ext/upb-generated/envoy/type/{semantic_version.upb.c → v3/semantic_version.upb.c} +6 -5
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +61 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +234 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +759 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +36 -36
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +1 -1
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +53 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +11 -11
- data/src/core/ext/upb-generated/validate/validate.upb.h +1 -1
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_api.cc +1045 -767
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_api.h +114 -99
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.cc +44 -2
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.h +8 -3
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel.h +4 -4
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_args.h +3 -3
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_secure.cc +2 -5
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +85 -417
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.h +12 -45
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.cc +2 -2
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +3 -3
- data/src/core/lib/channel/channelz.cc +14 -15
- data/src/core/lib/channel/channelz.h +1 -1
- data/src/core/lib/channel/channelz_registry.cc +3 -1
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/iomgr/endpoint.cc +5 -1
- data/src/core/lib/iomgr/endpoint.h +7 -3
- data/src/core/lib/iomgr/endpoint_cfstream.cc +32 -11
- data/src/core/lib/iomgr/ev_posix.cc +0 -2
- data/src/core/lib/iomgr/iomgr.cc +0 -10
- data/src/core/lib/iomgr/iomgr.h +0 -10
- data/src/core/{ext/filters/client_channel → lib/iomgr}/parse_address.cc +1 -1
- data/src/core/{ext/filters/client_channel → lib/iomgr}/parse_address.h +3 -3
- data/src/core/lib/iomgr/sockaddr_utils.cc +2 -1
- data/src/core/lib/iomgr/sockaddr_utils.h +2 -1
- data/src/core/lib/iomgr/tcp_custom.cc +32 -16
- data/src/core/lib/iomgr/tcp_posix.cc +31 -13
- data/src/core/lib/iomgr/tcp_windows.cc +26 -10
- data/src/core/lib/security/authorization/authorization_engine.cc +177 -0
- data/src/core/lib/security/authorization/authorization_engine.h +84 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +153 -0
- data/src/core/lib/security/authorization/evaluate_args.h +59 -0
- data/src/core/lib/security/authorization/mock_cel/activation.h +57 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +42 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expression.h +68 -0
- data/src/core/lib/security/authorization/mock_cel/cel_value.h +93 -0
- data/src/core/lib/security/authorization/mock_cel/evaluator_core.h +67 -0
- data/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +56 -0
- data/src/core/lib/security/authorization/mock_cel/statusor.h +50 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +56 -38
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +1 -2
- data/src/core/lib/security/transport/secure_endpoint.cc +7 -1
- data/src/core/lib/surface/call.cc +12 -12
- data/src/core/lib/surface/call.h +2 -1
- data/src/core/lib/surface/channel.cc +28 -20
- data/src/core/lib/surface/channel.h +12 -2
- data/src/core/lib/surface/completion_queue.cc +10 -272
- data/src/core/lib/surface/completion_queue.h +0 -8
- data/src/core/lib/surface/init.cc +1 -3
- data/src/core/lib/surface/server.cc +1066 -1244
- data/src/core/lib/surface/server.h +363 -87
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +38 -0
- data/src/core/lib/transport/authority_override.h +32 -0
- data/src/core/lib/transport/connectivity_state.cc +18 -13
- data/src/core/lib/transport/connectivity_state.h +18 -6
- data/src/core/lib/transport/error_utils.cc +13 -0
- data/src/core/lib/transport/error_utils.h +6 -0
- data/src/core/lib/transport/static_metadata.cc +295 -276
- data/src/core/lib/transport/static_metadata.h +80 -73
- data/src/core/lib/transport/transport.h +7 -0
- data/src/core/lib/uri/uri_parser.cc +23 -21
- data/src/core/lib/uri/uri_parser.h +3 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +22 -0
- data/src/core/tsi/ssl_transport_security.cc +3 -9
- data/src/ruby/ext/grpc/rb_channel_credentials.c +9 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -2
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +4 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_credentials_spec.rb +10 -0
- data/src/ruby/spec/generic/active_call_spec.rb +19 -8
- data/third_party/abseil-cpp/absl/algorithm/container.h +1727 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +161 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/container/fixed_array.h +515 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +503 -0
- data/third_party/abseil-cpp/absl/container/internal/common.h +202 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +440 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +146 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +191 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +269 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +297 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +30 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +49 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +741 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +48 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1882 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +138 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1895 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +192 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +125 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +70 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +99 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +248 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +85 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +128 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +194 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +25 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1480 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +324 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +346 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +96 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +55 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +988 -0
- data/third_party/abseil-cpp/absl/status/status.cc +447 -0
- data/third_party/abseil-cpp/absl/status/status.h +428 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +43 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/strings/cord.cc +2019 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1121 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +151 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +697 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +261 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +484 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +159 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2728 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1056 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/variant.h +861 -0
- data/third_party/boringssl-with-bazel/err_data.c +263 -257
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +20 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +52 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +39 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +2 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +11 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +4 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +3 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +10 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +34 -9
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +5 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/upb/upb/decode.c +64 -15
- data/third_party/upb/upb/encode.c +2 -2
- data/third_party/upb/upb/msg.h +2 -2
- data/third_party/upb/upb/port_def.inc +1 -1
- data/third_party/upb/upb/table.c +0 -11
- data/third_party/upb/upb/table.int.h +0 -9
- data/third_party/upb/upb/upb.c +16 -14
- data/third_party/upb/upb/upb.h +26 -0
- data/third_party/upb/upb/upb.hpp +2 -0
- metadata +257 -155
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +0 -114
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +0 -429
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +0 -72
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +0 -198
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +0 -105
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +0 -388
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -403
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1453
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -74
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -226
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -323
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -334
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +0 -79
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -313
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -891
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -96
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +0 -71
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -197
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -649
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -172
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -693
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -152
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -536
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +0 -88
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -129
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -386
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -92
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -224
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -273
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -332
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -109
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -415
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -145
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -538
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -43
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -204
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -815
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -2984
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -59
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -135
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -228
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -732
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -316
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1167
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +0 -51
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +0 -125
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -49
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -136
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -145
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -53
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -86
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -61
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -89
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -250
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
@@ -32,14 +32,15 @@
|
|
32
32
|
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
33
33
|
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
34
34
|
#include "src/core/ext/filters/client_channel/server_address.h"
|
35
|
-
#include "src/core/ext/
|
36
|
-
#include "src/core/ext/
|
37
|
-
#include "src/core/ext/
|
35
|
+
#include "src/core/ext/xds/xds_channel_args.h"
|
36
|
+
#include "src/core/ext/xds/xds_client.h"
|
37
|
+
#include "src/core/ext/xds/xds_client_stats.h"
|
38
38
|
#include "src/core/lib/channel/channel_args.h"
|
39
39
|
#include "src/core/lib/gprpp/orphanable.h"
|
40
40
|
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
41
41
|
#include "src/core/lib/iomgr/timer.h"
|
42
42
|
#include "src/core/lib/iomgr/work_serializer.h"
|
43
|
+
#include "src/core/lib/transport/error_utils.h"
|
43
44
|
#include "src/core/lib/uri/uri_parser.h"
|
44
45
|
|
45
46
|
#define GRPC_EDS_DEFAULT_FALLBACK_TIMEOUT 10000
|
@@ -133,7 +134,7 @@ class EdsLb : public LoadBalancingPolicy {
|
|
133
134
|
|
134
135
|
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
135
136
|
const grpc_channel_args& args) override;
|
136
|
-
void UpdateState(grpc_connectivity_state state,
|
137
|
+
void UpdateState(grpc_connectivity_state state, const absl::Status& status,
|
137
138
|
std::unique_ptr<SubchannelPicker> picker) override;
|
138
139
|
// This is a no-op, because we get the addresses from the xds
|
139
140
|
// client, which is a watch-based API.
|
@@ -214,6 +215,7 @@ class EdsLb : public LoadBalancingPolicy {
|
|
214
215
|
|
215
216
|
// The latest state and picker returned from the child policy.
|
216
217
|
grpc_connectivity_state child_state_;
|
218
|
+
absl::Status child_status_;
|
217
219
|
RefCountedPtr<ChildPickerWrapper> child_picker_;
|
218
220
|
};
|
219
221
|
|
@@ -265,16 +267,21 @@ RefCountedPtr<SubchannelInterface> EdsLb::Helper::CreateSubchannel(
|
|
265
267
|
}
|
266
268
|
|
267
269
|
void EdsLb::Helper::UpdateState(grpc_connectivity_state state,
|
270
|
+
const absl::Status& status,
|
268
271
|
std::unique_ptr<SubchannelPicker> picker) {
|
269
272
|
if (eds_policy_->shutting_down_ || eds_policy_->child_policy_ == nullptr) {
|
270
273
|
return;
|
271
274
|
}
|
272
275
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
|
273
|
-
gpr_log(GPR_INFO,
|
274
|
-
|
276
|
+
gpr_log(GPR_INFO,
|
277
|
+
"[edslb %p] child policy updated state=%s (%s) "
|
278
|
+
"picker=%p",
|
279
|
+
eds_policy_.get(), ConnectivityStateName(state),
|
280
|
+
status.ToString().c_str(), picker.get());
|
275
281
|
}
|
276
282
|
// Save the state and picker.
|
277
283
|
eds_policy_->child_state_ = state;
|
284
|
+
eds_policy_->child_status_ = status;
|
278
285
|
eds_policy_->child_picker_ =
|
279
286
|
MakeRefCounted<ChildPickerWrapper>(std::move(picker));
|
280
287
|
// Wrap the picker in a DropPicker and pass it up.
|
@@ -339,7 +346,7 @@ class EdsLb::EndpointWatcher : public XdsClient::EndpointWatcherInterface {
|
|
339
346
|
// we keep running with the data we had previously.
|
340
347
|
if (eds_policy_->child_policy_ == nullptr) {
|
341
348
|
eds_policy_->channel_control_helper()->UpdateState(
|
342
|
-
GRPC_CHANNEL_TRANSIENT_FAILURE,
|
349
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
|
343
350
|
absl::make_unique<TransientFailurePicker>(error));
|
344
351
|
} else {
|
345
352
|
GRPC_ERROR_UNREF(error);
|
@@ -351,11 +358,12 @@ class EdsLb::EndpointWatcher : public XdsClient::EndpointWatcherInterface {
|
|
351
358
|
GPR_ERROR,
|
352
359
|
"[edslb %p] EDS resource does not exist -- reporting TRANSIENT_FAILURE",
|
353
360
|
eds_policy_.get());
|
361
|
+
grpc_error* error = grpc_error_set_int(
|
362
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("EDS resource does not exist"),
|
363
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
|
354
364
|
eds_policy_->channel_control_helper()->UpdateState(
|
355
|
-
GRPC_CHANNEL_TRANSIENT_FAILURE,
|
356
|
-
absl::make_unique<TransientFailurePicker>(
|
357
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
358
|
-
"EDS resource does not exist")));
|
365
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
|
366
|
+
absl::make_unique<TransientFailurePicker>(error));
|
359
367
|
eds_policy_->MaybeDestroyChildPolicyLocked();
|
360
368
|
}
|
361
369
|
|
@@ -688,7 +696,7 @@ EdsLb::CreateChildPolicyConfigLocked() {
|
|
688
696
|
error),
|
689
697
|
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
|
690
698
|
channel_control_helper()->UpdateState(
|
691
|
-
GRPC_CHANNEL_TRANSIENT_FAILURE,
|
699
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
|
692
700
|
absl::make_unique<TransientFailurePicker>(error));
|
693
701
|
return nullptr;
|
694
702
|
}
|
@@ -769,13 +777,13 @@ void EdsLb::MaybeUpdateDropPickerLocked() {
|
|
769
777
|
// If we're dropping all calls, report READY, regardless of what (or
|
770
778
|
// whether) the child has reported.
|
771
779
|
if (drop_config_ != nullptr && drop_config_->drop_all()) {
|
772
|
-
channel_control_helper()->UpdateState(GRPC_CHANNEL_READY,
|
780
|
+
channel_control_helper()->UpdateState(GRPC_CHANNEL_READY, absl::Status(),
|
773
781
|
absl::make_unique<DropPicker>(this));
|
774
782
|
return;
|
775
783
|
}
|
776
784
|
// Update only if we have a child picker.
|
777
785
|
if (child_picker_ != nullptr) {
|
778
|
-
channel_control_helper()->UpdateState(child_state_,
|
786
|
+
channel_control_helper()->UpdateState(child_state_, child_status_,
|
779
787
|
absl::make_unique<DropPicker>(this));
|
780
788
|
}
|
781
789
|
}
|
@@ -22,8 +22,8 @@
|
|
22
22
|
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
23
23
|
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
24
24
|
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
25
|
-
#include "src/core/ext/
|
26
|
-
#include "src/core/ext/
|
25
|
+
#include "src/core/ext/xds/xds_client.h"
|
26
|
+
#include "src/core/ext/xds/xds_client_stats.h"
|
27
27
|
#include "src/core/lib/channel/channel_args.h"
|
28
28
|
#include "src/core/lib/gprpp/orphanable.h"
|
29
29
|
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
@@ -120,7 +120,7 @@ class LrsLb : public LoadBalancingPolicy {
|
|
120
120
|
|
121
121
|
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
122
122
|
const grpc_channel_args& args) override;
|
123
|
-
void UpdateState(grpc_connectivity_state state,
|
123
|
+
void UpdateState(grpc_connectivity_state state, const absl::Status& status,
|
124
124
|
std::unique_ptr<SubchannelPicker> picker) override;
|
125
125
|
void RequestReresolution() override;
|
126
126
|
void AddTraceEvent(TraceSeverity severity,
|
@@ -157,6 +157,7 @@ class LrsLb : public LoadBalancingPolicy {
|
|
157
157
|
|
158
158
|
// Latest state and picker reported by the child policy.
|
159
159
|
grpc_connectivity_state state_ = GRPC_CHANNEL_IDLE;
|
160
|
+
absl::Status status_;
|
160
161
|
RefCountedPtr<RefCountedPicker> picker_;
|
161
162
|
};
|
162
163
|
|
@@ -266,10 +267,14 @@ void LrsLb::MaybeUpdatePickerLocked() {
|
|
266
267
|
auto lrs_picker =
|
267
268
|
absl::make_unique<LoadReportingPicker>(picker_, locality_stats_);
|
268
269
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_lrs_trace)) {
|
269
|
-
gpr_log(
|
270
|
-
|
270
|
+
gpr_log(
|
271
|
+
GPR_INFO,
|
272
|
+
"[lrs_lb %p] updating connectivity: state=%s status=(%s) picker=%p",
|
273
|
+
this, ConnectivityStateName(state_), status_.ToString().c_str(),
|
274
|
+
lrs_picker.get());
|
271
275
|
}
|
272
|
-
channel_control_helper()->UpdateState(state_,
|
276
|
+
channel_control_helper()->UpdateState(state_, status_,
|
277
|
+
std::move(lrs_picker));
|
273
278
|
}
|
274
279
|
}
|
275
280
|
|
@@ -325,15 +330,19 @@ RefCountedPtr<SubchannelInterface> LrsLb::Helper::CreateSubchannel(
|
|
325
330
|
}
|
326
331
|
|
327
332
|
void LrsLb::Helper::UpdateState(grpc_connectivity_state state,
|
333
|
+
const absl::Status& status,
|
328
334
|
std::unique_ptr<SubchannelPicker> picker) {
|
329
335
|
if (lrs_policy_->shutting_down_) return;
|
330
336
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_lrs_trace)) {
|
331
|
-
gpr_log(
|
332
|
-
|
333
|
-
|
337
|
+
gpr_log(
|
338
|
+
GPR_INFO,
|
339
|
+
"[lrs_lb %p] child connectivity state update: state=%s (%s) picker=%p",
|
340
|
+
lrs_policy_.get(), ConnectivityStateName(state),
|
341
|
+
status.ToString().c_str(), picker.get());
|
334
342
|
}
|
335
343
|
// Save the state and picker.
|
336
344
|
lrs_policy_->state_ = state;
|
345
|
+
lrs_policy_->status_ = status;
|
337
346
|
lrs_policy_->picker_ = MakeRefCounted<RefCountedPicker>(std::move(picker));
|
338
347
|
// Wrap the picker and return it to the channel.
|
339
348
|
lrs_policy_->MaybeUpdatePickerLocked();
|
@@ -35,13 +35,14 @@
|
|
35
35
|
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
36
36
|
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
37
37
|
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
38
|
-
#include "src/core/ext/
|
38
|
+
#include "src/core/ext/xds/xds_api.h"
|
39
39
|
#include "src/core/lib/channel/channel_args.h"
|
40
40
|
#include "src/core/lib/gpr/string.h"
|
41
41
|
#include "src/core/lib/gprpp/orphanable.h"
|
42
42
|
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
43
43
|
#include "src/core/lib/iomgr/timer.h"
|
44
44
|
#include "src/core/lib/iomgr/work_serializer.h"
|
45
|
+
#include "src/core/lib/transport/error_utils.h"
|
45
46
|
|
46
47
|
#define GRPC_XDS_ROUTING_CHILD_RETENTION_INTERVAL_MS (15 * 60 * 1000)
|
47
48
|
|
@@ -57,7 +58,7 @@ constexpr char kXdsRouting[] = "xds_routing_experimental";
|
|
57
58
|
class XdsRoutingLbConfig : public LoadBalancingPolicy::Config {
|
58
59
|
public:
|
59
60
|
struct Route {
|
60
|
-
XdsApi::
|
61
|
+
XdsApi::Route::Matchers matchers;
|
61
62
|
std::string action;
|
62
63
|
};
|
63
64
|
using RouteTable = std::vector<Route>;
|
@@ -111,7 +112,7 @@ class XdsRoutingLb : public LoadBalancingPolicy {
|
|
111
112
|
class RoutePicker : public SubchannelPicker {
|
112
113
|
public:
|
113
114
|
struct Route {
|
114
|
-
const XdsApi::
|
115
|
+
const XdsApi::Route::Matchers* matchers;
|
115
116
|
RefCountedPtr<ChildPickerWrapper> picker;
|
116
117
|
};
|
117
118
|
|
@@ -127,7 +128,7 @@ class XdsRoutingLb : public LoadBalancingPolicy {
|
|
127
128
|
private:
|
128
129
|
RouteTable route_table_;
|
129
130
|
// Take a reference to config so that we can use
|
130
|
-
// XdsApi::
|
131
|
+
// XdsApi::Route::Matchers from it.
|
131
132
|
RefCountedPtr<XdsRoutingLbConfig> config_;
|
132
133
|
};
|
133
134
|
|
@@ -165,6 +166,7 @@ class XdsRoutingLb : public LoadBalancingPolicy {
|
|
165
166
|
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
166
167
|
const grpc_channel_args& args) override;
|
167
168
|
void UpdateState(grpc_connectivity_state state,
|
169
|
+
const absl::Status& status,
|
168
170
|
std::unique_ptr<SubchannelPicker> picker) override;
|
169
171
|
void RequestReresolution() override;
|
170
172
|
void AddTraceEvent(TraceSeverity severity,
|
@@ -220,18 +222,14 @@ class XdsRoutingLb : public LoadBalancingPolicy {
|
|
220
222
|
// XdsRoutingLb::RoutePicker
|
221
223
|
//
|
222
224
|
|
223
|
-
bool PathMatch(
|
224
|
-
|
225
|
-
const XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher& path_matcher) {
|
225
|
+
bool PathMatch(const absl::string_view& path,
|
226
|
+
const XdsApi::Route::Matchers::PathMatcher& path_matcher) {
|
226
227
|
switch (path_matcher.type) {
|
227
|
-
case XdsApi::
|
228
|
-
PREFIX:
|
228
|
+
case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PREFIX:
|
229
229
|
return absl::StartsWith(path, path_matcher.string_matcher);
|
230
|
-
case XdsApi::
|
231
|
-
PATH:
|
230
|
+
case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PATH:
|
232
231
|
return path == path_matcher.string_matcher;
|
233
|
-
case XdsApi::
|
234
|
-
REGEX:
|
232
|
+
case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::REGEX:
|
235
233
|
return RE2::FullMatch(path.data(), *path_matcher.regex_matcher);
|
236
234
|
default:
|
237
235
|
return false;
|
@@ -260,7 +258,7 @@ absl::optional<absl::string_view> GetMetadataValue(
|
|
260
258
|
}
|
261
259
|
|
262
260
|
bool HeaderMatchHelper(
|
263
|
-
const XdsApi::
|
261
|
+
const XdsApi::Route::Matchers::HeaderMatcher& header_matcher,
|
264
262
|
LoadBalancingPolicy::MetadataInterface* initial_metadata) {
|
265
263
|
std::string concatenated_value;
|
266
264
|
absl::optional<absl::string_view> value;
|
@@ -277,8 +275,8 @@ bool HeaderMatchHelper(
|
|
277
275
|
&concatenated_value);
|
278
276
|
}
|
279
277
|
if (!value.has_value()) {
|
280
|
-
if (header_matcher.type ==
|
281
|
-
|
278
|
+
if (header_matcher.type ==
|
279
|
+
XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PRESENT) {
|
282
280
|
return !header_matcher.present_match;
|
283
281
|
} else {
|
284
282
|
// For all other header matcher types, we need the header value to
|
@@ -287,25 +285,20 @@ bool HeaderMatchHelper(
|
|
287
285
|
}
|
288
286
|
}
|
289
287
|
switch (header_matcher.type) {
|
290
|
-
case XdsApi::
|
291
|
-
HeaderMatcherType::EXACT:
|
288
|
+
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::EXACT:
|
292
289
|
return value.value() == header_matcher.string_matcher;
|
293
|
-
case XdsApi::
|
294
|
-
HeaderMatcherType::REGEX:
|
290
|
+
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::REGEX:
|
295
291
|
return RE2::FullMatch(value.value().data(), *header_matcher.regex_match);
|
296
|
-
case XdsApi::
|
297
|
-
HeaderMatcherType::RANGE:
|
292
|
+
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::RANGE:
|
298
293
|
int64_t int_value;
|
299
294
|
if (!absl::SimpleAtoi(value.value(), &int_value)) {
|
300
295
|
return false;
|
301
296
|
}
|
302
297
|
return int_value >= header_matcher.range_start &&
|
303
298
|
int_value < header_matcher.range_end;
|
304
|
-
case XdsApi::
|
305
|
-
HeaderMatcherType::PREFIX:
|
299
|
+
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PREFIX:
|
306
300
|
return absl::StartsWith(value.value(), header_matcher.string_matcher);
|
307
|
-
case XdsApi::
|
308
|
-
HeaderMatcherType::SUFFIX:
|
301
|
+
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::SUFFIX:
|
309
302
|
return absl::EndsWith(value.value(), header_matcher.string_matcher);
|
310
303
|
default:
|
311
304
|
return false;
|
@@ -313,8 +306,7 @@ bool HeaderMatchHelper(
|
|
313
306
|
}
|
314
307
|
|
315
308
|
bool HeadersMatch(
|
316
|
-
const std::vector<XdsApi::
|
317
|
-
header_matchers,
|
309
|
+
const std::vector<XdsApi::Route::Matchers::HeaderMatcher>& header_matchers,
|
318
310
|
LoadBalancingPolicy::MetadataInterface* initial_metadata) {
|
319
311
|
for (const auto& header_matcher : header_matchers) {
|
320
312
|
bool match = HeaderMatchHelper(header_matcher, initial_metadata);
|
@@ -465,6 +457,7 @@ void XdsRoutingLb::UpdateStateLocked() {
|
|
465
457
|
ConnectivityStateName(connectivity_state));
|
466
458
|
}
|
467
459
|
std::unique_ptr<SubchannelPicker> picker;
|
460
|
+
absl::Status status;
|
468
461
|
switch (connectivity_state) {
|
469
462
|
case GRPC_CHANNEL_READY: {
|
470
463
|
RoutePicker::RouteTable route_table;
|
@@ -494,12 +487,15 @@ void XdsRoutingLb::UpdateStateLocked() {
|
|
494
487
|
absl::make_unique<QueuePicker>(Ref(DEBUG_LOCATION, "QueuePicker"));
|
495
488
|
break;
|
496
489
|
default:
|
497
|
-
|
490
|
+
grpc_error* error = grpc_error_set_int(
|
498
491
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
499
492
|
"TRANSIENT_FAILURE from XdsRoutingLb"),
|
500
|
-
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE)
|
493
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
|
494
|
+
status = grpc_error_to_absl_status(error);
|
495
|
+
picker = absl::make_unique<TransientFailurePicker>(error);
|
501
496
|
}
|
502
|
-
channel_control_helper()->UpdateState(connectivity_state,
|
497
|
+
channel_control_helper()->UpdateState(connectivity_state, status,
|
498
|
+
std::move(picker));
|
503
499
|
}
|
504
500
|
|
505
501
|
//
|
@@ -655,13 +651,15 @@ XdsRoutingLb::XdsRoutingChild::Helper::CreateSubchannel(
|
|
655
651
|
}
|
656
652
|
|
657
653
|
void XdsRoutingLb::XdsRoutingChild::Helper::UpdateState(
|
658
|
-
grpc_connectivity_state state,
|
654
|
+
grpc_connectivity_state state, const absl::Status& status,
|
655
|
+
std::unique_ptr<SubchannelPicker> picker) {
|
659
656
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) {
|
660
657
|
gpr_log(GPR_INFO,
|
661
|
-
"[xds_routing_lb %p] child %s: received update: state=%s
|
658
|
+
"[xds_routing_lb %p] child %s: received update: state=%s (%s) "
|
659
|
+
"picker=%p",
|
662
660
|
xds_routing_child_->xds_routing_policy_.get(),
|
663
661
|
xds_routing_child_->name_.c_str(), ConnectivityStateName(state),
|
664
|
-
picker.get());
|
662
|
+
status.ToString().c_str(), picker.get());
|
665
663
|
}
|
666
664
|
if (xds_routing_child_->xds_routing_policy_->shutting_down_) return;
|
667
665
|
// Cache the picker in the XdsRoutingChild.
|
@@ -857,8 +855,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
857
855
|
"field:prefix error: should be string"));
|
858
856
|
} else {
|
859
857
|
path_matcher_seen = true;
|
860
|
-
route->matchers.path_matcher.type =
|
861
|
-
Matchers::PathMatcher::PathMatcherType::PREFIX;
|
858
|
+
route->matchers.path_matcher.type =
|
859
|
+
XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PREFIX;
|
862
860
|
route->matchers.path_matcher.string_matcher = it->second.string_value();
|
863
861
|
}
|
864
862
|
}
|
@@ -873,8 +871,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
873
871
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
874
872
|
"field:path error: should be string"));
|
875
873
|
} else {
|
876
|
-
route->matchers.path_matcher.type =
|
877
|
-
Matchers::PathMatcher::PathMatcherType::PATH;
|
874
|
+
route->matchers.path_matcher.type =
|
875
|
+
XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PATH;
|
878
876
|
route->matchers.path_matcher.string_matcher =
|
879
877
|
it->second.string_value();
|
880
878
|
}
|
@@ -891,8 +889,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
891
889
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
892
890
|
"field:regex error: should be string"));
|
893
891
|
} else {
|
894
|
-
route->matchers.path_matcher.type =
|
895
|
-
Matchers::PathMatcher::PathMatcherType::REGEX;
|
892
|
+
route->matchers.path_matcher.type =
|
893
|
+
XdsApi::Route::Matchers::PathMatcher::PathMatcherType::REGEX;
|
896
894
|
route->matchers.path_matcher.regex_matcher =
|
897
895
|
absl::make_unique<RE2>(it->second.string_value());
|
898
896
|
}
|
@@ -917,8 +915,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
917
915
|
"value should be of type object"));
|
918
916
|
} else {
|
919
917
|
route->matchers.header_matchers.emplace_back();
|
920
|
-
XdsApi::
|
921
|
-
|
918
|
+
XdsApi::Route::Matchers::HeaderMatcher& header_matcher =
|
919
|
+
route->matchers.header_matchers.back();
|
922
920
|
auto header_it = header_json.object_value().find("name");
|
923
921
|
if (header_it == header_json.object_value().end()) {
|
924
922
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
@@ -952,8 +950,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
952
950
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
953
951
|
"field:exact_match error: should be string"));
|
954
952
|
} else {
|
955
|
-
header_matcher.type = XdsApi::
|
956
|
-
|
953
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
954
|
+
HeaderMatcherType::EXACT;
|
957
955
|
header_matcher.string_matcher =
|
958
956
|
header_it->second.string_value();
|
959
957
|
}
|
@@ -970,8 +968,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
970
968
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
971
969
|
"field:regex_match error: should be string"));
|
972
970
|
} else {
|
973
|
-
header_matcher.type = XdsApi::
|
974
|
-
|
971
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
972
|
+
HeaderMatcherType::REGEX;
|
975
973
|
header_matcher.regex_match =
|
976
974
|
absl::make_unique<RE2>(header_it->second.string_value());
|
977
975
|
}
|
@@ -1017,8 +1015,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
1017
1015
|
"field:end missing"));
|
1018
1016
|
}
|
1019
1017
|
if (header_matcher.range_end > header_matcher.range_start) {
|
1020
|
-
header_matcher.type = XdsApi::
|
1021
|
-
|
1018
|
+
header_matcher.type = XdsApi::Route::Matchers::
|
1019
|
+
HeaderMatcher::HeaderMatcherType::RANGE;
|
1022
1020
|
}
|
1023
1021
|
}
|
1024
1022
|
}
|
@@ -1032,12 +1030,12 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
1032
1030
|
} else {
|
1033
1031
|
header_matcher_seen = true;
|
1034
1032
|
if (header_it->second.type() == Json::Type::JSON_TRUE) {
|
1035
|
-
header_matcher.type = XdsApi::
|
1036
|
-
|
1033
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
1034
|
+
HeaderMatcherType::PRESENT;
|
1037
1035
|
header_matcher.present_match = true;
|
1038
1036
|
} else if (header_it->second.type() == Json::Type::JSON_FALSE) {
|
1039
|
-
header_matcher.type = XdsApi::
|
1040
|
-
|
1037
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
1038
|
+
HeaderMatcherType::PRESENT;
|
1041
1039
|
header_matcher.present_match = false;
|
1042
1040
|
} else {
|
1043
1041
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
@@ -1057,8 +1055,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
1057
1055
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1058
1056
|
"field:prefix_match error: should be string"));
|
1059
1057
|
} else {
|
1060
|
-
header_matcher.type = XdsApi::
|
1061
|
-
|
1058
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
1059
|
+
HeaderMatcherType::PREFIX;
|
1062
1060
|
header_matcher.string_matcher =
|
1063
1061
|
header_it->second.string_value();
|
1064
1062
|
}
|
@@ -1076,8 +1074,8 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory {
|
|
1076
1074
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1077
1075
|
"field:suffix_match error: should be string"));
|
1078
1076
|
} else {
|
1079
|
-
header_matcher.type = XdsApi::
|
1080
|
-
|
1077
|
+
header_matcher.type = XdsApi::Route::Matchers::HeaderMatcher::
|
1078
|
+
HeaderMatcherType::SUFFIX;
|
1081
1079
|
header_matcher.string_matcher =
|
1082
1080
|
header_it->second.string_value();
|
1083
1081
|
}
|