grpc 1.25.0 → 1.26.0

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.

Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +782 -291
  3. data/include/grpc/impl/codegen/grpc_types.h +4 -0
  4. data/include/grpc/impl/codegen/port_platform.h +7 -0
  5. data/include/grpc/support/alloc.h +0 -16
  6. data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
  7. data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
  8. data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
  9. data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
  10. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
  11. data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
  12. data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
  13. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
  14. data/src/core/ext/filters/client_channel/connector.h +40 -45
  15. data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
  16. data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
  17. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
  18. data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
  19. data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
  20. data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
  21. data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
  27. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
  28. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
  29. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
  30. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
  31. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
  32. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
  33. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  34. data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
  35. data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
  36. data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
  37. data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
  38. data/src/core/ext/filters/client_channel/resolver.cc +2 -1
  39. data/src/core/ext/filters/client_channel/resolver.h +2 -2
  40. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  41. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
  42. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
  43. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
  44. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
  45. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
  46. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
  47. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
  48. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
  49. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
  50. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
  51. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
  52. data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
  53. data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
  54. data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
  55. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
  56. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
  57. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
  58. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
  59. data/src/core/ext/filters/client_channel/service_config.cc +15 -14
  60. data/src/core/ext/filters/client_channel/service_config.h +14 -19
  61. data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
  62. data/src/core/ext/filters/client_channel/subchannel.h +11 -12
  63. data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
  64. data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
  65. data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
  66. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
  67. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
  68. data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
  69. data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
  70. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
  71. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
  72. data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
  73. data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
  74. data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
  75. data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
  76. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
  77. data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
  78. data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
  79. data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
  80. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  81. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
  82. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
  83. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
  84. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
  85. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
  86. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
  87. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
  88. data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
  89. data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
  90. data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
  91. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
  92. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
  93. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
  94. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
  95. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
  96. data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
  97. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
  98. data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
  99. data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
  100. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
  101. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
  102. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
  103. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
  104. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
  105. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
  106. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
  108. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
  109. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
  111. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
  112. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
  113. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
  114. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
  115. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
  116. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
  117. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
  118. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
  119. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
  120. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
  121. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
  122. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
  123. data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
  124. data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
  125. data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
  126. data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
  127. data/src/core/lib/avl/avl.cc +1 -1
  128. data/src/core/lib/channel/channel_stack.cc +1 -1
  129. data/src/core/lib/channel/channel_stack.h +16 -4
  130. data/src/core/lib/channel/channel_trace.cc +4 -4
  131. data/src/core/lib/channel/channelz.cc +46 -46
  132. data/src/core/lib/channel/channelz.h +37 -35
  133. data/src/core/lib/channel/channelz_registry.cc +2 -2
  134. data/src/core/lib/channel/channelz_registry.h +1 -1
  135. data/src/core/lib/channel/connected_channel.cc +3 -2
  136. data/src/core/lib/channel/handshaker.cc +1 -1
  137. data/src/core/lib/channel/handshaker_registry.cc +5 -5
  138. data/src/core/lib/channel/handshaker_registry.h +3 -3
  139. data/src/core/lib/compression/message_compress.cc +3 -2
  140. data/src/core/lib/compression/stream_compression_identity.cc +5 -7
  141. data/src/core/lib/gpr/alloc.cc +4 -29
  142. data/src/core/lib/gpr/cpu_linux.cc +1 -1
  143. data/src/core/lib/gprpp/fork.cc +4 -4
  144. data/src/core/lib/gprpp/global_config_env.cc +7 -7
  145. data/src/core/lib/gprpp/global_config_env.h +2 -2
  146. data/src/core/lib/gprpp/host_port.cc +8 -8
  147. data/src/core/lib/gprpp/host_port.h +3 -3
  148. data/src/core/lib/gprpp/inlined_vector.h +13 -0
  149. data/src/core/lib/gprpp/map.h +2 -9
  150. data/src/core/lib/gprpp/memory.h +12 -98
  151. data/src/core/lib/gprpp/orphanable.h +3 -3
  152. data/src/core/lib/gprpp/ref_counted.h +3 -3
  153. data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
  154. data/src/core/lib/gprpp/string_view.h +45 -23
  155. data/src/core/lib/gprpp/thd.h +1 -1
  156. data/src/core/lib/gprpp/thd_posix.cc +6 -5
  157. data/src/core/lib/gprpp/thd_windows.cc +3 -3
  158. data/src/core/lib/http/httpcli.cc +1 -1
  159. data/src/core/lib/http/httpcli_security_connector.cc +3 -3
  160. data/src/core/lib/iomgr/buffer_list.cc +10 -5
  161. data/src/core/lib/iomgr/call_combiner.cc +7 -6
  162. data/src/core/lib/iomgr/call_combiner.h +4 -3
  163. data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
  164. data/src/core/lib/iomgr/closure.h +33 -135
  165. data/src/core/lib/iomgr/combiner.cc +10 -17
  166. data/src/core/lib/iomgr/combiner.h +0 -2
  167. data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
  168. data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
  169. data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
  170. data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
  171. data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
  172. data/src/core/lib/iomgr/exec_ctx.cc +52 -5
  173. data/src/core/lib/iomgr/exec_ctx.h +6 -2
  174. data/src/core/lib/iomgr/executor.cc +16 -37
  175. data/src/core/lib/iomgr/executor.h +4 -7
  176. data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
  177. data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
  178. data/src/core/lib/iomgr/lockfree_event.cc +9 -8
  179. data/src/core/lib/iomgr/logical_thread.cc +103 -0
  180. data/src/core/lib/iomgr/logical_thread.h +52 -0
  181. data/src/core/lib/iomgr/pollset_custom.cc +5 -5
  182. data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
  183. data/src/core/lib/iomgr/pollset_windows.cc +16 -2
  184. data/src/core/lib/iomgr/port.h +3 -0
  185. data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
  186. data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
  187. data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
  188. data/src/core/lib/iomgr/resource_quota.cc +26 -21
  189. data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
  190. data/src/core/lib/iomgr/socket_windows.cc +2 -2
  191. data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
  192. data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
  193. data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
  194. data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
  195. data/src/core/lib/iomgr/tcp_custom.cc +10 -9
  196. data/src/core/lib/iomgr/tcp_posix.cc +19 -15
  197. data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
  198. data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
  199. data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
  200. data/src/core/lib/iomgr/tcp_windows.cc +16 -13
  201. data/src/core/lib/iomgr/timer_custom.cc +4 -3
  202. data/src/core/lib/iomgr/timer_generic.cc +11 -9
  203. data/src/core/lib/iomgr/udp_server.cc +16 -13
  204. data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
  205. data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
  206. data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
  207. data/src/core/lib/security/credentials/credentials.cc +8 -8
  208. data/src/core/lib/security/credentials/credentials.h +5 -5
  209. data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
  210. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
  211. data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
  212. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
  213. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
  214. data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
  215. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
  216. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
  217. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
  218. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
  219. data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
  220. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
  221. data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
  222. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
  223. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
  224. data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
  225. data/src/core/lib/security/security_connector/security_connector.h +1 -1
  226. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
  227. data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
  228. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
  229. data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
  230. data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
  231. data/src/core/lib/security/transport/security_handshaker.cc +67 -23
  232. data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
  233. data/src/core/lib/security/transport/target_authority_table.h +1 -1
  234. data/src/core/lib/slice/b64.cc +3 -4
  235. data/src/core/lib/slice/b64.h +1 -2
  236. data/src/core/lib/slice/slice.cc +8 -13
  237. data/src/core/lib/surface/call.cc +19 -19
  238. data/src/core/lib/surface/call.h +6 -7
  239. data/src/core/lib/surface/call_log_batch.cc +1 -2
  240. data/src/core/lib/surface/channel.cc +17 -18
  241. data/src/core/lib/surface/channel.h +4 -19
  242. data/src/core/lib/surface/channel_ping.cc +1 -1
  243. data/src/core/lib/surface/completion_queue.cc +21 -22
  244. data/src/core/lib/surface/completion_queue_factory.cc +1 -1
  245. data/src/core/lib/surface/init.cc +1 -1
  246. data/src/core/lib/surface/init_secure.cc +2 -2
  247. data/src/core/lib/surface/lame_client.cc +10 -12
  248. data/src/core/lib/surface/server.cc +24 -18
  249. data/src/core/lib/surface/version.cc +2 -2
  250. data/src/core/lib/transport/byte_stream.cc +2 -2
  251. data/src/core/lib/transport/byte_stream.h +2 -1
  252. data/src/core/lib/transport/connectivity_state.cc +4 -4
  253. data/src/core/lib/transport/connectivity_state.h +2 -2
  254. data/src/core/lib/transport/metadata.cc +8 -10
  255. data/src/core/lib/transport/metadata.h +5 -8
  256. data/src/core/lib/transport/metadata_batch.cc +6 -0
  257. data/src/core/lib/transport/static_metadata.cc +2 -4
  258. data/src/core/lib/transport/status_metadata.cc +7 -0
  259. data/src/core/lib/transport/status_metadata.h +18 -0
  260. data/src/core/lib/transport/transport.cc +9 -7
  261. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  262. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
  263. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
  264. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
  265. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
  266. data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
  267. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  268. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
  269. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  270. data/src/core/tsi/ssl_transport_security.cc +2 -1
  271. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
  272. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
  273. data/src/ruby/lib/grpc/version.rb +1 -1
  274. data/third_party/upb/upb/decode.c +1 -0
  275. metadata +40 -38
  276. data/src/core/ext/filters/client_channel/connector.cc +0 -41
  277. data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
  278. data/src/core/lib/gprpp/set.h +0 -33
