grpc 1.25.0 → 1.26.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 +782 -291
- data/include/grpc/impl/codegen/grpc_types.h +4 -0
- data/include/grpc/impl/codegen/port_platform.h +7 -0
- data/include/grpc/support/alloc.h +0 -16
- data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
- data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
- data/src/core/ext/filters/client_channel/connector.h +40 -45
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
- data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
- data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
- data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
- data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
- data/src/core/ext/filters/client_channel/resolver.cc +2 -1
- data/src/core/ext/filters/client_channel/resolver.h +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
- data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
- data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
- data/src/core/ext/filters/client_channel/service_config.cc +15 -14
- data/src/core/ext/filters/client_channel/service_config.h +14 -19
- data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
- data/src/core/ext/filters/client_channel/subchannel.h +11 -12
- data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
- data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
- data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
- data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
- data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
- data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
- data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
- data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
- data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
- data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
- data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
- data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
- data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
- data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
- data/src/core/lib/avl/avl.cc +1 -1
- data/src/core/lib/channel/channel_stack.cc +1 -1
- data/src/core/lib/channel/channel_stack.h +16 -4
- data/src/core/lib/channel/channel_trace.cc +4 -4
- data/src/core/lib/channel/channelz.cc +46 -46
- data/src/core/lib/channel/channelz.h +37 -35
- data/src/core/lib/channel/channelz_registry.cc +2 -2
- data/src/core/lib/channel/channelz_registry.h +1 -1
- data/src/core/lib/channel/connected_channel.cc +3 -2
- data/src/core/lib/channel/handshaker.cc +1 -1
- data/src/core/lib/channel/handshaker_registry.cc +5 -5
- data/src/core/lib/channel/handshaker_registry.h +3 -3
- data/src/core/lib/compression/message_compress.cc +3 -2
- data/src/core/lib/compression/stream_compression_identity.cc +5 -7
- data/src/core/lib/gpr/alloc.cc +4 -29
- data/src/core/lib/gpr/cpu_linux.cc +1 -1
- data/src/core/lib/gprpp/fork.cc +4 -4
- data/src/core/lib/gprpp/global_config_env.cc +7 -7
- data/src/core/lib/gprpp/global_config_env.h +2 -2
- data/src/core/lib/gprpp/host_port.cc +8 -8
- data/src/core/lib/gprpp/host_port.h +3 -3
- data/src/core/lib/gprpp/inlined_vector.h +13 -0
- data/src/core/lib/gprpp/map.h +2 -9
- data/src/core/lib/gprpp/memory.h +12 -98
- data/src/core/lib/gprpp/orphanable.h +3 -3
- data/src/core/lib/gprpp/ref_counted.h +3 -3
- data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
- data/src/core/lib/gprpp/string_view.h +45 -23
- data/src/core/lib/gprpp/thd.h +1 -1
- data/src/core/lib/gprpp/thd_posix.cc +6 -5
- data/src/core/lib/gprpp/thd_windows.cc +3 -3
- data/src/core/lib/http/httpcli.cc +1 -1
- data/src/core/lib/http/httpcli_security_connector.cc +3 -3
- data/src/core/lib/iomgr/buffer_list.cc +10 -5
- data/src/core/lib/iomgr/call_combiner.cc +7 -6
- data/src/core/lib/iomgr/call_combiner.h +4 -3
- data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
- data/src/core/lib/iomgr/closure.h +33 -135
- data/src/core/lib/iomgr/combiner.cc +10 -17
- data/src/core/lib/iomgr/combiner.h +0 -2
- data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
- data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
- data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
- data/src/core/lib/iomgr/exec_ctx.cc +52 -5
- data/src/core/lib/iomgr/exec_ctx.h +6 -2
- data/src/core/lib/iomgr/executor.cc +16 -37
- data/src/core/lib/iomgr/executor.h +4 -7
- data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
- data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
- data/src/core/lib/iomgr/lockfree_event.cc +9 -8
- data/src/core/lib/iomgr/logical_thread.cc +103 -0
- data/src/core/lib/iomgr/logical_thread.h +52 -0
- data/src/core/lib/iomgr/pollset_custom.cc +5 -5
- data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
- data/src/core/lib/iomgr/pollset_windows.cc +16 -2
- data/src/core/lib/iomgr/port.h +3 -0
- data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
- data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
- data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
- data/src/core/lib/iomgr/resource_quota.cc +26 -21
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
- data/src/core/lib/iomgr/socket_windows.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
- data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
- data/src/core/lib/iomgr/tcp_custom.cc +10 -9
- data/src/core/lib/iomgr/tcp_posix.cc +19 -15
- data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
- data/src/core/lib/iomgr/tcp_windows.cc +16 -13
- data/src/core/lib/iomgr/timer_custom.cc +4 -3
- data/src/core/lib/iomgr/timer_generic.cc +11 -9
- data/src/core/lib/iomgr/udp_server.cc +16 -13
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
- data/src/core/lib/security/credentials/credentials.cc +8 -8
- data/src/core/lib/security/credentials/credentials.h +5 -5
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
- data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
- data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
- data/src/core/lib/security/security_connector/security_connector.h +1 -1
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
- data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
- data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
- data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
- data/src/core/lib/security/transport/security_handshaker.cc +67 -23
- data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
- data/src/core/lib/security/transport/target_authority_table.h +1 -1
- data/src/core/lib/slice/b64.cc +3 -4
- data/src/core/lib/slice/b64.h +1 -2
- data/src/core/lib/slice/slice.cc +8 -13
- data/src/core/lib/surface/call.cc +19 -19
- data/src/core/lib/surface/call.h +6 -7
- data/src/core/lib/surface/call_log_batch.cc +1 -2
- data/src/core/lib/surface/channel.cc +17 -18
- data/src/core/lib/surface/channel.h +4 -19
- data/src/core/lib/surface/channel_ping.cc +1 -1
- data/src/core/lib/surface/completion_queue.cc +21 -22
- data/src/core/lib/surface/completion_queue_factory.cc +1 -1
- data/src/core/lib/surface/init.cc +1 -1
- data/src/core/lib/surface/init_secure.cc +2 -2
- data/src/core/lib/surface/lame_client.cc +10 -12
- data/src/core/lib/surface/server.cc +24 -18
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/byte_stream.cc +2 -2
- data/src/core/lib/transport/byte_stream.h +2 -1
- data/src/core/lib/transport/connectivity_state.cc +4 -4
- data/src/core/lib/transport/connectivity_state.h +2 -2
- data/src/core/lib/transport/metadata.cc +8 -10
- data/src/core/lib/transport/metadata.h +5 -8
- data/src/core/lib/transport/metadata_batch.cc +6 -0
- data/src/core/lib/transport/static_metadata.cc +2 -4
- data/src/core/lib/transport/status_metadata.cc +7 -0
- data/src/core/lib/transport/status_metadata.h +18 -0
- data/src/core/lib/transport/transport.cc +9 -7
- data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
- data/src/core/tsi/ssl_transport_security.cc +2 -1
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/upb/upb/decode.c +1 -0
- metadata +34 -32
- data/src/core/ext/filters/client_channel/connector.cc +0 -41
- data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
- data/src/core/lib/gprpp/set.h +0 -33
@@ -108,8 +108,7 @@ char* grpc_op_string(const grpc_op* op) {
|
|
108
108
|
}
|
109
109
|
|
110
110
|
void grpc_call_log_batch(const char* file, int line, gpr_log_severity severity,
|
111
|
-
|
112
|
-
void* tag) {
|
111
|
+
const grpc_op* ops, size_t nops) {
|
113
112
|
char* tmp;
|
114
113
|
size_t i;
|
115
114
|
for (i = 0; i < nops; i++) {
|
@@ -122,11 +122,15 @@ grpc_channel* grpc_channel_create_with_builder(
|
|
122
122
|
static_cast<uint32_t>(args->args[i].value.integer) |
|
123
123
|
0x1; /* always support no compression */
|
124
124
|
} else if (0 == strcmp(args->args[i].key, GRPC_ARG_CHANNELZ_CHANNEL_NODE)) {
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
125
|
+
if (args->args[i].type == GRPC_ARG_POINTER) {
|
126
|
+
GPR_ASSERT(args->args[i].value.pointer.p != nullptr);
|
127
|
+
channel->channelz_node = static_cast<grpc_core::channelz::ChannelNode*>(
|
128
|
+
args->args[i].value.pointer.p)
|
129
|
+
->Ref();
|
130
|
+
} else {
|
131
|
+
gpr_log(GPR_DEBUG,
|
132
|
+
GRPC_ARG_CHANNELZ_CHANNEL_NODE " should be a pointer");
|
133
|
+
}
|
130
134
|
}
|
131
135
|
}
|
132
136
|
|
@@ -198,11 +202,11 @@ void CreateChannelzNode(grpc_channel_stack_builder* builder) {
|
|
198
202
|
const intptr_t channelz_parent_uuid =
|
199
203
|
grpc_core::channelz::GetParentUuidFromArgs(*args);
|
200
204
|
// Create the channelz node.
|
205
|
+
const char* target = grpc_channel_stack_builder_get_target(builder);
|
201
206
|
grpc_core::RefCountedPtr<grpc_core::channelz::ChannelNode> channelz_node =
|
202
207
|
grpc_core::MakeRefCounted<grpc_core::channelz::ChannelNode>(
|
203
|
-
|
204
|
-
|
205
|
-
channel_tracer_max_memory, channelz_parent_uuid);
|
208
|
+
target != nullptr ? target : "", channel_tracer_max_memory,
|
209
|
+
channelz_parent_uuid);
|
206
210
|
channelz_node->AddTraceEvent(
|
207
211
|
grpc_core::channelz::ChannelTrace::Severity::Info,
|
208
212
|
grpc_slice_from_static_string("Channel created"));
|
@@ -463,7 +467,7 @@ grpc_call* grpc_channel_create_registered_call(
|
|
463
467
|
return call;
|
464
468
|
}
|
465
469
|
|
466
|
-
static void destroy_channel(void* arg, grpc_error* error) {
|
470
|
+
static void destroy_channel(void* arg, grpc_error* /*error*/) {
|
467
471
|
grpc_channel* channel = static_cast<grpc_channel*>(arg);
|
468
472
|
if (channel->channelz_node != nullptr) {
|
469
473
|
if (channel->channelz_node->parent_uuid() > 0) {
|
@@ -500,23 +504,18 @@ static void destroy_channel(void* arg, grpc_error* error) {
|
|
500
504
|
grpc_shutdown();
|
501
505
|
}
|
502
506
|
|
503
|
-
void
|
507
|
+
void grpc_channel_destroy_internal(grpc_channel* channel) {
|
504
508
|
grpc_transport_op* op = grpc_make_transport_op(nullptr);
|
505
509
|
grpc_channel_element* elem;
|
506
|
-
grpc_core::ExecCtx exec_ctx;
|
507
510
|
GRPC_API_TRACE("grpc_channel_destroy(channel=%p)", 1, (channel));
|
508
511
|
op->disconnect_with_error =
|
509
512
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel Destroyed");
|
510
513
|
elem = grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0);
|
511
514
|
elem->filter->start_transport_op(elem, op);
|
512
|
-
|
513
515
|
GRPC_CHANNEL_INTERNAL_UNREF(channel, "channel");
|
514
516
|
}
|
515
517
|
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
gpr_ltoa(i, tmp);
|
520
|
-
return grpc_mdelem_from_slices(GRPC_MDSTR_GRPC_STATUS,
|
521
|
-
grpc_core::UnmanagedMemorySlice(tmp));
|
518
|
+
void grpc_channel_destroy(grpc_channel* channel) {
|
519
|
+
grpc_core::ExecCtx exec_ctx;
|
520
|
+
grpc_channel_destroy_internal(channel);
|
522
521
|
}
|
@@ -32,6 +32,10 @@ grpc_channel* grpc_channel_create(const char* target,
|
|
32
32
|
grpc_transport* optional_transport,
|
33
33
|
grpc_resource_user* resource_user = nullptr);
|
34
34
|
|
35
|
+
/** The same as grpc_channel_destroy, but doesn't create an ExecCtx, and so
|
36
|
+
* is safe to use from within core. */
|
37
|
+
void grpc_channel_destroy_internal(grpc_channel* channel);
|
38
|
+
|
35
39
|
grpc_channel* grpc_channel_create_with_builder(
|
36
40
|
grpc_channel_stack_builder* builder,
|
37
41
|
grpc_channel_stack_type channel_stack_type);
|
@@ -55,25 +59,6 @@ grpc_channel_stack* grpc_channel_get_channel_stack(grpc_channel* channel);
|
|
55
59
|
grpc_core::channelz::ChannelNode* grpc_channel_get_channelz_node(
|
56
60
|
grpc_channel* channel);
|
57
61
|
|
58
|
-
/** Get a grpc_mdelem of grpc-status: X where X is the numeric value of
|
59
|
-
status_code.
|
60
|
-
|
61
|
-
The returned elem is owned by the caller. */
|
62
|
-
grpc_mdelem grpc_channel_get_reffed_status_elem_slowpath(grpc_channel* channel,
|
63
|
-
int status_code);
|
64
|
-
inline grpc_mdelem grpc_channel_get_reffed_status_elem(grpc_channel* channel,
|
65
|
-
int status_code) {
|
66
|
-
switch (status_code) {
|
67
|
-
case 0:
|
68
|
-
return GRPC_MDELEM_GRPC_STATUS_0;
|
69
|
-
case 1:
|
70
|
-
return GRPC_MDELEM_GRPC_STATUS_1;
|
71
|
-
case 2:
|
72
|
-
return GRPC_MDELEM_GRPC_STATUS_2;
|
73
|
-
}
|
74
|
-
return grpc_channel_get_reffed_status_elem_slowpath(channel, status_code);
|
75
|
-
}
|
76
|
-
|
77
62
|
size_t grpc_channel_get_call_size_estimate(grpc_channel* channel);
|
78
63
|
void grpc_channel_update_call_size_estimate(grpc_channel* channel, size_t size);
|
79
64
|
|
@@ -131,7 +131,7 @@ grpc_error* non_polling_poller_work(grpc_pollset* pollset,
|
|
131
131
|
npp->root = w.next;
|
132
132
|
if (&w == npp->root) {
|
133
133
|
if (npp->shutdown) {
|
134
|
-
|
134
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, npp->shutdown, GRPC_ERROR_NONE);
|
135
135
|
}
|
136
136
|
npp->root = nullptr;
|
137
137
|
}
|
@@ -166,7 +166,7 @@ void non_polling_poller_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
|
|
166
166
|
GPR_ASSERT(closure != nullptr);
|
167
167
|
p->shutdown = closure;
|
168
168
|
if (p->root == nullptr) {
|
169
|
-
|
169
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_NONE);
|
170
170
|
} else {
|
171
171
|
non_polling_worker* w = p->root;
|
172
172
|
do {
|
@@ -529,7 +529,8 @@ grpc_completion_queue* grpc_completion_queue_create_internal(
|
|
529
529
|
}
|
530
530
|
|
531
531
|
static void cq_init_next(
|
532
|
-
void* data,
|
532
|
+
void* data,
|
533
|
+
grpc_experimental_completion_queue_functor* /*shutdown_callback*/) {
|
533
534
|
new (data) cq_next_data();
|
534
535
|
}
|
535
536
|
|
@@ -539,7 +540,8 @@ static void cq_destroy_next(void* data) {
|
|
539
540
|
}
|
540
541
|
|
541
542
|
static void cq_init_pluck(
|
542
|
-
void* data,
|
543
|
+
void* data,
|
544
|
+
grpc_experimental_completion_queue_functor* /*shutdown_callback*/) {
|
543
545
|
new (data) cq_pluck_data();
|
544
546
|
}
|
545
547
|
|
@@ -582,7 +584,7 @@ void grpc_cq_internal_ref(grpc_completion_queue* cq) {
|
|
582
584
|
cq->owning_refs.Ref(debug_location, reason);
|
583
585
|
}
|
584
586
|
|
585
|
-
static void on_pollset_shutdown_done(void* arg, grpc_error* error) {
|
587
|
+
static void on_pollset_shutdown_done(void* arg, grpc_error* /*error*/) {
|
586
588
|
grpc_completion_queue* cq = static_cast<grpc_completion_queue*>(arg);
|
587
589
|
GRPC_CQ_INTERNAL_UNREF(cq, "pollset_destroy");
|
588
590
|
}
|
@@ -630,20 +632,21 @@ static void cq_check_tag(grpc_completion_queue* cq, void* tag, bool lock_cq) {
|
|
630
632
|
GPR_ASSERT(found);
|
631
633
|
}
|
632
634
|
#else
|
633
|
-
static void cq_check_tag(grpc_completion_queue* cq
|
635
|
+
static void cq_check_tag(grpc_completion_queue* /*cq*/, void* /*tag*/,
|
636
|
+
bool /*lock_cq*/) {}
|
634
637
|
#endif
|
635
638
|
|
636
|
-
static bool cq_begin_op_for_next(grpc_completion_queue* cq, void* tag) {
|
639
|
+
static bool cq_begin_op_for_next(grpc_completion_queue* cq, void* /*tag*/) {
|
637
640
|
cq_next_data* cqd = static_cast<cq_next_data*> DATA_FROM_CQ(cq);
|
638
641
|
return cqd->pending_events.IncrementIfNonzero();
|
639
642
|
}
|
640
643
|
|
641
|
-
static bool cq_begin_op_for_pluck(grpc_completion_queue* cq, void* tag) {
|
644
|
+
static bool cq_begin_op_for_pluck(grpc_completion_queue* cq, void* /*tag*/) {
|
642
645
|
cq_pluck_data* cqd = static_cast<cq_pluck_data*> DATA_FROM_CQ(cq);
|
643
646
|
return cqd->pending_events.IncrementIfNonzero();
|
644
647
|
}
|
645
648
|
|
646
|
-
static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag) {
|
649
|
+
static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* /*tag*/) {
|
647
650
|
cq_callback_data* cqd = static_cast<cq_callback_data*> DATA_FROM_CQ(cq);
|
648
651
|
return cqd->pending_events.IncrementIfNonzero();
|
649
652
|
}
|
@@ -669,7 +672,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) {
|
|
669
672
|
static void cq_end_op_for_next(
|
670
673
|
grpc_completion_queue* cq, void* tag, grpc_error* error,
|
671
674
|
void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg,
|
672
|
-
grpc_cq_completion* storage, bool internal) {
|
675
|
+
grpc_cq_completion* storage, bool /*internal*/) {
|
673
676
|
GPR_TIMER_SCOPE("cq_end_op_for_next", 0);
|
674
677
|
|
675
678
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) ||
|
@@ -748,7 +751,7 @@ static void cq_end_op_for_next(
|
|
748
751
|
static void cq_end_op_for_pluck(
|
749
752
|
grpc_completion_queue* cq, void* tag, grpc_error* error,
|
750
753
|
void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg,
|
751
|
-
grpc_cq_completion* storage, bool internal) {
|
754
|
+
grpc_cq_completion* storage, bool /*internal*/) {
|
752
755
|
GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0);
|
753
756
|
|
754
757
|
cq_pluck_data* cqd = static_cast<cq_pluck_data*> DATA_FROM_CQ(cq);
|
@@ -851,7 +854,8 @@ static void cq_end_op_for_callback(
|
|
851
854
|
}
|
852
855
|
|
853
856
|
auto* functor = static_cast<grpc_experimental_completion_queue_functor*>(tag);
|
854
|
-
if (internal ||
|
857
|
+
if (internal || functor->inlineable ||
|
858
|
+
grpc_iomgr_is_any_background_poller_thread()) {
|
855
859
|
grpc_core::ApplicationCallbackExecCtx::Enqueue(functor,
|
856
860
|
(error == GRPC_ERROR_NONE));
|
857
861
|
GRPC_ERROR_UNREF(error);
|
@@ -860,11 +864,8 @@ static void cq_end_op_for_callback(
|
|
860
864
|
|
861
865
|
// Schedule the callback on a closure if not internal or triggered
|
862
866
|
// from a background poller thread.
|
863
|
-
|
864
|
-
GRPC_CLOSURE_CREATE(
|
865
|
-
functor_callback, functor,
|
866
|
-
grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)),
|
867
|
-
error);
|
867
|
+
grpc_core::Executor::Run(
|
868
|
+
GRPC_CLOSURE_CREATE(functor_callback, functor, nullptr), error);
|
868
869
|
}
|
869
870
|
|
870
871
|
void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error,
|
@@ -939,7 +940,7 @@ static void dump_pending_tags(grpc_completion_queue* cq) {
|
|
939
940
|
gpr_free(out);
|
940
941
|
}
|
941
942
|
#else
|
942
|
-
static void dump_pending_tags(grpc_completion_queue* cq) {}
|
943
|
+
static void dump_pending_tags(grpc_completion_queue* /*cq*/) {}
|
943
944
|
#endif
|
944
945
|
|
945
946
|
static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline,
|
@@ -1357,10 +1358,8 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) {
|
|
1357
1358
|
|
1358
1359
|
// Schedule the callback on a closure if not internal or triggered
|
1359
1360
|
// from a background poller thread.
|
1360
|
-
|
1361
|
-
GRPC_CLOSURE_CREATE(
|
1362
|
-
functor_callback, callback,
|
1363
|
-
grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)),
|
1361
|
+
grpc_core::Executor::Run(
|
1362
|
+
GRPC_CLOSURE_CREATE(functor_callback, callback, nullptr),
|
1364
1363
|
GRPC_ERROR_NONE);
|
1365
1364
|
}
|
1366
1365
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
*/
|
29
29
|
|
30
30
|
static grpc_completion_queue* default_create(
|
31
|
-
const grpc_completion_queue_factory* factory
|
31
|
+
const grpc_completion_queue_factory* /*factory*/,
|
32
32
|
const grpc_completion_queue_attributes* attr) {
|
33
33
|
return grpc_completion_queue_create_internal(
|
34
34
|
attr->cq_completion_type, attr->cq_polling_type, attr->cq_shutdown_cb);
|
@@ -197,7 +197,7 @@ void grpc_shutdown_internal_locked(void) {
|
|
197
197
|
grpc_destroy_static_metadata_ctx();
|
198
198
|
}
|
199
199
|
|
200
|
-
void grpc_shutdown_internal(void* ignored) {
|
200
|
+
void grpc_shutdown_internal(void* /*ignored*/) {
|
201
201
|
GRPC_API_TRACE("grpc_shutdown_internal", 0, ());
|
202
202
|
grpc_core::MutexLock lock(&g_init_mu);
|
203
203
|
// We have released lock from the shutdown thread and it is possible that
|
@@ -37,7 +37,7 @@
|
|
37
37
|
void grpc_security_pre_init(void) {}
|
38
38
|
|
39
39
|
static bool maybe_prepend_client_auth_filter(
|
40
|
-
grpc_channel_stack_builder* builder, void* arg) {
|
40
|
+
grpc_channel_stack_builder* builder, void* /*arg*/) {
|
41
41
|
const grpc_channel_args* args =
|
42
42
|
grpc_channel_stack_builder_get_channel_arguments(builder);
|
43
43
|
if (args) {
|
@@ -52,7 +52,7 @@ static bool maybe_prepend_client_auth_filter(
|
|
52
52
|
}
|
53
53
|
|
54
54
|
static bool maybe_prepend_server_auth_filter(
|
55
|
-
grpc_channel_stack_builder* builder, void* arg) {
|
55
|
+
grpc_channel_stack_builder* builder, void* /*arg*/) {
|
56
56
|
const grpc_channel_args* args =
|
57
57
|
grpc_channel_stack_builder_get_channel_arguments(builder);
|
58
58
|
if (args) {
|
@@ -94,8 +94,8 @@ static void lame_start_transport_stream_op_batch(
|
|
94
94
|
calld->call_combiner);
|
95
95
|
}
|
96
96
|
|
97
|
-
static void lame_get_channel_info(grpc_channel_element* elem
|
98
|
-
const grpc_channel_info* channel_info) {}
|
97
|
+
static void lame_get_channel_info(grpc_channel_element* /*elem*/,
|
98
|
+
const grpc_channel_info* /*channel_info*/) {}
|
99
99
|
|
100
100
|
static void lame_start_transport_op(grpc_channel_element* elem,
|
101
101
|
grpc_transport_op* op) {
|
@@ -111,18 +111,16 @@ static void lame_start_transport_op(grpc_channel_element* elem,
|
|
111
111
|
}
|
112
112
|
}
|
113
113
|
if (op->send_ping.on_initiate != nullptr) {
|
114
|
-
|
115
|
-
|
116
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"));
|
114
|
+
ExecCtx::Run(DEBUG_LOCATION, op->send_ping.on_initiate,
|
115
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"));
|
117
116
|
}
|
118
117
|
if (op->send_ping.on_ack != nullptr) {
|
119
|
-
|
120
|
-
|
121
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"));
|
118
|
+
ExecCtx::Run(DEBUG_LOCATION, op->send_ping.on_ack,
|
119
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"));
|
122
120
|
}
|
123
121
|
GRPC_ERROR_UNREF(op->disconnect_with_error);
|
124
122
|
if (op->on_consumed != nullptr) {
|
125
|
-
|
123
|
+
ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, GRPC_ERROR_NONE);
|
126
124
|
}
|
127
125
|
}
|
128
126
|
|
@@ -133,10 +131,10 @@ static grpc_error* lame_init_call_elem(grpc_call_element* elem,
|
|
133
131
|
return GRPC_ERROR_NONE;
|
134
132
|
}
|
135
133
|
|
136
|
-
static void lame_destroy_call_elem(grpc_call_element* elem
|
137
|
-
const grpc_call_final_info* final_info
|
134
|
+
static void lame_destroy_call_elem(grpc_call_element* /*elem*/,
|
135
|
+
const grpc_call_final_info* /*final_info*/,
|
138
136
|
grpc_closure* then_schedule_closure) {
|
139
|
-
|
137
|
+
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
|
140
138
|
}
|
141
139
|
|
142
140
|
static grpc_error* lame_init_channel_elem(grpc_channel_element* elem,
|
@@ -302,7 +302,7 @@ struct shutdown_cleanup_args {
|
|
302
302
|
grpc_slice slice;
|
303
303
|
};
|
304
304
|
|
305
|
-
static void shutdown_cleanup(void* arg, grpc_error* error) {
|
305
|
+
static void shutdown_cleanup(void* arg, grpc_error* /*error*/) {
|
306
306
|
struct shutdown_cleanup_args* a =
|
307
307
|
static_cast<struct shutdown_cleanup_args*>(arg);
|
308
308
|
grpc_slice_unref_internal(a->slice);
|
@@ -367,7 +367,7 @@ static void request_matcher_destroy(request_matcher* rm) {
|
|
367
367
|
gpr_free(rm->requests_per_cq);
|
368
368
|
}
|
369
369
|
|
370
|
-
static void kill_zombie(void* elem, grpc_error* error) {
|
370
|
+
static void kill_zombie(void* elem, grpc_error* /*error*/) {
|
371
371
|
grpc_call_unref(
|
372
372
|
grpc_call_from_top_element(static_cast<grpc_call_element*>(elem)));
|
373
373
|
}
|
@@ -381,7 +381,8 @@ static void request_matcher_zombify_all_pending_calls(request_matcher* rm) {
|
|
381
381
|
&calld->kill_zombie_closure, kill_zombie,
|
382
382
|
grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0),
|
383
383
|
grpc_schedule_on_exec_ctx);
|
384
|
-
|
384
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &calld->kill_zombie_closure,
|
385
|
+
GRPC_ERROR_NONE);
|
385
386
|
}
|
386
387
|
}
|
387
388
|
|
@@ -449,7 +450,7 @@ static void orphan_channel(channel_data* chand) {
|
|
449
450
|
chand->next = chand->prev = chand;
|
450
451
|
}
|
451
452
|
|
452
|
-
static void finish_destroy_channel(void* cd, grpc_error* error) {
|
453
|
+
static void finish_destroy_channel(void* cd, grpc_error* /*error*/) {
|
453
454
|
channel_data* chand = static_cast<channel_data*>(cd);
|
454
455
|
grpc_server* server = chand->server;
|
455
456
|
GRPC_CHANNEL_INTERNAL_UNREF(chand->channel, "server");
|
@@ -477,7 +478,7 @@ static void destroy_channel(channel_data* chand) {
|
|
477
478
|
op);
|
478
479
|
}
|
479
480
|
|
480
|
-
static void done_request_event(void* req, grpc_cq_completion* c) {
|
481
|
+
static void done_request_event(void* req, grpc_cq_completion* /*c*/) {
|
481
482
|
gpr_free(req);
|
482
483
|
}
|
483
484
|
|
@@ -527,7 +528,8 @@ static void publish_new_rpc(void* arg, grpc_error* error) {
|
|
527
528
|
&calld->kill_zombie_closure, kill_zombie,
|
528
529
|
grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0),
|
529
530
|
grpc_schedule_on_exec_ctx);
|
530
|
-
|
531
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &calld->kill_zombie_closure,
|
532
|
+
GRPC_ERROR_REF(error));
|
531
533
|
return;
|
532
534
|
}
|
533
535
|
|
@@ -588,7 +590,8 @@ static void finish_start_new_rpc(
|
|
588
590
|
gpr_atm_no_barrier_store(&calld->state, ZOMBIED);
|
589
591
|
GRPC_CLOSURE_INIT(&calld->kill_zombie_closure, kill_zombie, elem,
|
590
592
|
grpc_schedule_on_exec_ctx);
|
591
|
-
|
593
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &calld->kill_zombie_closure,
|
594
|
+
GRPC_ERROR_NONE);
|
592
595
|
return;
|
593
596
|
}
|
594
597
|
|
@@ -672,7 +675,8 @@ static int num_listeners(grpc_server* server) {
|
|
672
675
|
return n;
|
673
676
|
}
|
674
677
|
|
675
|
-
static void done_shutdown_event(void* server,
|
678
|
+
static void done_shutdown_event(void* server,
|
679
|
+
grpc_cq_completion* /*completion*/) {
|
676
680
|
server_unref(static_cast<grpc_server*>(server));
|
677
681
|
}
|
678
682
|
|
@@ -780,7 +784,7 @@ static void server_on_recv_initial_metadata(void* ptr, grpc_error* error) {
|
|
780
784
|
calld->recv_trailing_metadata_error,
|
781
785
|
"continue server_recv_trailing_metadata_ready");
|
782
786
|
}
|
783
|
-
|
787
|
+
grpc_core::Closure::Run(DEBUG_LOCATION, closure, error);
|
784
788
|
}
|
785
789
|
|
786
790
|
static void server_recv_trailing_metadata_ready(void* user_data,
|
@@ -801,7 +805,8 @@ static void server_recv_trailing_metadata_ready(void* user_data,
|
|
801
805
|
error =
|
802
806
|
grpc_error_add_child(GRPC_ERROR_REF(error),
|
803
807
|
GRPC_ERROR_REF(calld->recv_initial_metadata_error));
|
804
|
-
|
808
|
+
grpc_core::Closure::Run(DEBUG_LOCATION,
|
809
|
+
calld->original_recv_trailing_metadata_ready, error);
|
805
810
|
}
|
806
811
|
|
807
812
|
static void server_mutate_op(grpc_call_element* elem,
|
@@ -842,7 +847,8 @@ static void got_initial_metadata(void* ptr, grpc_error* error) {
|
|
842
847
|
if (gpr_atm_full_cas(&calld->state, NOT_STARTED, ZOMBIED)) {
|
843
848
|
GRPC_CLOSURE_INIT(&calld->kill_zombie_closure, kill_zombie, elem,
|
844
849
|
grpc_schedule_on_exec_ctx);
|
845
|
-
|
850
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &calld->kill_zombie_closure,
|
851
|
+
GRPC_ERROR_NONE);
|
846
852
|
} else if (gpr_atm_full_cas(&calld->state, PENDING, ZOMBIED)) {
|
847
853
|
/* zombied call will be destroyed when it's removed from the pending
|
848
854
|
queue... later */
|
@@ -850,7 +856,7 @@ static void got_initial_metadata(void* ptr, grpc_error* error) {
|
|
850
856
|
}
|
851
857
|
}
|
852
858
|
|
853
|
-
static void accept_stream(void* cd, grpc_transport* transport
|
859
|
+
static void accept_stream(void* cd, grpc_transport* /*transport*/,
|
854
860
|
const void* transport_server_data) {
|
855
861
|
channel_data* chand = static_cast<channel_data*>(cd);
|
856
862
|
/* create a call */
|
@@ -895,8 +901,8 @@ static grpc_error* server_init_call_elem(grpc_call_element* elem,
|
|
895
901
|
}
|
896
902
|
|
897
903
|
static void server_destroy_call_elem(grpc_call_element* elem,
|
898
|
-
const grpc_call_final_info* final_info
|
899
|
-
grpc_closure* ignored) {
|
904
|
+
const grpc_call_final_info* /*final_info*/,
|
905
|
+
grpc_closure* /*ignored*/) {
|
900
906
|
call_data* calld = static_cast<call_data*>(elem->call_data);
|
901
907
|
calld->~call_data();
|
902
908
|
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
|
@@ -1244,8 +1250,7 @@ void grpc_server_setup_transport(
|
|
1244
1250
|
op->set_accept_stream = true;
|
1245
1251
|
op->set_accept_stream_fn = accept_stream;
|
1246
1252
|
op->set_accept_stream_user_data = chand;
|
1247
|
-
op->start_connectivity_watch.reset(
|
1248
|
-
grpc_core::New<ConnectivityWatcher>(chand));
|
1253
|
+
op->start_connectivity_watch.reset(new ConnectivityWatcher(chand));
|
1249
1254
|
if (gpr_atm_acq_load(&s->shutdown_flag) != 0) {
|
1250
1255
|
op->disconnect_with_error =
|
1251
1256
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server shutdown");
|
@@ -1258,7 +1263,7 @@ void done_published_shutdown(void* done_arg, grpc_cq_completion* storage) {
|
|
1258
1263
|
gpr_free(storage);
|
1259
1264
|
}
|
1260
1265
|
|
1261
|
-
static void listener_destroy_done(void* s, grpc_error* error) {
|
1266
|
+
static void listener_destroy_done(void* s, grpc_error* /*error*/) {
|
1262
1267
|
grpc_server* server = static_cast<grpc_server*>(s);
|
1263
1268
|
gpr_mu_lock(&server->mu_global);
|
1264
1269
|
server->listeners_destroyed++;
|
@@ -1447,7 +1452,8 @@ static grpc_call_error queue_call_request(grpc_server* server, size_t cq_idx,
|
|
1447
1452
|
&calld->kill_zombie_closure, kill_zombie,
|
1448
1453
|
grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0),
|
1449
1454
|
grpc_schedule_on_exec_ctx);
|
1450
|
-
|
1455
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &calld->kill_zombie_closure,
|
1456
|
+
GRPC_ERROR_NONE);
|
1451
1457
|
} else {
|
1452
1458
|
publish_call(server, calld, cq_idx, rc);
|
1453
1459
|
}
|