@@ -19,6 +19,8 @@
19
19
 
20
20
  #include <grpc/support/port_platform.h>
21
21
 
22
+ #include <set>
23
+
22
24
  #include "src/core/ext/filters/client_channel/service_config.h"
23
25
  #include "src/core/ext/filters/client_channel/xds/xds_api.h"
24
26
  #include "src/core/ext/filters/client_channel/xds/xds_bootstrap.h"
@@ -28,7 +30,6 @@
28
30
  #include "src/core/lib/gprpp/orphanable.h"
29
31
  #include "src/core/lib/gprpp/ref_counted.h"
30
32
  #include "src/core/lib/gprpp/ref_counted_ptr.h"
31
- #include "src/core/lib/gprpp/set.h"
32
33
  #include "src/core/lib/gprpp/string_view.h"
33
34
  #include "src/core/lib/iomgr/combiner.h"
34
35
 
@@ -73,7 +74,7 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
73
74
  // an error initializing the client.
74
75
  XdsClient(Combiner* combiner, grpc_pollset_set* interested_parties,
75
76
  StringView server_name,
76
- UniquePtr<ServiceConfigWatcherInterface> watcher,
77
+ std::unique_ptr<ServiceConfigWatcherInterface> watcher,
77
78
  const grpc_channel_args& channel_args, grpc_error** error);
78
79
  ~XdsClient();
79
80
 
@@ -85,7 +86,7 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
85
86
  // cancellation. (Because the caller does not own the watcher, the
86
87
  // pointer must not be used for any other purpose.)
87
88
  void WatchClusterData(StringView cluster,
88
- UniquePtr<ClusterWatcherInterface> watcher);
89
+ std::unique_ptr<ClusterWatcherInterface> watcher);
89
90
  void CancelClusterDataWatch(StringView cluster,
90
91
  ClusterWatcherInterface* watcher);
91
92
 
@@ -95,13 +96,15 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
95
96
  // cancellation. (Because the caller does not own the watcher, the
96
97
  // pointer must not be used for any other purpose.)
97
98
  void WatchEndpointData(StringView cluster,
98
- UniquePtr<EndpointWatcherInterface> watcher);
99
+ std::unique_ptr<EndpointWatcherInterface> watcher);
99
100
  void CancelEndpointDataWatch(StringView cluster,
100
101
  EndpointWatcherInterface* watcher);
101
102
 
102
103
  // Adds and removes client stats for cluster.
103
- void AddClientStats(StringView cluster, XdsClientStats* client_stats);
104
- void RemoveClientStats(StringView cluster, XdsClientStats* client_stats);
104
+ void AddClientStats(StringView lrs_server, StringView cluster,
105
+ XdsClientStats* client_stats);
106
+ void RemoveClientStats(StringView lrs_server, StringView cluster,
107
+ XdsClientStats* client_stats);
105
108
 
106
109
  // Resets connection backoff state.
107
110
  void ResetBackoff();
@@ -169,11 +172,12 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
169
172
  };
170
173
 
171
174
  struct ClusterState {
172
- Map<ClusterWatcherInterface*, UniquePtr<ClusterWatcherInterface>>
175
+ std::map<ClusterWatcherInterface*, std::unique_ptr<ClusterWatcherInterface>>
173
176
  cluster_watchers;
174
- Map<EndpointWatcherInterface*, UniquePtr<EndpointWatcherInterface>>
177
+ std::map<EndpointWatcherInterface*,
178
+ std::unique_ptr<EndpointWatcherInterface>>
175
179
  endpoint_watchers;
176
- Set<XdsClientStats*> client_stats;
180
+ std::set<XdsClientStats*> client_stats;
177
181
  // The latest data seen from EDS.
178
182
  EdsUpdate eds_update;
179
183
  };
@@ -192,15 +196,15 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
192
196
 
193
197
  static const grpc_arg_pointer_vtable kXdsClientVtable;
194
198
 
195
- UniquePtr<char> build_version_;
199
+ grpc_core::UniquePtr<char> build_version_;
196
200
 
197
201
  Combiner* combiner_;
198
202
  grpc_pollset_set* interested_parties_;
199
203
 
200
- UniquePtr<XdsBootstrap> bootstrap_;
204
+ std::unique_ptr<XdsBootstrap> bootstrap_;
201
205
 
202
- UniquePtr<char> server_name_;
203
- UniquePtr<ServiceConfigWatcherInterface> service_config_watcher_;
206
+ grpc_core::UniquePtr<char> server_name_;
207
+ std::unique_ptr<ServiceConfigWatcherInterface> service_config_watcher_;
204
208
  // TODO(juanlishen): Once we implement LDS support, this will no
205
209
  // longer be needed.
206
210
  grpc_closure service_config_notify_;
@@ -208,8 +212,9 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
208
212
  // The channel for communicating with the xds server.
209
213
  OrphanablePtr<ChannelState> chand_;
210
214
 
211
- // TODO(roth): When we need support for multiple clusters, replace
212
- // cluster_state_ with a map keyed by cluster name.
215
+ // TODO(juanlishen): As part of adding CDS support, replace
216
+ // cluster_state_ with a map keyed by cluster name, so that we can
217
+ // support multiple clusters for both CDS and EDS.
213
218
  ClusterState cluster_state_;
214
219
  // Map<StringView /*cluster*/, ClusterState, StringLess> clusters_;
215
220
 
@@ -90,7 +90,7 @@ XdsClientStats::LocalityStats::GetSnapshotAndReset() {
90
90
  const char* metric_name = p.first.get();
91
91
  LoadMetric& metric_value = p.second;
92
92
  snapshot.load_metric_stats.emplace(
93
- UniquePtr<char>(gpr_strdup(metric_name)),
93
+ grpc_core::UniquePtr<char>(gpr_strdup(metric_name)),
94
94
  metric_value.GetSnapshotAndReset());
95
95
  }
96
96
  }
@@ -178,12 +178,14 @@ void XdsClientStats::PruneLocalityStats() {
178
178
  }
179
179
  }
180
180
 
181
- void XdsClientStats::AddCallDropped(const UniquePtr<char>& category) {
181
+ void XdsClientStats::AddCallDropped(
182
+ const grpc_core::UniquePtr<char>& category) {
182
183
  total_dropped_requests_.FetchAdd(1, MemoryOrder::RELAXED);
183
184
  MutexLock lock(&dropped_requests_mu_);
184
185
  auto iter = dropped_requests_.find(category);
185
186
  if (iter == dropped_requests_.end()) {
186
- dropped_requests_.emplace(UniquePtr<char>(gpr_strdup(category.get())), 1);
187
+ dropped_requests_.emplace(
188
+ grpc_core::UniquePtr<char>(gpr_strdup(category.get())), 1);
187
189
  } else {
188
190
  ++iter->second;
189
191
  }
@@ -46,8 +46,9 @@ class XdsLocalityName : public RefCounted<XdsLocalityName> {
46
46
  }
47
47
  };
48
48
 
49
- XdsLocalityName(UniquePtr<char> region, UniquePtr<char> zone,
50
- UniquePtr<char> subzone)
49
+ XdsLocalityName(grpc_core::UniquePtr<char> region,
50
+ grpc_core::UniquePtr<char> zone,
51
+ grpc_core::UniquePtr<char> subzone)
51
52
  : region_(std::move(region)),
52
53
  zone_(std::move(zone)),
53
54
  sub_zone_(std::move(subzone)) {}
@@ -73,10 +74,10 @@ class XdsLocalityName : public RefCounted<XdsLocalityName> {
73
74
  }
74
75
 
75
76
  private:
76
- UniquePtr<char> region_;
77
- UniquePtr<char> zone_;
78
- UniquePtr<char> sub_zone_;
79
- UniquePtr<char> human_readable_string_;
77
+ grpc_core::UniquePtr<char> region_;
78
+ grpc_core::UniquePtr<char> zone_;
79
+ grpc_core::UniquePtr<char> sub_zone_;
80
+ grpc_core::UniquePtr<char> human_readable_string_;
80
81
  };
81
82
 
82
83
  // The stats classes (i.e., XdsClientStats, LocalityStats, and LoadMetric) can
@@ -111,9 +112,10 @@ class XdsClientStats {
111
112
  double total_metric_value_{0};
112
113
  };
113
114
 
114
- using LoadMetricMap = Map<UniquePtr<char>, LoadMetric, StringLess>;
115
+ using LoadMetricMap =
116
+ std::map<grpc_core::UniquePtr<char>, LoadMetric, StringLess>;
115
117
  using LoadMetricSnapshotMap =
116
- Map<UniquePtr<char>, LoadMetric::Snapshot, StringLess>;
118
+ std::map<grpc_core::UniquePtr<char>, LoadMetric::Snapshot, StringLess>;
117
119
 
118
120
  struct Snapshot {
119
121
  // TODO(juanlishen): Change this to const method when const_iterator is
@@ -177,15 +179,16 @@ class XdsClientStats {
177
179
 
178
180
  // TODO(juanlishen): The value type of Map<> must be movable in current
179
181
  // implementation. To avoid making LocalityStats movable, we wrap it by
180
- // UniquePtr<>. We should remove this wrapper if the value type of Map<>
182
+ // std::unique_ptr<>. We should remove this wrapper if the value type of Map<>
181
183
  // doesn't have to be movable.
182
184
  using LocalityStatsMap =
183
- Map<RefCountedPtr<XdsLocalityName>, RefCountedPtr<LocalityStats>,
184
- XdsLocalityName::Less>;
185
+ std::map<RefCountedPtr<XdsLocalityName>, RefCountedPtr<LocalityStats>,
186
+ XdsLocalityName::Less>;
185
187
  using LocalityStatsSnapshotMap =
186
- Map<RefCountedPtr<XdsLocalityName>, LocalityStats::Snapshot,
187
- XdsLocalityName::Less>;
188
- using DroppedRequestsMap = Map<UniquePtr<char>, uint64_t, StringLess>;
188
+ std::map<RefCountedPtr<XdsLocalityName>, LocalityStats::Snapshot,
189
+ XdsLocalityName::Less>;
190
+ using DroppedRequestsMap =
191
+ std::map<grpc_core::UniquePtr<char>, uint64_t, StringLess>;
189
192
  using DroppedRequestsSnapshotMap = DroppedRequestsMap;
190
193
 
191
194
  struct Snapshot {
@@ -208,7 +211,7 @@ class XdsClientStats {
208
211
  RefCountedPtr<LocalityStats> FindLocalityStats(
209
212
  const RefCountedPtr<XdsLocalityName>& locality_name);
210
213
  void PruneLocalityStats();
211
- void AddCallDropped(const UniquePtr<char>& category);
214
+ void AddCallDropped(const grpc_core::UniquePtr<char>& category);
212
215
 
213
216
  private:
214
217
  // The stats for each locality.
@@ -27,10 +27,9 @@
27
27
  #include "src/core/lib/surface/channel_init.h"
28
28
  #include "src/core/lib/transport/http2_errors.h"
29
29
 
30
- // The idle filter is enabled in client channel by default.
31
- // Set GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS to [1000, INT_MAX) in channel args to
32
- // configure the idle timeout.
33
- #define DEFAULT_IDLE_TIMEOUT_MS (30 /*minutes*/ * 60 * 1000)
30
+ // TODO(juanlishen): The idle filter is disabled in client channel by default
31
+ // due to b/143502997. Try to fix the bug and enable the filter by default.
32
+ #define DEFAULT_IDLE_TIMEOUT_MS INT_MAX
34
33
  // The user input idle timeout smaller than this would be capped to it.
35
34
  #define MIN_IDLE_TIMEOUT_MS (1 /*second*/ * 1000)
36
35
 
@@ -283,7 +282,8 @@ void ChannelData::DecreaseCallCount() {
283
282
  }
284
283
 
285
284
  ChannelData::ChannelData(grpc_channel_element* elem,
286
- grpc_channel_element_args* args, grpc_error** error)
285
+ grpc_channel_element_args* args,
286
+ grpc_error** /*error*/)
287
287
  : elem_(elem),
288
288
  channel_stack_(args->channel_stack),
289
289
  client_idle_timeout_(GetClientIdleTimeout(args->channel_args)) {
@@ -352,7 +352,7 @@ void ChannelData::IdleTimerCallback(void* arg, grpc_error* error) {
352
352
  }
353
353
 
354
354
  void ChannelData::IdleTransportOpCompleteCallback(void* arg,
355
- grpc_error* error) {
355
+ grpc_error* /*error*/) {
356
356
  ChannelData* chand = static_cast<ChannelData*>(arg);
357
357
  GRPC_CHANNEL_STACK_UNREF(chand->channel_stack_, "idle transport op");
358
358
  }
@@ -389,15 +389,15 @@ class CallData {
389
389
  };
390
390
 
391
391
  grpc_error* CallData::Init(grpc_call_element* elem,
392
- const grpc_call_element_args* args) {
392
+ const grpc_call_element_args* /*args*/) {
393
393
  ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
394
394
  chand->IncreaseCallCount();
395
395
  return GRPC_ERROR_NONE;
396
396
  }
397
397
 
398
398
  void CallData::Destroy(grpc_call_element* elem,
399
- const grpc_call_final_info* final_info,
400
- grpc_closure* ignored) {
399
+ const grpc_call_final_info* /*final_info*/,
400
+ grpc_closure* /*ignored*/) {
401
401
  ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
402
402
  chand->DecreaseCallCount();
403
403
  }
@@ -416,7 +416,7 @@ const grpc_channel_filter grpc_client_idle_filter = {
416
416
  "client_idle"};
417
417
 
418
418
  static bool MaybeAddClientIdleFilter(grpc_channel_stack_builder* builder,
419
- void* arg) {
419
+ void* /*arg*/) {
420
420
  const grpc_channel_args* channel_args =
421
421
  grpc_channel_stack_builder_get_channel_arguments(builder);
422
422
  if (!grpc_channel_args_want_minimal_stack(channel_args) &&
@@ -38,7 +38,7 @@
38
38
 
39
39
  // The on_complete callback used when sending a cancel_error batch down the
40
40
  // filter stack. Yields the call combiner when the batch returns.
41
- static void yield_call_combiner(void* arg, grpc_error* ignored) {
41
+ static void yield_call_combiner(void* arg, grpc_error* /*ignored*/) {
42
42
  grpc_deadline_state* deadline_state = static_cast<grpc_deadline_state*>(arg);
43
43
  GRPC_CALL_COMBINER_STOP(deadline_state->call_combiner,
44
44
  "got on_complete from cancel_stream batch");
@@ -133,8 +133,9 @@ static void recv_trailing_metadata_ready(void* arg, grpc_error* error) {
133
133
  grpc_deadline_state* deadline_state = static_cast<grpc_deadline_state*>(arg);
134
134
  cancel_timer_if_needed(deadline_state);
135
135
  // Invoke the original callback.
136
- GRPC_CLOSURE_RUN(deadline_state->original_recv_trailing_metadata_ready,
137
- GRPC_ERROR_REF(error));
136
+ grpc_core::Closure::Run(DEBUG_LOCATION,
137
+ deadline_state->original_recv_trailing_metadata_ready,
138
+ GRPC_ERROR_REF(error));
138
139
  }
139
140
 
140
141
  // Inject our own recv_trailing_metadata_ready callback into op.
@@ -175,7 +176,7 @@ static void start_timer_after_init(void* arg, grpc_error* error) {
175
176
  "scheduling deadline timer");
176
177
  return;
177
178
  }
178
- grpc_core::Delete(state);
179
+ delete state;
179
180
  GRPC_CALL_COMBINER_STOP(deadline_state->call_combiner,
180
181
  "done scheduling deadline timer");
181
182
  }
@@ -196,10 +197,10 @@ grpc_deadline_state::grpc_deadline_state(grpc_call_element* elem,
196
197
  // create a closure to start the timer, and we schedule that closure
197
198
  // to be run after call stack initialization is done.
198
199
  struct start_timer_after_init_state* state =
199
- grpc_core::New<start_timer_after_init_state>(elem, deadline);
200
+ new start_timer_after_init_state(elem, deadline);
200
201
  GRPC_CLOSURE_INIT(&state->closure, start_timer_after_init, state,
201
202
  grpc_schedule_on_exec_ctx);
202
- GRPC_CLOSURE_SCHED(&state->closure, GRPC_ERROR_NONE);
203
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, &state->closure, GRPC_ERROR_NONE);
203
204
  }
204
205
  }
205
206
 
@@ -233,14 +234,14 @@ void grpc_deadline_state_client_start_transport_stream_op_batch(
233
234
  //
234
235
 
235
236
  // Constructor for channel_data. Used for both client and server filters.
236
- static grpc_error* deadline_init_channel_elem(grpc_channel_element* elem,
237
+ static grpc_error* deadline_init_channel_elem(grpc_channel_element* /*elem*/,
237
238
  grpc_channel_element_args* args) {
238
239
  GPR_ASSERT(!args->is_last);
239
240
  return GRPC_ERROR_NONE;
240
241
  }
241
242
 
242
243
  // Destructor for channel_data. Used for both client and server filters.
243
- static void deadline_destroy_channel_elem(grpc_channel_element* elem) {}
244
+ static void deadline_destroy_channel_elem(grpc_channel_element* /*elem*/) {}
244
245
 
245
246
  // Call data used for both client and server filter.
246
247
  typedef struct base_call_data {
@@ -268,9 +269,9 @@ static grpc_error* deadline_init_call_elem(grpc_call_element* elem,
268
269
  }
269
270
 
270
271
  // Destructor for call_data. Used for both client and server filters.
271
- static void deadline_destroy_call_elem(grpc_call_element* elem,
272
- const grpc_call_final_info* final_info,
273
- grpc_closure* ignored) {
272
+ static void deadline_destroy_call_elem(
273
+ grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
274
+ grpc_closure* /*ignored*/) {
274
275
  grpc_deadline_state* deadline_state =
275
276
  static_cast<grpc_deadline_state*>(elem->call_data);
276
277
  deadline_state->~grpc_deadline_state();
@@ -290,8 +291,9 @@ static void recv_initial_metadata_ready(void* arg, grpc_error* error) {
290
291
  server_call_data* calld = static_cast<server_call_data*>(elem->call_data);
291
292
  start_timer_if_needed(elem, calld->recv_initial_metadata->deadline);
292
293
  // Invoke the next callback.
293
- GRPC_CLOSURE_RUN(calld->next_recv_initial_metadata_ready,
294
- GRPC_ERROR_REF(error));
294
+ grpc_core::Closure::Run(DEBUG_LOCATION,
295
+ calld->next_recv_initial_metadata_ready,
296
+ GRPC_ERROR_REF(error));
295
297
  }
296
298
 
297
299
  // Method for starting a call op for server filter.
@@ -99,8 +99,7 @@ struct channel_data {
99
99
  };
100
100
  } // namespace
101
101
 
102
- static grpc_error* client_filter_incoming_metadata(grpc_call_element* elem,
103
- grpc_metadata_batch* b) {
102
+ static grpc_error* client_filter_incoming_metadata(grpc_metadata_batch* b) {
104
103
  if (b->idx.named.status != nullptr) {
105
104
  /* If both gRPC status and HTTP status are provided in the response, we
106
105
  * should prefer the gRPC status code, as mentioned in
@@ -177,7 +176,7 @@ static void recv_initial_metadata_ready(void* user_data, grpc_error* error) {
177
176
  grpc_call_element* elem = static_cast<grpc_call_element*>(user_data);
178
177
  call_data* calld = static_cast<call_data*>(elem->call_data);
179
178
  if (error == GRPC_ERROR_NONE) {
180
- error = client_filter_incoming_metadata(elem, calld->recv_initial_metadata);
179
+ error = client_filter_incoming_metadata(calld->recv_initial_metadata);
181
180
  calld->recv_initial_metadata_error = GRPC_ERROR_REF(error);
182
181
  } else {
183
182
  GRPC_ERROR_REF(error);
@@ -189,7 +188,7 @@ static void recv_initial_metadata_ready(void* user_data, grpc_error* error) {
189
188
  calld->call_combiner, &calld->recv_trailing_metadata_ready,
190
189
  calld->recv_trailing_metadata_error, "continue recv_trailing_metadata");
191
190
  }
192
- GRPC_CLOSURE_RUN(closure, error);
191
+ grpc_core::Closure::Run(DEBUG_LOCATION, closure, error);
193
192
  }
194
193
 
195
194
  static void recv_trailing_metadata_ready(void* user_data, grpc_error* error) {
@@ -204,22 +203,23 @@ static void recv_trailing_metadata_ready(void* user_data, grpc_error* error) {
204
203
  return;
205
204
  }
206
205
  if (error == GRPC_ERROR_NONE) {
207
- error =
208
- client_filter_incoming_metadata(elem, calld->recv_trailing_metadata);
206
+ error = client_filter_incoming_metadata(calld->recv_trailing_metadata);
209
207
  } else {
210
208
  GRPC_ERROR_REF(error);
211
209
  }
212
210
  error = grpc_error_add_child(
213
211
  error, GRPC_ERROR_REF(calld->recv_initial_metadata_error));
214
- GRPC_CLOSURE_RUN(calld->original_recv_trailing_metadata_ready, error);
212
+ grpc_core::Closure::Run(DEBUG_LOCATION,
213
+ calld->original_recv_trailing_metadata_ready, error);
215
214
  }
216
215
 
217
216
  static void send_message_on_complete(void* arg, grpc_error* error) {
218
217
  grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
219
218
  call_data* calld = static_cast<call_data*>(elem->call_data);
220
219
  calld->send_message_cache.Destroy();
221
- GRPC_CLOSURE_RUN(calld->original_send_message_on_complete,
222
- GRPC_ERROR_REF(error));
220
+ grpc_core::Closure::Run(DEBUG_LOCATION,
221
+ calld->original_send_message_on_complete,
222
+ GRPC_ERROR_REF(error));
223
223
  }
224
224
 
225
225
  // Pulls a slice from the send_message byte stream, updating
@@ -302,7 +302,7 @@ static grpc_error* update_path_for_get(grpc_call_element* elem,
302
302
  size_t estimated_len = GRPC_SLICE_LENGTH(path_slice);
303
303
  estimated_len++; /* for the '?' */
304
304
  estimated_len += grpc_base64_estimate_encoded_size(
305
- batch->payload->send_message.send_message->length(), true /* url_safe */,
305
+ batch->payload->send_message.send_message->length(),
306
306
  false /* multi_line */);
307
307
  grpc_core::UnmanagedMemorySlice path_with_query_slice(estimated_len);
308
308
  /* memcopy individual pieces into this slice */
@@ -473,8 +473,8 @@ static grpc_error* http_client_init_call_elem(
473
473
 
474
474
  /* Destructor for call_data */
475
475
  static void http_client_destroy_call_elem(
476
- grpc_call_element* elem, const grpc_call_final_info* final_info,
477
- grpc_closure* ignored) {
476
+ grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
477
+ grpc_closure* /*ignored*/) {
478
478
  call_data* calld = static_cast<call_data*>(elem->call_data);
479
479
  calld->~call_data();
480
480
  }
@@ -80,9 +80,9 @@ grpc_error* client_authority_init_call_elem(
80
80
  }
81
81
 
82
82
  /* Destructor for call_data */
83
- void client_authority_destroy_call_elem(grpc_call_element* elem,
84
- const grpc_call_final_info* final_info,
85
- grpc_closure* ignored) {}
83
+ void client_authority_destroy_call_elem(
84
+ grpc_call_element* /*elem*/, const grpc_call_final_info* /*final_info*/,
85
+ grpc_closure* /*ignored*/) {}
86
86
 
87
87
  /* Constructor for channel_data */
88
88
  grpc_error* client_authority_init_channel_elem(
@@ -227,8 +227,9 @@ static void send_message_on_complete(void* arg, grpc_error* error) {
227
227
  grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
228
228
  call_data* calld = static_cast<call_data*>(elem->call_data);
229
229
  grpc_slice_buffer_reset_and_unref_internal(&calld->slices);
230
- GRPC_CLOSURE_RUN(calld->original_send_message_on_complete,
231
- GRPC_ERROR_REF(error));
230
+ grpc_core::Closure::Run(DEBUG_LOCATION,
231
+ calld->original_send_message_on_complete,
232
+ GRPC_ERROR_REF(error));
232
233
  }
233
234
 
234
235
  static void send_message_batch_continue(grpc_call_element* elem) {
@@ -320,6 +321,11 @@ static grpc_error* pull_slice_from_send_message(call_data* calld) {
320
321
  // eventually result in calling on_send_message_next_done().
321
322
  static void continue_reading_send_message(grpc_call_element* elem) {
322
323
  call_data* calld = static_cast<call_data*>(elem->call_data);
324
+ if (calld->slices.length ==
325
+ calld->send_message_batch->payload->send_message.send_message->length()) {
326
+ finish_send_message(elem);
327
+ return;
328
+ }
323
329
  while (calld->send_message_batch->payload->send_message.send_message->Next(
324
330
  ~static_cast<size_t>(0), &calld->on_send_message_next_done)) {
325
331
  grpc_error* error = pull_slice_from_send_message(calld);
@@ -361,7 +367,7 @@ static void on_send_message_next_done(void* arg, grpc_error* error) {
361
367
  }
362
368
  }
363
369
 
364
- static void start_send_message_batch(void* arg, grpc_error* unused) {
370
+ static void start_send_message_batch(void* arg, grpc_error* /*unused*/) {
365
371
  grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
366
372
  if (skip_message_compression(elem)) {
367
373
  send_message_batch_continue(elem);
@@ -448,9 +454,9 @@ static grpc_error* compress_init_call_elem(grpc_call_element* elem,
448
454
  }
449
455
 
450
456
  /* Destructor for call_data */
451
- static void compress_destroy_call_elem(grpc_call_element* elem,
452
- const grpc_call_final_info* final_info,
453
- grpc_closure* ignored) {
457
+ static void compress_destroy_call_elem(
458
+ grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
459
+ grpc_closure* /*ignored*/) {
454
460
  call_data* calld = static_cast<call_data*>(elem->call_data);
455
461
  calld->~call_data();
456
462
  }
@@ -487,7 +493,7 @@ static grpc_error* compress_init_channel_elem(grpc_channel_element* elem,
487
493
  }
488
494
 
489
495
  /* Destructor for channel data */
490
- static void compress_destroy_channel_elem(grpc_channel_element* elem) {}
496
+ static void compress_destroy_channel_elem(grpc_channel_element* /*elem*/) {}
491
497
 
492
498
  const grpc_channel_filter grpc_message_compress_filter = {
493
499
  compress_start_transport_stream_op_batch,