Merge branch 'master' into cbapiee

pull/37933/head
AJ Heller 5 months ago
commit c0e170ef5a
  1. 2
      BUILD
  2. 2
      CMakeLists.txt
  3. 2
      Makefile
  4. 6
      bazel/experiments.bzl
  5. 2
      bazel/grpc_build_system.bzl
  6. 6
      bazel/grpc_python_deps.bzl
  7. 3
      bazel/internal_python_rules.bzl
  8. 1
      build_autogenerated.yaml
  9. 2
      build_handwritten.yaml
  10. 4
      examples/cpp/helloworld/cocoapods/HelloWorldCpp.xcodeproj/project.pbxproj
  11. 2
      examples/cpp/helloworld/cocoapods/Podfile
  12. 6
      examples/objective-c/BUILD
  13. 4
      examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj
  14. 4
      examples/objective-c/auth_sample/AuthTestService.podspec
  15. 2
      examples/objective-c/auth_sample/Podfile
  16. 4
      examples/objective-c/helloworld/HelloWorld.podspec
  17. 4
      examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj
  18. 2
      examples/objective-c/helloworld/Podfile
  19. 4
      examples/objective-c/helloworld_macos/HelloWorld.podspec
  20. 4
      examples/objective-c/helloworld_macos/HelloWorld.xcodeproj/project.pbxproj
  21. 2
      examples/objective-c/helloworld_macos/Podfile
  22. 2
      examples/objective-c/route_guide/Podfile
  23. 4
      examples/objective-c/route_guide/RouteGuide.podspec
  24. 4
      examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj
  25. 6
      gRPC-C++.podspec
  26. 6
      gRPC-Core.podspec
  27. 6
      gRPC-ProtoRPC.podspec
  28. 6
      gRPC-RxLibrary.podspec
  29. 38
      gRPC.podspec
  30. 6
      src/core/BUILD
  31. 26
      src/core/ext/transport/chaotic_good/client_transport.cc
  32. 33
      src/core/ext/transport/chaotic_good/server_transport.cc
  33. 3
      src/core/ext/transport/chaotic_good/server_transport.h
  34. 96
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  35. 14
      src/core/ext/transport/chttp2/transport/parsing.cc
  36. 3
      src/core/lib/event_engine/resolved_address.cc
  37. 16
      src/core/lib/event_engine/utils.cc
  38. 7
      src/core/lib/event_engine/utils.h
  39. 45
      src/core/lib/experiments/experiments.cc
  40. 16
      src/core/lib/experiments/experiments.h
  41. 17
      src/core/lib/experiments/experiments.yaml
  42. 2
      src/core/lib/promise/all_ok.h
  43. 8
      src/core/lib/promise/cancel_callback.h
  44. 8
      src/core/lib/promise/context.h
  45. 8
      src/core/lib/promise/detail/promise_factory.h
  46. 2
      src/core/lib/promise/detail/promise_like.h
  47. 6
      src/core/lib/promise/detail/status.h
  48. 13
      src/core/lib/promise/for_each.h
  49. 11
      src/core/lib/promise/if.h
  50. 6
      src/core/lib/promise/join.h
  51. 2
      src/core/lib/promise/loop.h
  52. 6
      src/core/lib/promise/map.h
  53. 36
      src/core/lib/promise/mpsc.h
  54. 6
      src/core/lib/promise/poll.h
  55. 6
      src/core/lib/promise/promise.h
  56. 4
      src/core/lib/promise/race.h
  57. 16
      src/core/lib/promise/seq.h
  58. 5
      src/core/lib/promise/try_join.h
  59. 16
      src/core/lib/promise/try_seq.h
  60. 2
      src/core/lib/resource_quota/arena.h
  61. 12
      src/core/lib/resource_quota/memory_quota.h
  62. 2
      src/core/lib/security/credentials/alts/alts_credentials.cc
  63. 41
      src/core/lib/surface/call_utils.cc
  64. 42
      src/core/lib/surface/call_utils.h
  65. 2
      src/core/lib/surface/version.cc
  66. 280
      src/core/lib/transport/call_filters.h
  67. 4
      src/core/lib/transport/call_spine.h
  68. 18
      src/core/server/server.cc
  69. 6
      src/core/telemetry/stats_data.cc
  70. 6
      src/core/telemetry/stats_data.h
  71. 2
      src/core/telemetry/stats_data.yaml
  72. 6
      src/core/tsi/alts/handshaker/alts_handshaker_client.cc
  73. 18
      src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
  74. 5
      src/core/util/construct_destruct.h
  75. 4
      src/core/util/down_cast.h
  76. 2
      src/core/util/posix/directory_reader.cc
  77. 6
      src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec
  78. 6
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  79. 6
      src/objective-c/!ProtoCompiler.podspec
  80. 6
      src/objective-c/BoringSSL-GRPC.podspec
  81. 2
      src/objective-c/CronetFramework.podspec
  82. 6
      src/objective-c/README.md
  83. 8
      src/objective-c/examples/BUILD
  84. 4
      src/objective-c/examples/InterceptorSample/InterceptorSample.xcodeproj/project.pbxproj
  85. 2
      src/objective-c/examples/InterceptorSample/Podfile
  86. 6
      src/objective-c/examples/RemoteTestClient/RemoteTest.podspec
  87. 2
      src/objective-c/examples/Sample/Podfile
  88. 4
      src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj
  89. 2
      src/objective-c/examples/SwiftSample/Podfile
  90. 4
      src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj
  91. 2
      src/objective-c/examples/SwiftUseFrameworks/Podfile
  92. 2
      src/objective-c/examples/tvOS-sample/Podfile
  93. 6
      src/objective-c/examples/tvOS-sample/tvOS-sample.xcodeproj/project.pbxproj
  94. 2
      src/objective-c/examples/watchOS-sample/Podfile
  95. 4
      src/objective-c/examples/watchOS-sample/watchOS-sample.xcodeproj/project.pbxproj
  96. 2
      src/objective-c/grpc_objc_internal_library.bzl
  97. 8
      src/objective-c/manual_tests/GrpcIosTest.xcodeproj/project.pbxproj
  98. 2
      src/objective-c/manual_tests/Podfile
  99. 6
      src/objective-c/tests/BUILD
  100. 6
      src/objective-c/tests/Common/Common.podspec
  101. Some files were not shown because too many files have changed in this diff Show More

@ -209,7 +209,7 @@ python_config_settings()
# This should be updated along with build_handwritten.yaml
g_stands_for = "groovy" # @unused
core_version = "44.0.0" # @unused
core_version = "44.1.0" # @unused
version = "1.68.0-dev" # @unused

2
CMakeLists.txt generated

@ -26,7 +26,7 @@ cmake_minimum_required(VERSION 3.16)
set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.68.0-dev")
set(gRPC_CORE_VERSION "44.0.0")
set(gRPC_CORE_VERSION "44.1.0")
set(gRPC_CORE_SOVERSION "44")
set(gRPC_CPP_VERSION "1.68.0-dev")
set(gRPC_CPP_SOVERSION "1.68")

2
Makefile generated

@ -367,7 +367,7 @@ E = @echo
Q = @
endif
CORE_VERSION = 44.0.0
CORE_VERSION = 44.1.0
CPP_VERSION = 1.68.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))

@ -24,6 +24,7 @@ EXPERIMENT_ENABLES = {
"event_engine_callback_cq": "event_engine_application_callbacks,event_engine_callback_cq",
"event_engine_client": "event_engine_client",
"event_engine_dns": "event_engine_dns",
"event_engine_dns_non_client_channel": "event_engine_dns_non_client_channel",
"event_engine_listener": "event_engine_listener",
"free_large_allocator": "free_large_allocator",
"local_connector_secure": "local_connector_secure",
@ -32,6 +33,7 @@ EXPERIMENT_ENABLES = {
"multiping": "multiping",
"pick_first_new": "pick_first_new",
"promise_based_inproc_transport": "promise_based_inproc_transport",
"rq_fast_reject": "rq_fast_reject",
"schedule_cancellation_over_write": "schedule_cancellation_over_write",
"server_privacy": "server_privacy",
"tcp_frame_size_tuning": "tcp_frame_size_tuning",
@ -45,6 +47,7 @@ EXPERIMENT_ENABLES = {
EXPERIMENT_POLLERS = [
"event_engine_client",
"event_engine_dns",
"event_engine_dns_non_client_channel",
"event_engine_listener",
]
@ -54,6 +57,7 @@ EXPERIMENTS = {
},
"off": {
"core_end2end_test": [
"event_engine_dns_non_client_channel",
"local_connector_secure",
],
"endpoint_test": [
@ -103,6 +107,7 @@ EXPERIMENTS = {
},
"off": {
"core_end2end_test": [
"event_engine_dns_non_client_channel",
"local_connector_secure",
],
"endpoint_test": [
@ -136,6 +141,7 @@ EXPERIMENTS = {
},
"off": {
"core_end2end_test": [
"event_engine_dns_non_client_channel",
"local_connector_secure",
],
"endpoint_test": [

@ -289,7 +289,7 @@ def ios_cc_test(
size = kwargs.get("size"),
data = kwargs.get("data"),
tags = ios_tags,
minimum_os_version = "9.0",
minimum_os_version = "11.0",
runner = test_runner,
deps = ios_test_deps,
)

@ -38,9 +38,9 @@ def grpc_python_deps():
http_archive(
name = "cython",
build_file = "@com_github_grpc_grpc//third_party:cython.BUILD",
sha256 = "a2da56cc22be823acf49741b9aa3aa116d4f07fa8e8b35a3cb08b8447b37c607",
strip_prefix = "cython-0.29.35",
sha256 = "2ec7d66d23d6da2328fb24f5c1bec6c63a59ec2e91027766ab904f417e1078aa",
strip_prefix = "cython-3.0.11",
urls = [
"https://github.com/cython/cython/archive/0.29.35.tar.gz",
"https://github.com/cython/cython/archive/3.0.11.tar.gz",
],
)

@ -14,6 +14,7 @@
"""Python-related rules intended only for use internal to the repo."""
load("//bazel:gevent_test.bzl", "py_grpc_gevent_test")
load("//bazel:logging_threshold_test.bzl", "py_grpc_logging_threshold_test")
def internal_py_grpc_test(name, **kwargs):
"""Runs a test under all supported environments.
@ -28,6 +29,7 @@ def internal_py_grpc_test(name, **kwargs):
**kwargs
)
py_grpc_gevent_test(name, **kwargs)
py_grpc_logging_threshold_test(name, **kwargs)
suite_kwargs = {}
if "visibility" in kwargs:
@ -38,6 +40,7 @@ def internal_py_grpc_test(name, **kwargs):
tests = [
name + ".native",
name + ".gevent",
name + ".logging_threshold",
],
**suite_kwargs
)

@ -6321,6 +6321,7 @@ targets:
- src/core/lib/promise/detail/seq_state.h
- src/core/lib/promise/detail/status.h
- src/core/lib/promise/exec_ctx_wakeup_scheduler.h
- src/core/lib/promise/for_each.h
- src/core/lib/promise/if.h
- src/core/lib/promise/latch.h
- src/core/lib/promise/loop.h

@ -12,7 +12,7 @@ settings:
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 44.0.0
core_version: 44.1.0
csharp_major_version: 2
g_stands_for: groovy
protobuf_version: 3.28.1

@ -296,7 +296,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -345,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -56,7 +56,7 @@ ios_application(
"ipad",
],
infoplists = ["helloworld/HelloWorld/Info.plist"],
minimum_os_version = "9.0",
minimum_os_version = "11.0",
tags = ["manual"],
deps = [":HelloWorld-lib"],
)
@ -79,7 +79,7 @@ macos_application(
bundle_id = "io.grpc.HelloWorld",
entitlements = "helloworld_macos/HelloWorld/Helloworld.entitlements",
infoplists = ["helloworld_macos/HelloWorld/Info.plist"],
minimum_os_version = "10.13",
minimum_os_version = "10.14",
tags = ["manual"],
deps = [":HelloWorldMacos-lib"],
)
@ -112,7 +112,7 @@ ios_application(
"ipad",
],
infoplists = ["route_guide/Misc/Info.plist"],
minimum_os_version = "9.0",
minimum_os_version = "11.0",
tags = ["manual"],
deps = [":RouteGuideClient-lib"],
)

@ -287,7 +287,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -325,7 +325,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";

@ -7,8 +7,8 @@ Pod::Spec.new do |s|
s.summary = "AuthTestService example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.14"
# Base directory where the .proto files are.
src = "../../protos"

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -7,8 +7,8 @@ Pod::Spec.new do |s|
s.summary = "HelloWorld example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.14"
# Base directory where the .proto files are.
src = "../../protos"

@ -274,7 +274,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -310,7 +310,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -7,8 +7,8 @@ Pod::Spec.new do |s|
s.summary = "HelloWorld example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.14"
# Base directory where the .proto files are.
src = "../../protos"

@ -280,7 +280,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@ -332,7 +332,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :macos, '10.12'
platform :macos, '10.14'
install! 'cocoapods', :deterministic_uuids => false

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -7,8 +7,8 @@ Pod::Spec.new do |s|
s.summary = "RouteGuide example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.14"
# Base directory where the .proto files are.
src = "../../protos"

@ -287,7 +287,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -325,7 +325,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";

6
gRPC-C++.podspec generated

@ -34,9 +34,9 @@ Pod::Spec.new do |s|
:tag => "v#{version}",
}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

6
gRPC-Core.podspec generated

@ -38,9 +38,9 @@ Pod::Spec.new do |s|
# which was released in Cocoapods v1.2.0.
s.cocoapods_version = '>= 1.2.0'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -33,9 +33,9 @@ Pod::Spec.new do |s|
:tag => "v#{version}",
}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -33,9 +33,9 @@ Pod::Spec.new do |s|
:tag => "v#{version}",
}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

38
gRPC.podspec generated

@ -45,9 +45,9 @@ Pod::Spec.new do |s|
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
@ -80,9 +80,9 @@ Pod::Spec.new do |s|
"src/objective-c/GRPCClient/GRPCTypes.mm"
ss.dependency "gRPC-RxLibrary/Interface", version
ss.dependency "#{s.name}/Privacy", version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
end
@ -116,9 +116,9 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Interface-Legacy", version
ss.dependency "#{s.name}/Privacy", version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
end
@ -154,9 +154,9 @@ Pod::Spec.new do |s|
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
end
@ -172,16 +172,16 @@ Pod::Spec.new do |s|
ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework'
ss.ios.deployment_target = '10.0'
ss.ios.deployment_target = '11.0'
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.
s.subspec 'CFStream' do |ss|
ss.dependency "#{s.name}/GRPCCore", version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
end
@ -192,9 +192,9 @@ Pod::Spec.new do |s|
ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,mm}'
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'
end

@ -2378,9 +2378,11 @@ grpc_cc_library(
hdrs = ["lib/event_engine/utils.h"],
external_deps = [
"absl/log:check",
"absl/status:statusor",
"absl/strings",
],
deps = [
"notification",
"time",
"//:event_engine_base_hdrs",
"//:gpr_platform",
@ -7658,8 +7660,11 @@ grpc_cc_library(
"connection_quota",
"error",
"error_utils",
"event_engine_common",
"event_engine_extensions",
"event_engine_query_extensions",
"event_engine_tcp_socket_utils",
"event_engine_utils",
"grpc_insecure_credentials",
"handshaker_registry",
"iomgr_fwd",
@ -8162,6 +8167,7 @@ grpc_cc_library(
"call_final_info",
"call_state",
"dump_args",
"for_each",
"if",
"latch",
"map",

@ -266,6 +266,13 @@ uint32_t ChaoticGoodClientTransport::MakeStream(CallHandler call_handler) {
return stream_id;
}
namespace {
absl::Status BooleanSuccessToTransportError(bool success) {
return success ? absl::OkStatus()
: absl::UnavailableError("Transport closed.");
}
} // namespace
auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id,
CallHandler call_handler) {
auto send_fragment = [stream_id,
@ -273,13 +280,14 @@ auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id,
ClientFragmentFrame frame) mutable {
frame.stream_id = stream_id;
return Map(outgoing_frames.Send(std::move(frame)),
[](bool success) -> absl::Status {
if (!success) {
// Failed to send outgoing frame.
return absl::UnavailableError("Transport closed.");
}
return absl::OkStatus();
});
BooleanSuccessToTransportError);
};
auto send_fragment_acked = [stream_id,
outgoing_frames = outgoing_frames_.MakeSender()](
ClientFragmentFrame frame) mutable {
frame.stream_id = stream_id;
return Map(outgoing_frames.SendAcked(std::move(frame)),
BooleanSuccessToTransportError);
};
return GRPC_LATENT_SEE_PROMISE(
"CallOutboundLoop",
@ -296,7 +304,7 @@ auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id,
},
// Continuously send client frame with client to server messages.
ForEach(OutgoingMessages(call_handler),
[send_fragment, aligned_bytes = aligned_bytes_](
[send_fragment_acked, aligned_bytes = aligned_bytes_](
MessageHandle message) mutable {
ClientFragmentFrame frame;
// Construct frame header (flags, header_length and
@ -310,7 +318,7 @@ auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id,
CHECK_EQ((message_length + padding) % aligned_bytes, 0u);
frame.message = FragmentMessage(std::move(message), padding,
message_length);
return send_fragment(std::move(frame));
return send_fragment_acked(std::move(frame));
}),
[send_fragment]() mutable {
ClientFragmentFrame frame;

@ -124,6 +124,15 @@ auto ChaoticGoodServerTransport::MaybePushFragmentIntoCall(
});
}
namespace {
auto BooleanSuccessToTransportErrorCapturingInitiator(CallInitiator initiator) {
return [initiator = std::move(initiator)](bool success) {
return success ? absl::OkStatus()
: absl::UnavailableError("Transport closed.");
};
}
} // namespace
auto ChaoticGoodServerTransport::SendFragment(
ServerFragmentFrame frame, MpscSender<ServerFrame> outgoing_frames,
CallInitiator call_initiator) {
@ -132,13 +141,20 @@ auto ChaoticGoodServerTransport::SendFragment(
// Capture the call_initiator to ensure the underlying call spine is alive
// until the outgoing_frames.Send promise completes.
return Map(outgoing_frames.Send(std::move(frame)),
[call_initiator](bool success) -> absl::Status {
if (!success) {
// Failed to send outgoing frame.
return absl::UnavailableError("Transport closed.");
}
return absl::OkStatus();
});
BooleanSuccessToTransportErrorCapturingInitiator(
std::move(call_initiator)));
}
auto ChaoticGoodServerTransport::SendFragmentAcked(
ServerFragmentFrame frame, MpscSender<ServerFrame> outgoing_frames,
CallInitiator call_initiator) {
GRPC_TRACE_LOG(chaotic_good, INFO)
<< "CHAOTIC_GOOD: SendFragmentAcked: frame=" << frame.ToString();
// Capture the call_initiator to ensure the underlying call spine is alive
// until the outgoing_frames.Send promise completes.
return Map(outgoing_frames.SendAcked(std::move(frame)),
BooleanSuccessToTransportErrorCapturingInitiator(
std::move(call_initiator)));
}
auto ChaoticGoodServerTransport::SendCallBody(
@ -165,7 +181,8 @@ auto ChaoticGoodServerTransport::SendCallBody(
frame.message =
FragmentMessage(std::move(message), padding, message_length);
frame.stream_id = stream_id;
return SendFragment(std::move(frame), outgoing_frames, call_initiator);
return SendFragmentAcked(std::move(frame), outgoing_frames,
call_initiator);
});
}

@ -111,6 +111,9 @@ class ChaoticGoodServerTransport final : public ServerTransport {
static auto SendFragment(ServerFragmentFrame frame,
MpscSender<ServerFrame> outgoing_frames,
CallInitiator call_initiator);
static auto SendFragmentAcked(ServerFragmentFrame frame,
MpscSender<ServerFrame> outgoing_frames,
CallInitiator call_initiator);
auto CallOutboundLoop(uint32_t stream_id, CallInitiator call_initiator);
auto OnTransportActivityDone(absl::string_view activity);
auto TransportReadLoop(RefCountedPtr<ChaoticGoodTransport> transport);

@ -59,6 +59,9 @@
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"
#include "src/core/lib/event_engine/extensions/supports_fd.h"
#include "src/core/lib/event_engine/query_extensions.h"
#include "src/core/lib/event_engine/resolved_address_internal.h"
#include "src/core/lib/event_engine/tcp_socket_utils.h"
#include "src/core/lib/event_engine/utils.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/event_engine_shims/endpoint.h"
@ -113,7 +116,8 @@ using AcceptorPtr = std::unique_ptr<grpc_tcp_server_acceptor, AcceptorDeleter>;
class Chttp2ServerListener : public Server::ListenerInterface {
public:
static grpc_error_handle Create(Server* server, grpc_resolved_address* addr,
static grpc_error_handle Create(Server* server,
const EventEngine::ResolvedAddress& addr,
const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier,
int* port_num);
@ -627,8 +631,10 @@ void Chttp2ServerListener::ActiveConnection::SendGoAway() {
}
if (transport != nullptr) {
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->goaway_error =
GRPC_ERROR_CREATE("Server is stopping to serve requests.");
// Set an HTTP2 error of NO_ERROR to do graceful GOAWAYs.
op->goaway_error = grpc_error_set_int(
GRPC_ERROR_CREATE("Server is stopping to serve requests."),
StatusIntProperty::kHttp2Error, GRPC_HTTP2_NO_ERROR);
transport->PerformOp(op);
}
}
@ -701,8 +707,9 @@ void Chttp2ServerListener::ActiveConnection::OnDrainGraceTimeExpiry() {
//
grpc_error_handle Chttp2ServerListener::Create(
Server* server, grpc_resolved_address* addr, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier, int* port_num) {
Server* server, const EventEngine::ResolvedAddress& addr,
const ChannelArgs& args, Chttp2ServerArgsModifier args_modifier,
int* port_num) {
// Create Chttp2ServerListener.
OrphanablePtr<Chttp2ServerListener> listener =
MakeOrphanable<Chttp2ServerListener>(server, args, args_modifier,
@ -714,18 +721,24 @@ grpc_error_handle Chttp2ServerListener::Create(
&listener->tcp_server_shutdown_complete_, ChannelArgsEndpointConfig(args),
OnAccept, listener.get(), &listener->tcp_server_);
if (!error.ok()) return error;
// TODO(yijiem): remove this conversion when we remove all
// grpc_resolved_address usages.
grpc_resolved_address iomgr_addr =
grpc_event_engine::experimental::CreateGRPCResolvedAddress(addr);
if (listener->config_fetcher_ != nullptr) {
listener->resolved_address_ = *addr;
listener->resolved_address_ = iomgr_addr;
// TODO(yashykt): Consider binding so as to be able to return the port
// number.
} else {
error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num);
error =
grpc_tcp_server_add_port(listener->tcp_server_, &iomgr_addr, port_num);
if (!error.ok()) return error;
}
// Create channelz node.
if (args.GetBool(GRPC_ARG_ENABLE_CHANNELZ)
.value_or(GRPC_ENABLE_CHANNELZ_DEFAULT)) {
auto string_address = grpc_sockaddr_to_uri(addr);
auto string_address =
grpc_event_engine::experimental::ResolvedAddressToString(addr);
if (!string_address.ok()) {
return GRPC_ERROR_CREATE(string_address.status().ToString());
}
@ -955,37 +968,68 @@ grpc_error_handle Chttp2ServerAddPort(Server* server, const char* addr,
args_modifier);
}
*port_num = -1;
absl::StatusOr<std::vector<grpc_resolved_address>> resolved_or;
absl::StatusOr<std::vector<grpc_resolved_address>> resolved;
absl::StatusOr<std::vector<EventEngine::ResolvedAddress>> results =
std::vector<EventEngine::ResolvedAddress>();
std::vector<grpc_error_handle> error_list;
std::string parsed_addr = URI::PercentDecode(addr);
absl::string_view parsed_addr_unprefixed{parsed_addr};
// Using lambda to avoid use of goto.
grpc_error_handle error = [&]() {
grpc_error_handle error;
// TODO(ladynana, yijiem): this code does not handle address URIs correctly:
// it's parsing `unix://foo/bar` as path `/foo/bar` when it should be
// parsing it as authority `foo` and path `/bar`. Also add API documentation
// on the valid URIs that grpc_server_add_http2_port accepts.
if (absl::ConsumePrefix(&parsed_addr_unprefixed, kUnixUriPrefix)) {
resolved_or = grpc_resolve_unix_domain_address(parsed_addr_unprefixed);
resolved = grpc_resolve_unix_domain_address(parsed_addr_unprefixed);
GRPC_RETURN_IF_ERROR(resolved.status());
} else if (absl::ConsumePrefix(&parsed_addr_unprefixed,
kUnixAbstractUriPrefix)) {
resolved_or =
resolved =
grpc_resolve_unix_abstract_domain_address(parsed_addr_unprefixed);
GRPC_RETURN_IF_ERROR(resolved.status());
} else if (absl::ConsumePrefix(&parsed_addr_unprefixed, kVSockUriPrefix)) {
resolved_or = grpc_resolve_vsock_address(parsed_addr_unprefixed);
resolved = grpc_resolve_vsock_address(parsed_addr_unprefixed);
GRPC_RETURN_IF_ERROR(resolved.status());
} else {
resolved_or =
GetDNSResolver()->LookupHostnameBlocking(parsed_addr, "https");
if (IsEventEngineDnsNonClientChannelEnabled()) {
absl::StatusOr<std::unique_ptr<EventEngine::DNSResolver>> ee_resolver =
args.GetObjectRef<EventEngine>()->GetDNSResolver(
EventEngine::DNSResolver::ResolverOptions());
GRPC_RETURN_IF_ERROR(ee_resolver.status());
results = grpc_event_engine::experimental::LookupHostnameBlocking(
ee_resolver->get(), parsed_addr, "https");
} else {
// TODO(yijiem): Remove this after event_engine_dns_non_client_channel
// is fully enabled.
absl::StatusOr<std::vector<grpc_resolved_address>> iomgr_results =
GetDNSResolver()->LookupHostnameBlocking(parsed_addr, "https");
GRPC_RETURN_IF_ERROR(iomgr_results.status());
for (const auto& addr : *iomgr_results) {
results->push_back(
grpc_event_engine::experimental::CreateResolvedAddress(addr));
}
}
}
if (!resolved_or.ok()) {
return absl_status_to_grpc_error(resolved_or.status());
if (resolved.ok()) {
for (const auto& addr : *resolved) {
results->push_back(
grpc_event_engine::experimental::CreateResolvedAddress(addr));
}
}
GRPC_RETURN_IF_ERROR(results.status());
// Create a listener for each resolved address.
for (auto& addr : *resolved_or) {
for (EventEngine::ResolvedAddress& addr : *results) {
// If address has a wildcard port (0), use the same port as a previous
// listener.
if (*port_num != -1 && grpc_sockaddr_get_port(&addr) == 0) {
grpc_sockaddr_set_port(&addr, *port_num);
if (*port_num != -1 &&
grpc_event_engine::experimental::ResolvedAddressGetPort(addr) == 0) {
grpc_event_engine::experimental::ResolvedAddressSetPort(addr,
*port_num);
}
int port_temp = -1;
error = Chttp2ServerListener::Create(server, &addr, args, args_modifier,
error = Chttp2ServerListener::Create(server, addr, args, args_modifier,
&port_temp);
if (!error.ok()) {
error_list.push_back(error);
@ -997,17 +1041,17 @@ grpc_error_handle Chttp2ServerAddPort(Server* server, const char* addr,
}
}
}
if (error_list.size() == resolved_or->size()) {
if (error_list.size() == results->size()) {
std::string msg = absl::StrFormat(
"No address added out of total %" PRIuPTR " resolved for '%s'",
resolved_or->size(), addr);
results->size(), addr);
return GRPC_ERROR_CREATE_REFERENCING(msg.c_str(), error_list.data(),
error_list.size());
} else if (!error_list.empty()) {
std::string msg = absl::StrFormat(
"Only %" PRIuPTR " addresses added out of total %" PRIuPTR
" resolved",
resolved_or->size() - error_list.size(), resolved_or->size());
std::string msg =
absl::StrFormat("Only %" PRIuPTR
" addresses added out of total %" PRIuPTR " resolved",
results->size() - error_list.size(), results->size());
error = GRPC_ERROR_CREATE_REFERENCING(msg.c_str(), error_list.data(),
error_list.size());
LOG(INFO) << "WARNING: " << StatusToString(error);

@ -68,6 +68,8 @@
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/telemetry/call_tracer.h"
#include "src/core/telemetry/stats.h"
#include "src/core/telemetry/stats_data.h"
#include "src/core/util/random_early_detection.h"
#include "src/core/util/ref_counted_ptr.h"
#include "src/core/util/status_helper.h"
@ -642,6 +644,18 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
GRPC_HTTP2_REFUSED_STREAM, nullptr));
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
return init_header_skip_frame_parser(t, priority_type, is_eoh);
} else if (grpc_core::IsRqFastRejectEnabled() &&
GPR_UNLIKELY(t->memory_owner.IsMemoryPressureHigh())) {
// We have more streams allocated than we'd like, so apply some pushback
// by refusing this stream.
grpc_core::global_stats().IncrementRqCallsRejected();
++t->num_pending_induced_frames;
grpc_slice_buffer_add(
&t->qbuf,
grpc_chttp2_rst_stream_create(t->incoming_stream_id,
GRPC_HTTP2_ENHANCE_YOUR_CALM, nullptr));
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
return init_header_skip_frame_parser(t, priority_type, is_eoh);
} else if (GPR_UNLIKELY(
t->max_concurrent_streams_overload_protection &&
t->streams_allocated.load(std::memory_order_relaxed) >

@ -48,6 +48,9 @@ EventEngine::ResolvedAddress CreateResolvedAddress(
grpc_resolved_address CreateGRPCResolvedAddress(
const EventEngine::ResolvedAddress& ra) {
static_assert(
GRPC_MAX_SOCKADDR_SIZE == EventEngine::ResolvedAddress::MAX_SIZE_BYTES,
"size should match");
grpc_resolved_address grpc_addr;
memset(&grpc_addr, 0, sizeof(grpc_resolved_address));
memcpy(grpc_addr.addr, ra.address(), ra.size());

@ -20,6 +20,7 @@
#include <algorithm>
#include "absl/strings/str_cat.h"
#include "src/core/util/notification.h"
#include "src/core/util/time.h"
namespace grpc_event_engine {
@ -38,5 +39,20 @@ grpc_core::Timestamp ToTimestamp(grpc_core::Timestamp now,
grpc_core::Duration::Milliseconds(1);
}
absl::StatusOr<std::vector<EventEngine::ResolvedAddress>>
LookupHostnameBlocking(EventEngine::DNSResolver* dns_resolver,
absl::string_view name, absl::string_view default_port) {
absl::StatusOr<std::vector<EventEngine::ResolvedAddress>> results;
grpc_core::Notification done;
dns_resolver->LookupHostname(
[&](absl::StatusOr<std::vector<EventEngine::ResolvedAddress>> addresses) {
results = std::move(addresses);
done.Notify();
},
name, default_port);
done.WaitForNotification();
return results;
}
} // namespace experimental
} // namespace grpc_event_engine

@ -19,7 +19,10 @@
#include <stdint.h>
#include <string>
#include <vector>
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "src/core/util/time.h"
namespace grpc_event_engine {
@ -36,6 +39,10 @@ std::string HandleToString(const Handle& handle) {
grpc_core::Timestamp ToTimestamp(grpc_core::Timestamp now,
EventEngine::Duration delta);
absl::StatusOr<std::vector<EventEngine::ResolvedAddress>>
LookupHostnameBlocking(EventEngine::DNSResolver* dns_resolver,
absl::string_view name, absl::string_view default_port);
} // namespace experimental
} // namespace grpc_event_engine

@ -48,6 +48,11 @@ const char* const additional_constraints_event_engine_client = "{}";
const char* const description_event_engine_dns =
"If set, use EventEngine DNSResolver for client channel resolution";
const char* const additional_constraints_event_engine_dns = "{}";
const char* const description_event_engine_dns_non_client_channel =
"If set, use EventEngine DNSResolver in other places besides client "
"channel.";
const char* const additional_constraints_event_engine_dns_non_client_channel =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -75,6 +80,10 @@ const char* const additional_constraints_pick_first_new = "{}";
const char* const description_promise_based_inproc_transport =
"Use promises for the in-process transport.";
const char* const additional_constraints_promise_based_inproc_transport = "{}";
const char* const description_rq_fast_reject =
"Resource quota rejects requests immediately (before allocating the "
"request structure) under very high memory pressure.";
const char* const additional_constraints_rq_fast_reject = "{}";
const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
@ -128,6 +137,10 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_event_engine_client, nullptr, 0, false, true},
{"event_engine_dns", description_event_engine_dns,
additional_constraints_event_engine_dns, nullptr, 0, false, false},
{"event_engine_dns_non_client_channel",
description_event_engine_dns_non_client_channel,
additional_constraints_event_engine_dns_non_client_channel, nullptr, 0,
false, false},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, nullptr, 0, false, true},
{"free_large_allocator", description_free_large_allocator,
@ -147,6 +160,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_promise_based_inproc_transport,
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"rq_fast_reject", description_rq_fast_reject,
additional_constraints_rq_fast_reject, nullptr, 0, false, true},
{"schedule_cancellation_over_write",
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,
@ -198,6 +213,11 @@ const char* const additional_constraints_event_engine_client = "{}";
const char* const description_event_engine_dns =
"If set, use EventEngine DNSResolver for client channel resolution";
const char* const additional_constraints_event_engine_dns = "{}";
const char* const description_event_engine_dns_non_client_channel =
"If set, use EventEngine DNSResolver in other places besides client "
"channel.";
const char* const additional_constraints_event_engine_dns_non_client_channel =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -225,6 +245,10 @@ const char* const additional_constraints_pick_first_new = "{}";
const char* const description_promise_based_inproc_transport =
"Use promises for the in-process transport.";
const char* const additional_constraints_promise_based_inproc_transport = "{}";
const char* const description_rq_fast_reject =
"Resource quota rejects requests immediately (before allocating the "
"request structure) under very high memory pressure.";
const char* const additional_constraints_rq_fast_reject = "{}";
const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
@ -278,6 +302,10 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_event_engine_client, nullptr, 0, true, true},
{"event_engine_dns", description_event_engine_dns,
additional_constraints_event_engine_dns, nullptr, 0, true, false},
{"event_engine_dns_non_client_channel",
description_event_engine_dns_non_client_channel,
additional_constraints_event_engine_dns_non_client_channel, nullptr, 0,
false, false},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, nullptr, 0, true, true},
{"free_large_allocator", description_free_large_allocator,
@ -297,6 +325,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_promise_based_inproc_transport,
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"rq_fast_reject", description_rq_fast_reject,
additional_constraints_rq_fast_reject, nullptr, 0, false, true},
{"schedule_cancellation_over_write",
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,
@ -348,6 +378,11 @@ const char* const additional_constraints_event_engine_client = "{}";
const char* const description_event_engine_dns =
"If set, use EventEngine DNSResolver for client channel resolution";
const char* const additional_constraints_event_engine_dns = "{}";
const char* const description_event_engine_dns_non_client_channel =
"If set, use EventEngine DNSResolver in other places besides client "
"channel.";
const char* const additional_constraints_event_engine_dns_non_client_channel =
"{}";
const char* const description_event_engine_listener =
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
const char* const additional_constraints_event_engine_listener = "{}";
@ -375,6 +410,10 @@ const char* const additional_constraints_pick_first_new = "{}";
const char* const description_promise_based_inproc_transport =
"Use promises for the in-process transport.";
const char* const additional_constraints_promise_based_inproc_transport = "{}";
const char* const description_rq_fast_reject =
"Resource quota rejects requests immediately (before allocating the "
"request structure) under very high memory pressure.";
const char* const additional_constraints_rq_fast_reject = "{}";
const char* const description_schedule_cancellation_over_write =
"Allow cancellation op to be scheduled over a write";
const char* const additional_constraints_schedule_cancellation_over_write =
@ -428,6 +467,10 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_event_engine_client, nullptr, 0, true, true},
{"event_engine_dns", description_event_engine_dns,
additional_constraints_event_engine_dns, nullptr, 0, true, false},
{"event_engine_dns_non_client_channel",
description_event_engine_dns_non_client_channel,
additional_constraints_event_engine_dns_non_client_channel, nullptr, 0,
false, false},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, nullptr, 0, true, true},
{"free_large_allocator", description_free_large_allocator,
@ -447,6 +490,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
description_promise_based_inproc_transport,
additional_constraints_promise_based_inproc_transport, nullptr, 0, false,
false},
{"rq_fast_reject", description_rq_fast_reject,
additional_constraints_rq_fast_reject, nullptr, 0, false, true},
{"schedule_cancellation_over_write",
description_schedule_cancellation_over_write,
additional_constraints_schedule_cancellation_over_write, nullptr, 0, false,

@ -67,6 +67,7 @@ inline bool IsEventEngineApplicationCallbacksEnabled() { return true; }
inline bool IsEventEngineCallbackCqEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return false; }
inline bool IsEventEngineDnsEnabled() { return false; }
inline bool IsEventEngineDnsNonClientChannelEnabled() { return false; }
inline bool IsEventEngineListenerEnabled() { return false; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
inline bool IsLocalConnectorSecureEnabled() { return false; }
@ -77,6 +78,7 @@ inline bool IsMultipingEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_NEW
inline bool IsPickFirstNewEnabled() { return true; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsRqFastRejectEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsServerPrivacyEnabled() { return false; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
@ -101,6 +103,7 @@ inline bool IsEventEngineCallbackCqEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
inline bool IsEventEngineDnsEnabled() { return true; }
inline bool IsEventEngineDnsNonClientChannelEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
inline bool IsEventEngineListenerEnabled() { return true; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
@ -112,6 +115,7 @@ inline bool IsMultipingEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_NEW
inline bool IsPickFirstNewEnabled() { return true; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsRqFastRejectEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsServerPrivacyEnabled() { return false; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
@ -136,6 +140,7 @@ inline bool IsEventEngineCallbackCqEnabled() { return true; }
inline bool IsEventEngineClientEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
inline bool IsEventEngineDnsEnabled() { return true; }
inline bool IsEventEngineDnsNonClientChannelEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
inline bool IsEventEngineListenerEnabled() { return true; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }
@ -147,6 +152,7 @@ inline bool IsMultipingEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_NEW
inline bool IsPickFirstNewEnabled() { return true; }
inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
inline bool IsRqFastRejectEnabled() { return false; }
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
inline bool IsServerPrivacyEnabled() { return false; }
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
@ -169,6 +175,7 @@ enum ExperimentIds {
kExperimentIdEventEngineCallbackCq,
kExperimentIdEventEngineClient,
kExperimentIdEventEngineDns,
kExperimentIdEventEngineDnsNonClientChannel,
kExperimentIdEventEngineListener,
kExperimentIdFreeLargeAllocator,
kExperimentIdLocalConnectorSecure,
@ -177,6 +184,7 @@ enum ExperimentIds {
kExperimentIdMultiping,
kExperimentIdPickFirstNew,
kExperimentIdPromiseBasedInprocTransport,
kExperimentIdRqFastReject,
kExperimentIdScheduleCancellationOverWrite,
kExperimentIdServerPrivacy,
kExperimentIdTcpFrameSizeTuning,
@ -215,6 +223,10 @@ inline bool IsEventEngineClientEnabled() {
inline bool IsEventEngineDnsEnabled() {
return IsExperimentEnabled<kExperimentIdEventEngineDns>();
}
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS_NON_CLIENT_CHANNEL
inline bool IsEventEngineDnsNonClientChannelEnabled() {
return IsExperimentEnabled<kExperimentIdEventEngineDnsNonClientChannel>();
}
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
inline bool IsEventEngineListenerEnabled() {
return IsExperimentEnabled<kExperimentIdEventEngineListener>();
@ -247,6 +259,10 @@ inline bool IsPickFirstNewEnabled() {
inline bool IsPromiseBasedInprocTransportEnabled() {
return IsExperimentEnabled<kExperimentIdPromiseBasedInprocTransport>();
}
#define GRPC_EXPERIMENT_IS_INCLUDED_RQ_FAST_REJECT
inline bool IsRqFastRejectEnabled() {
return IsExperimentEnabled<kExperimentIdRqFastReject>();
}
#define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE
inline bool IsScheduleCancellationOverWriteEnabled() {
return IsExperimentEnabled<kExperimentIdScheduleCancellationOverWrite>();

@ -82,6 +82,14 @@
test_tags: ["cancel_ares_query_test", "resolver_component_tests_runner_invoker"]
allow_in_fuzzing_config: false
uses_polling: true
- name: event_engine_dns_non_client_channel
description:
If set, use EventEngine DNSResolver in other places besides client channel.
expiry: 2025/03/01
owner: yijiem@google.com
test_tags: ["core_end2end_test"]
allow_in_fuzzing_config: false
uses_polling: true
- name: event_engine_listener
description: Use EventEngine listeners instead of iomgr's grpc_tcp_server
expiry: 2025/03/01
@ -119,7 +127,7 @@
test_tags: [flow_control_test]
- name: pick_first_new
description: New pick_first impl with memory reduction.
expiry: 2024/10/30
expiry: 2025/03/01
owner: roth@google.com
test_tags: ["lb_unit_test", "cpp_lb_end2end_test", "xds_end2end_test"]
- name: promise_based_inproc_transport
@ -129,6 +137,13 @@
owner: ctiller@google.com
test_tags: []
allow_in_fuzzing_config: false # experiment currently crashes if enabled
- name: rq_fast_reject
description:
Resource quota rejects requests immediately (before allocating the request
structure) under very high memory pressure.
expiry: 2025/06/06
owner: ctiller@google.com
test_tags: []
- name: schedule_cancellation_over_write
description: Allow cancellation op to be scheduled over a write
expiry: 2024/12/01

@ -77,7 +77,7 @@ class AllOk {
// If any fail, cancel the rest and return the failure.
// If all succeed, return Ok.
template <typename Result, typename... Promises>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto AllOk(Promises... promises) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto AllOk(Promises... promises) {
return promise_detail::AllOk<Result, Promises...>(std::move(promises)...);
}

@ -69,8 +69,8 @@ class Handler {
// completion.
// Returns a promise with the same result type as main_fn.
template <typename MainFn, typename CancelFn>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto OnCancel(MainFn main_fn,
CancelFn cancel_fn) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto OnCancel(MainFn main_fn,
CancelFn cancel_fn) {
return [on_cancel =
cancel_callback_detail::Handler<CancelFn>(std::move(cancel_fn)),
main_fn = promise_detail::PromiseLike<MainFn>(
@ -87,8 +87,8 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto OnCancel(MainFn main_fn,
// resulting promise. If the factory is dropped without being called, cancel_fn
// is called.
template <typename MainFn, typename CancelFn>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto OnCancelFactory(MainFn main_fn,
CancelFn cancel_fn) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto OnCancelFactory(
MainFn main_fn, CancelFn cancel_fn) {
return [on_cancel =
cancel_callback_detail::Handler<CancelFn>(std::move(cancel_fn)),
main_fn = std::move(main_fn)]() mutable {

@ -105,13 +105,13 @@ class WithContext {
// Return true if a context of type T is currently active.
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION bool HasContext() {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline bool HasContext() {
return promise_detail::Context<T>::get() != nullptr;
}
// Retrieve the current value of a context, or abort if the value is unset.
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION T* GetContext() {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline T* GetContext() {
auto* p = promise_detail::Context<T>::get();
DCHECK_NE(p, nullptr);
return p;
@ -119,12 +119,12 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION T* GetContext() {
// Retrieve the current value of a context, or nullptr if the value is unset.
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION T* MaybeGetContext() {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline T* MaybeGetContext() {
return promise_detail::Context<T>::get();
}
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION void SetContext(T* p) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void SetContext(T* p) {
promise_detail::Context<T>::set(p);
}

@ -124,7 +124,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION
// Promote a callable() -> T|Poll<T> to a PromiseFactory(A) -> Promise<T>
// by dropping the argument passed to the factory.
template <typename A, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION absl::enable_if_t<
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
!IsVoidCallable<ResultOf<F()>>::value, PromiseLike<RemoveCVRef<F>>>
PromiseFactoryImpl(F f, A&&) {
return PromiseLike<F>(std::move(f));
@ -132,7 +132,7 @@ PromiseFactoryImpl(F f, A&&) {
// Promote a callable() -> T|Poll<T> to a PromiseFactory() -> Promise<T>
template <typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION absl::enable_if_t<
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
!IsVoidCallable<ResultOf<F()>>::value, PromiseLike<RemoveCVRef<F>>>
PromiseFactoryImpl(F f) {
return PromiseLike<F>(std::move(f));
@ -140,7 +140,7 @@ PromiseFactoryImpl(F f) {
// Given a callable(A) -> Promise<T>, name it a PromiseFactory and use it.
template <typename A, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION absl::enable_if_t<
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
IsVoidCallable<ResultOf<F(A)>>::value,
PromiseLike<decltype(std::declval<F>()(std::declval<A>()))>>
PromiseFactoryImpl(F&& f, A&& arg) {
@ -149,7 +149,7 @@ PromiseFactoryImpl(F&& f, A&& arg) {
// Given a callable(A) -> Promise<T>, name it a PromiseFactory and use it.
template <typename A, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION absl::enable_if_t<
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
IsVoidCallable<ResultOf<F(A)>>::value,
PromiseLike<decltype(std::declval<F>()(std::declval<A>()))>>
PromiseFactoryImpl(F& f, A&& arg) {

@ -63,7 +63,7 @@ struct PollWrapper<Poll<T>> {
};
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto WrapInPoll(T&& x)
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto WrapInPoll(T&& x)
-> decltype(PollWrapper<T>::Wrap(std::forward<T>(x))) {
return PollWrapper<T>::Wrap(std::forward<T>(x));
}

@ -30,7 +30,7 @@ namespace promise_detail {
// Convert with a move the input status to an absl::Status.
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION absl::Status IntoStatus(
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::Status IntoStatus(
absl::StatusOr<T>* status) {
return std::move(status->status());
}
@ -103,7 +103,7 @@ struct StatusCastImpl<absl::Status, const absl::StatusOr<T>&> {
// For cases where the status is guaranteed to be a failure (and hence not
// needing to preserve values) see FailureStatusCast<> below.
template <typename To, typename From>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To StatusCast(From&& from) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline To StatusCast(From&& from) {
return StatusCastImpl<To, From>::Cast(std::forward<From>(from));
}
@ -127,7 +127,7 @@ struct FailureStatusCastImpl<absl::StatusOr<T>, const absl::Status&> {
};
template <typename To, typename From>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To FailureStatusCast(From&& from) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline To FailureStatusCast(From&& from) {
DCHECK(!IsStatusOk(from));
return FailureStatusCastImpl<To, From>::Cast(std::forward<From>(from));
}

@ -77,8 +77,8 @@ struct NextValueTraits<T, absl::void_t<typename T::value_type>> {
return NextValueType::kEndOfStream;
}
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static Value& MutableValue(T& t) {
return *t;
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static Value&& TakeValue(T& t) {
return std::move(*t);
}
};
@ -95,9 +95,9 @@ struct NextValueTraits<ValueOrFailure<absl::optional<T>>> {
return NextValueType::kError;
}
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static Value& MutableValue(
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static Value&& TakeValue(
ValueOrFailure<absl::optional<T>>& t) {
return **t;
return std::move(**t);
}
};
@ -179,7 +179,7 @@ class ForEach {
<< DebugTag() << " PollReaderNext: got value";
Destruct(&reader_next_);
auto action = action_factory_.Make(
std::move(NextValueTraits<ReaderResult>::MutableValue(*p)));
NextValueTraits<ReaderResult>::TakeValue(*p));
Construct(&in_action_, std::move(action), std::move(*p));
reading_next_ = false;
return PollAction();
@ -229,7 +229,8 @@ class ForEach {
/// For each item acquired by calling Reader::Next, run the promise Action.
template <typename Reader, typename Action>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION for_each_detail::ForEach<Reader, Action>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline for_each_detail::ForEach<Reader,
Action>
ForEach(Reader reader, Action action, DebugLocation whence = {}) {
return for_each_detail::ForEach<Reader, Action>(std::move(reader),
std::move(action), whence);

@ -32,8 +32,8 @@ namespace grpc_core {
namespace promise_detail {
template <typename CallPoll, typename T, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION typename CallPoll::PollResult ChooseIf(
CallPoll call_poll, bool result, T* if_true, F* if_false) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline typename CallPoll::PollResult
ChooseIf(CallPoll call_poll, bool result, T* if_true, F* if_false) {
if (result) {
auto promise = if_true->Make();
return call_poll(promise);
@ -44,8 +44,9 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION typename CallPoll::PollResult ChooseIf(
}
template <typename CallPoll, typename T, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION typename CallPoll::PollResult ChooseIf(
CallPoll call_poll, absl::StatusOr<bool> result, T* if_true, F* if_false) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline typename CallPoll::PollResult
ChooseIf(CallPoll call_poll, absl::StatusOr<bool> result, T* if_true,
F* if_false) {
if (!result.ok()) {
return typename CallPoll::PollResult(result.status());
} else if (*result) {
@ -199,7 +200,7 @@ class If<bool, T, F> {
// This makes it safe to capture lambda arguments in the promise factory by
// reference.
template <typename C, typename T, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::If<C, T, F> If(
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::If<C, T, F> If(
C condition, T if_true, F if_false) {
return promise_detail::If<C, T, F>(std::move(condition), std::move(if_true),
std::move(if_false));

@ -74,13 +74,13 @@ struct WrapInTuple {
/// Combinator to run all promises to completion, and return a tuple
/// of their results.
template <typename... Promise>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Join<Promise...> Join(
Promise... promises) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Join<Promise...>
Join(Promise... promises) {
return promise_detail::Join<Promise...>(std::move(promises)...);
}
template <typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto Join(F promise) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto Join(F promise) {
return Map(std::move(promise), promise_detail::WrapInTuple{});
}

@ -140,7 +140,7 @@ class Loop {
// Expects F returns LoopCtl<T> - if it's Continue, then run the loop again -
// otherwise yield the returned value as the result of the loop.
template <typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Loop<F> Loop(F f) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Loop<F> Loop(F f) {
return promise_detail::Loop<F>(std::move(f));
}

@ -67,8 +67,8 @@ class Map {
// Takes a promise, and a synchronous function to mutate its result, and
// returns a promise.
template <typename Promise, typename Fn>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Map<Promise, Fn> Map(
Promise promise, Fn fn) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Map<Promise, Fn>
Map(Promise promise, Fn fn) {
return promise_detail::Map<Promise, Fn>(std::move(promise), std::move(fn));
}
@ -76,7 +76,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Map<Promise, Fn> Map(
// and a bool indicating whether there was ever a Pending{} value observed from
// polling.
template <typename Promise>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto CheckDelayed(Promise promise) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto CheckDelayed(Promise promise) {
using P = promise_detail::PromiseLike<Promise>;
return [delayed = false, promise = P(std::move(promise))]() mutable
-> Poll<std::tuple<typename P::Result, bool>> {

@ -76,14 +76,19 @@ class Center : public RefCounted<Center<T>> {
return true;
}
// Returns the batch number that the item was sent in, or kClosedBatch if the
// pipe is closed.
uint64_t Send(T t) {
// Return value:
// - if the pipe is closed, returns kClosedBatch
// - if await_receipt is false, returns the batch number the item was sent
// in.
// - if await_receipt is true, returns the first sending batch number that
// guarantees the item has been received.
uint64_t Send(T t, bool await_receipt) {
ReleasableMutexLock lock(&mu_);
if (batch_ == kClosedBatch) return kClosedBatch;
queue_.push_back(std::move(t));
auto receive_waker = std::move(receive_waker_);
const uint64_t batch = queue_.size() <= max_queued_ ? batch_ : batch_ + 1;
const uint64_t batch =
(!await_receipt && queue_.size() <= max_queued_) ? batch_ : batch_ + 1;
lock.Release();
receive_waker.Wakeup();
return batch;
@ -135,12 +140,25 @@ class MpscSender {
// Return a promise that will send one item.
// Resolves to true if sent, false if the receiver was closed (and the value
// will never be successfully sent).
auto Send(T t) {
auto Send(T t) { return SendGeneric<false>(std::move(t)); }
// Per send, but do not resolve until the item has been received by the
// receiver.
auto SendAcked(T t) { return SendGeneric<true>(std::move(t)); }
bool UnbufferedImmediateSend(T t) {
return center_->Send(std::move(t), false) !=
mpscpipe_detail::Center<T>::kClosedBatch;
}
private:
template <bool kAwaitReceipt>
auto SendGeneric(T t) {
return [center = center_, t = std::move(t),
batch = uint64_t(0)]() mutable -> Poll<bool> {
if (center == nullptr) return false;
if (batch == 0) {
batch = center->Send(std::move(t));
batch = center->Send(std::move(t), kAwaitReceipt);
CHECK_NE(batch, 0u);
if (batch == mpscpipe_detail::Center<T>::kClosedBatch) return false;
}
@ -150,12 +168,6 @@ class MpscSender {
};
}
bool UnbufferedImmediateSend(T t) {
return center_->Send(std::move(t)) !=
mpscpipe_detail::Center<T>::kClosedBatch;
}
private:
friend class MpscReceiver<T>;
explicit MpscSender(RefCountedPtr<mpscpipe_detail::Center<T>> center)
: center_(std::move(center)) {}

@ -222,8 +222,8 @@ struct PollTraits<Poll<T>> {
};
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION bool operator==(const Poll<T>& a,
const Poll<T>& b) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline bool operator==(const Poll<T>& a,
const Poll<T>& b) {
if (a.pending() && b.pending()) return true;
if (a.ready() && b.ready()) return a.value() == b.value();
return false;
@ -262,7 +262,7 @@ struct PollCastImpl<T, Poll<T>> {
};
template <typename T, typename U>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<T> poll_cast(U poll) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll<T> poll_cast(U poll) {
return PollCastImpl<T, U>::Cast(std::move(poll));
}

@ -71,8 +71,8 @@ class Immediate {
// Return \a value immediately
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Immediate<T> Immediate(
T value) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Immediate<T>
Immediate(T value) {
return promise_detail::Immediate<T>(std::move(value));
}
@ -89,7 +89,7 @@ struct ImmediateOkStatus {
// should fail to compile. When modifying this code these should be uncommented
// and their miscompilation verified.
template <typename T, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto WithResult(F f) ->
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto WithResult(F f) ->
typename std::enable_if<std::is_same<decltype(f()), Poll<T>>::value,
F>::type {
return f;

@ -74,8 +74,8 @@ class Race<Promise> {
/// If two results are simultaneously available, bias towards the first result
/// listed.
template <typename... Promises>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Race<Promises...> Race(
Promises... promises) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Race<Promises...>
Race(Promises... promises) {
return promise_detail::Race<Promises...>(std::move(promises)...);
}

@ -106,32 +106,33 @@ struct SeqIterResultTraits {
// etc
// Return the final value.
template <typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION F Seq(F functor) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline F Seq(F functor) {
return functor;
}
template <typename F0, typename F1>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Seq<F0, F1> Seq(
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Seq<F0, F1> Seq(
F0 f0, F1 f1, DebugLocation whence = {}) {
return promise_detail::Seq<F0, F1>(std::move(f0), std::move(f1), whence);
}
template <typename F0, typename F1, typename F2>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Seq<F0, F1, F2> Seq(
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Seq<F0, F1, F2> Seq(
F0 f0, F1 f1, F2 f2, DebugLocation whence = {}) {
return promise_detail::Seq<F0, F1, F2>(std::move(f0), std::move(f1),
std::move(f2), whence);
}
template <typename F0, typename F1, typename F2, typename F3>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Seq<F0, F1, F2, F3> Seq(
F0 f0, F1 f1, F2 f2, F3 f3, DebugLocation whence = {}) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Seq<F0, F1, F2, F3>
Seq(F0 f0, F1 f1, F2 f2, F3 f3, DebugLocation whence = {}) {
return promise_detail::Seq<F0, F1, F2, F3>(
std::move(f0), std::move(f1), std::move(f2), std::move(f3), whence);
}
template <typename F0, typename F1, typename F2, typename F3, typename F4>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Seq<F0, F1, F2, F3, F4>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Seq<F0, F1, F2, F3,
F4>
Seq(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, DebugLocation whence = {}) {
return promise_detail::Seq<F0, F1, F2, F3, F4>(std::move(f0), std::move(f1),
std::move(f2), std::move(f3),
@ -140,7 +141,8 @@ Seq(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, DebugLocation whence = {}) {
template <typename F0, typename F1, typename F2, typename F3, typename F4,
typename F5>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::Seq<F0, F1, F2, F3, F4, F5>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::Seq<F0, F1, F2, F3,
F4, F5>
Seq(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, DebugLocation whence = {}) {
return promise_detail::Seq<F0, F1, F2, F3, F4, F5>(
std::move(f0), std::move(f1), std::move(f2), std::move(f3), std::move(f4),

@ -133,13 +133,14 @@ struct WrapInStatusOrTuple {
// If any fail, cancel the rest and return the failure.
// If all succeed, return Ok(tuple-of-results).
template <template <typename> class R, typename... Promises>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::TryJoin<R, Promises...>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::TryJoin<R,
Promises...>
TryJoin(Promises... promises) {
return promise_detail::TryJoin<R, Promises...>(std::move(promises)...);
}
template <template <typename> class R, typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto TryJoin(F promise) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto TryJoin(F promise) {
return Map(promise, promise_detail::WrapInStatusOrTuple<R>{});
}

@ -276,32 +276,34 @@ struct TrySeqIterResultTraits {
// Status to indicate only success/failure. In the case of returning Status,
// the construction functors take no arguments.
template <typename F>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION F TrySeq(F functor) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline F TrySeq(F functor) {
return functor;
}
template <typename F0, typename F1>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::TrySeq<F0, F1> TrySeq(
F0 f0, F1 f1, DebugLocation whence = {}) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::TrySeq<F0, F1>
TrySeq(F0 f0, F1 f1, DebugLocation whence = {}) {
return promise_detail::TrySeq<F0, F1>(std::move(f0), std::move(f1), whence);
}
template <typename F0, typename F1, typename F2>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::TrySeq<F0, F1, F2> TrySeq(
F0 f0, F1 f1, F2 f2, DebugLocation whence = {}) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::TrySeq<F0, F1, F2>
TrySeq(F0 f0, F1 f1, F2 f2, DebugLocation whence = {}) {
return promise_detail::TrySeq<F0, F1, F2>(std::move(f0), std::move(f1),
std::move(f2), whence);
}
template <typename F0, typename F1, typename F2, typename F3>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::TrySeq<F0, F1, F2, F3>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::TrySeq<F0, F1, F2,
F3>
TrySeq(F0 f0, F1 f1, F2 f2, F3 f3, DebugLocation whence = {}) {
return promise_detail::TrySeq<F0, F1, F2, F3>(
std::move(f0), std::move(f1), std::move(f2), std::move(f3), whence);
}
template <typename F0, typename F1, typename F2, typename F3, typename F4>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION promise_detail::TrySeq<F0, F1, F2, F3, F4>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline promise_detail::TrySeq<F0, F1, F2,
F3, F4>
TrySeq(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, DebugLocation whence = {}) {
return promise_detail::TrySeq<F0, F1, F2, F3, F4>(
std::move(f0), std::move(f1), std::move(f2), std::move(f3), std::move(f4),

@ -93,7 +93,7 @@ class ArenaContextTraits : public BaseArenaContextTraits {
};
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION void DestroyArenaContext(void* p) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void DestroyArenaContext(void* p) {
ArenaContextType<T>::Destroy(static_cast<T*>(p));
}

@ -530,6 +530,14 @@ class MemoryOwner final : public MemoryAllocator {
// Is this object valid (ie has not been moved out of or reset)
bool is_valid() const { return impl() != nullptr; }
static double memory_pressure_high_threshold() { return 0.99; }
// Return true if the controlled memory pressure is high.
bool IsMemoryPressureHigh() const {
return GetPressureInfo().pressure_control_value >
memory_pressure_high_threshold();
}
private:
const GrpcMemoryAllocatorImpl* impl() const {
return static_cast<const GrpcMemoryAllocatorImpl*>(get_internal_impl_ptr());
@ -563,11 +571,9 @@ class MemoryQuota final
// Resize the quota to new_size.
void SetSize(size_t new_size) { memory_quota_->SetSize(new_size); }
// Return true if the controlled memory pressure is high.
bool IsMemoryPressureHigh() const {
static constexpr double kMemoryPressureHighThreshold = 0.99;
return memory_quota_->GetPressureInfo().pressure_control_value >
kMemoryPressureHighThreshold;
MemoryOwner::memory_pressure_high_threshold();
}
private:

@ -29,7 +29,7 @@
#include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h"
#include "src/core/lib/security/security_connector/alts/alts_security_connector.h"
#define GRPC_ALTS_HANDSHAKER_SERVICE_URL "metadata.google.internal.:8080"
#define GRPC_ALTS_HANDSHAKER_SERVICE_URL "dns:///metadata.google.internal.:8080"
grpc_alts_credentials::grpc_alts_credentials(
const grpc_alts_credentials_options* options,

@ -166,47 +166,6 @@ std::string WaitForCqEndOp::StateString(const State& state) {
[](const Invalid&) -> std::string { return "Invalid{}"; });
}
////////////////////////////////////////////////////////////////////////
// MessageReceiver
StatusFlag MessageReceiver::FinishRecvMessage(
ValueOrFailure<absl::optional<MessageHandle>> result) {
if (!result.ok()) {
GRPC_TRACE_LOG(call, INFO) << Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received end-of-stream with error";
*recv_message_ = nullptr;
recv_message_ = nullptr;
return Failure{};
}
if (!result->has_value()) {
GRPC_TRACE_LOG(call, INFO) << Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received end-of-stream";
*recv_message_ = nullptr;
recv_message_ = nullptr;
return Success{};
}
MessageHandle& message = **result;
test_only_last_message_flags_ = message->flags();
if ((message->flags() & GRPC_WRITE_INTERNAL_COMPRESS) &&
(incoming_compression_algorithm_ != GRPC_COMPRESS_NONE)) {
*recv_message_ = grpc_raw_compressed_byte_buffer_create(
nullptr, 0, incoming_compression_algorithm_);
} else {
*recv_message_ = grpc_raw_byte_buffer_create(nullptr, 0);
}
grpc_slice_buffer_move_into(message->payload()->c_slice_buffer(),
&(*recv_message_)->data.raw.slice_buffer);
GRPC_TRACE_LOG(call, INFO)
<< Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received "
<< (*recv_message_)->data.raw.slice_buffer.length << " byte message";
recv_message_ = nullptr;
return Success{};
}
////////////////////////////////////////////////////////////////////////
// MakeErrorString

@ -422,15 +422,51 @@ class MessageReceiver {
recv_message_ = op.data.recv_message.recv_message;
return [this, puller]() mutable {
return Map(puller->PullMessage(),
[this](ValueOrFailure<absl::optional<MessageHandle>> msg) {
[this](typename Puller::NextMessage msg) {
return FinishRecvMessage(std::move(msg));
});
};
}
private:
StatusFlag FinishRecvMessage(
ValueOrFailure<absl::optional<MessageHandle>> result);
template <typename NextMessage>
StatusFlag FinishRecvMessage(NextMessage result) {
if (!result.ok()) {
GRPC_TRACE_LOG(call, INFO)
<< Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received end-of-stream with error";
*recv_message_ = nullptr;
recv_message_ = nullptr;
return Failure{};
}
if (!result.has_value()) {
GRPC_TRACE_LOG(call, INFO) << Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received end-of-stream";
*recv_message_ = nullptr;
recv_message_ = nullptr;
return Success{};
}
MessageHandle message = result.TakeValue();
test_only_last_message_flags_ = message->flags();
if ((message->flags() & GRPC_WRITE_INTERNAL_COMPRESS) &&
(incoming_compression_algorithm_ != GRPC_COMPRESS_NONE)) {
*recv_message_ = grpc_raw_compressed_byte_buffer_create(
nullptr, 0, incoming_compression_algorithm_);
} else {
*recv_message_ = grpc_raw_byte_buffer_create(nullptr, 0);
}
grpc_slice_buffer_move_into(message->payload()->c_slice_buffer(),
&(*recv_message_)->data.raw.slice_buffer);
GRPC_TRACE_LOG(call, INFO)
<< Activity::current()->DebugTag()
<< "[call] RecvMessage: outstanding_recv "
"finishes: received "
<< (*recv_message_)->data.raw.slice_buffer.length << " byte message";
recv_message_ = nullptr;
return Success{};
}
grpc_byte_buffer** recv_message_ = nullptr;
uint32_t test_only_last_message_flags_ = 0;

@ -22,6 +22,6 @@
#include <grpc/grpc.h>
#include <grpc/support/port_platform.h>
const char* grpc_version_string(void) { return "44.0.0"; }
const char* grpc_version_string(void) { return "44.1.0"; }
const char* grpc_g_stands_for(void) { return "groovy"; }

@ -24,6 +24,7 @@
#include <type_traits>
#include "absl/log/check.h"
#include "src/core/lib/promise/for_each.h"
#include "src/core/lib/promise/if.h"
#include "src/core/lib/promise/latch.h"
#include "src/core/lib/promise/map.h"
@ -121,6 +122,104 @@ struct NoInterceptor {};
namespace filters_detail {
// Flow control across pipe stages.
// This ends up being exceedingly subtle - essentially we need to ensure that
// across a series of pipes we have no more than one outstanding message at a
// time - but those pipes are for the most part independent.
// How we achieve this is that this NextMessage object holds both the message
// and a completion token - the last owning NextMessage instance will call
// the on_progress method on the referenced CallState - and at that point that
// CallState will allow the next message to be sent through it.
// Next, the ForEach promise combiner explicitly holds onto the wrapper object
// owning the result (this object) and extracts the message from it, but doesn't
// dispose that instance until the action promise for the ForEach iteration
// completes, ensuring most callers need do nothing special to have the
// flow control work correctly.
template <void (CallState::*on_progress)()>
class NextMessage {
public:
~NextMessage() {
if (message_ != end_of_stream() && message_ != error() &&
message_ != taken()) {
delete message_;
}
if (call_state_ != nullptr) {
(call_state_->*on_progress)();
}
}
NextMessage() = default;
explicit NextMessage(Failure) : message_(error()), call_state_(nullptr) {}
NextMessage(MessageHandle message, CallState* call_state) {
DCHECK_NE(call_state, nullptr);
DCHECK_NE(message.get(), nullptr);
DCHECK(message.get_deleter().has_freelist());
message_ = message.release();
call_state_ = call_state;
}
NextMessage(const NextMessage& other) = delete;
NextMessage& operator=(const NextMessage& other) = delete;
NextMessage(NextMessage&& other) noexcept
: message_(std::exchange(other.message_, taken())),
call_state_(std::exchange(other.call_state_, nullptr)) {}
NextMessage& operator=(NextMessage&& other) noexcept {
if (message_ != end_of_stream() && message_ != error() &&
message_ != taken()) {
delete message_;
}
if (call_state_ != nullptr) {
(call_state_->*on_progress)();
}
message_ = std::exchange(other.message_, taken());
call_state_ = std::exchange(other.call_state_, nullptr);
return *this;
}
bool ok() const {
DCHECK_NE(message_, taken());
return message_ != error();
}
bool has_value() const {
DCHECK_NE(message_, taken());
DCHECK(ok());
return message_ != end_of_stream();
}
StatusFlag status() const { return StatusFlag(ok()); }
Message& value() {
DCHECK_NE(message_, taken());
DCHECK(ok());
DCHECK(has_value());
return *message_;
}
MessageHandle TakeValue() {
DCHECK_NE(message_, taken());
DCHECK(ok());
DCHECK(has_value());
return MessageHandle(std::exchange(message_, taken()),
Arena::PooledDeleter());
}
bool progressed() const { return call_state_ == nullptr; }
void Progress() {
DCHECK(!progressed());
(call_state_->*on_progress)();
call_state_ = nullptr;
}
private:
static Message* end_of_stream() { return nullptr; }
static Message* error() { return reinterpret_cast<Message*>(1); }
static Message* taken() { return reinterpret_cast<Message*>(2); }
Message* message_ = end_of_stream();
CallState* call_state_ = nullptr;
};
template <typename T>
struct ArgumentMustBeNextMessage;
template <void (CallState::*on_progress)()>
struct ArgumentMustBeNextMessage<NextMessage<on_progress>> {
static constexpr bool value() { return true; }
};
inline void* Offset(void* base, size_t amt) {
return static_cast<char*>(base) + amt;
}
@ -1301,6 +1400,80 @@ const NoInterceptor ClientInitialMetadataInterceptor<Fn>::Call::OnFinalize;
} // namespace filters_detail
namespace for_each_detail {
template <void (CallState::*on_progress)()>
struct NextValueTraits<filters_detail::NextMessage<on_progress>> {
using NextMsg = filters_detail::NextMessage<on_progress>;
using Value = MessageHandle;
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static NextValueType Type(
const NextMsg& t) {
if (!t.ok()) return NextValueType::kError;
if (t.has_value()) return NextValueType::kValue;
return NextValueType::kEndOfStream;
}
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static MessageHandle TakeValue(
NextMsg& t) {
return t.TakeValue();
}
};
} // namespace for_each_detail
template <void (CallState::*on_progress)()>
struct FailureStatusCastImpl<filters_detail::NextMessage<on_progress>,
StatusFlag> {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static filters_detail::NextMessage<
on_progress>
Cast(StatusFlag flag) {
DCHECK_EQ(flag, Failure{});
return filters_detail::NextMessage<on_progress>(Failure{});
}
};
namespace promise_detail {
template <void (CallState::*on_progress)()>
struct TrySeqTraitsWithSfinae<filters_detail::NextMessage<on_progress>> {
using UnwrappedType = MessageHandle;
using WrappedType = filters_detail::NextMessage<on_progress>;
template <typename Next>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static auto CallFactory(
Next* next, WrappedType&& value) {
return next->Make(value.TakeValue());
}
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static bool IsOk(
const WrappedType& value) {
return value.ok();
}
static const char* ErrorString(const WrappedType& status) {
DCHECK(!status.ok());
return "failed";
}
template <typename R>
static R ReturnValue(WrappedType&& status) {
DCHECK(!status.ok());
return WrappedType(Failure{});
}
template <typename F, typename Elem>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static auto CallSeqFactory(
F& f, Elem&& elem, WrappedType value)
-> decltype(f(std::forward<Elem>(elem), std::declval<MessageHandle>())) {
return f(std::forward<Elem>(elem), value.TakeValue());
}
template <typename Result, typename RunNext>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION static Poll<Result>
CheckResultAndRunNext(WrappedType prior, RunNext run_next) {
if (!prior.ok()) return WrappedType(prior.status());
return run_next(std::move(prior));
}
};
} // namespace promise_detail
using ServerToClientNextMessage =
filters_detail::NextMessage<&CallState::FinishPullServerToClientMessage>;
using ClientToServerNextMessage =
filters_detail::NextMessage<&CallState::FinishPullClientToServerMessage>;
// Execution environment for a stack of filters.
// This is a per-call object.
class CallFilters {
@ -1415,10 +1588,10 @@ class CallFilters {
Input(CallFilters::*input_location),
filters_detail::Layout<Input>(filters_detail::StackData::*layout),
void (CallState::*on_done)(), typename StackIterator>
class Executor {
class MetadataExecutor {
public:
Executor(CallFilters* filters, StackIterator stack_begin,
StackIterator stack_end)
MetadataExecutor(CallFilters* filters, StackIterator stack_begin,
StackIterator stack_end)
: stack_current_(stack_begin),
stack_end_(stack_end),
filters_(filters) {
@ -1466,17 +1639,72 @@ class CallFilters {
filters_detail::OperationExecutor<Input> executor_;
};
template <MessageHandle(CallFilters::*input_location),
filters_detail::Layout<MessageHandle>(
filters_detail::StackData::*layout),
void (CallState::*on_done)(), typename StackIterator>
class MessageExecutor {
public:
using NextMsg = filters_detail::NextMessage<on_done>;
MessageExecutor(CallFilters* filters, StackIterator stack_begin,
StackIterator stack_end)
: stack_current_(stack_begin),
stack_end_(stack_end),
filters_(filters) {
DCHECK_NE((filters_->*input_location).get(), nullptr);
}
Poll<NextMsg> operator()() {
if ((filters_->*input_location) != nullptr) {
if (stack_current_ == stack_end_) {
DCHECK_NE((filters_->*input_location).get(), nullptr);
return NextMsg(std::move(filters_->*input_location),
&filters_->call_state_);
}
return FinishStep(executor_.Start(
&(stack_current_->stack->data_.*layout),
std::move(filters_->*input_location), filters_->call_data_));
} else {
return FinishStep(executor_.Step(filters_->call_data_));
}
}
private:
Poll<NextMsg> FinishStep(Poll<filters_detail::ResultOr<MessageHandle>> p) {
auto* r = p.value_if_ready();
if (r == nullptr) return Pending{};
if (r->ok != nullptr) {
++stack_current_;
if (stack_current_ == stack_end_) {
return NextMsg{std::move(r->ok), &filters_->call_state_};
}
return FinishStep(
executor_.Start(&(stack_current_->stack->data_.*layout),
std::move(r->ok), filters_->call_data_));
}
(filters_->call_state_.*on_done)();
filters_->PushServerTrailingMetadata(std::move(r->error));
return Failure{};
}
StackIterator stack_current_;
StackIterator stack_end_;
CallFilters* filters_;
filters_detail::OperationExecutor<MessageHandle> executor_;
};
public:
// Client: Fetch client initial metadata
// Returns a promise that resolves to ValueOrFailure<ClientMetadataHandle>
GRPC_MUST_USE_RESULT auto PullClientInitialMetadata() {
call_state_.BeginPullClientInitialMetadata();
return Executor<ClientMetadataHandle, ClientMetadataHandle,
&CallFilters::push_client_initial_metadata_,
&filters_detail::StackData::client_initial_metadata,
&CallState::FinishPullClientInitialMetadata,
StacksVector::const_iterator>(this, stacks_.cbegin(),
stacks_.cend());
return MetadataExecutor<ClientMetadataHandle, ClientMetadataHandle,
&CallFilters::push_client_initial_metadata_,
&filters_detail::StackData::client_initial_metadata,
&CallState::FinishPullClientInitialMetadata,
StacksVector::const_iterator>(
this, stacks_.cbegin(), stacks_.cend());
}
// Server: Push server initial metadata
// Returns a promise that resolves to a StatusFlag indicating success
@ -1496,7 +1724,7 @@ class CallFilters {
has_server_initial_metadata,
[this]() {
return Map(
Executor<
MetadataExecutor<
absl::optional<ServerMetadataHandle>,
ServerMetadataHandle,
&CallFilters::push_server_initial_metadata_,
@ -1526,7 +1754,7 @@ class CallFilters {
// Client: Indicate that no more messages will be sent
void FinishClientToServerSends() { call_state_.ClientToServerHalfClose(); }
// Server: Fetch client to server message
// Returns a promise that resolves to ValueOrFailure<MessageHandle>
// Returns a promise that resolves to ClientToServerNextMessage
GRPC_MUST_USE_RESULT auto PullClientToServerMessage() {
return TrySeq(
[this]() {
@ -1536,16 +1764,15 @@ class CallFilters {
return If(
message_available,
[this]() {
return Executor<
absl::optional<MessageHandle>, MessageHandle,
return MessageExecutor<
&CallFilters::push_client_to_server_message_,
&filters_detail::StackData::client_to_server_messages,
&CallState::FinishPullClientToServerMessage,
StacksVector::const_iterator>(this, stacks_.cbegin(),
stacks_.cend());
},
[]() -> ValueOrFailure<absl::optional<MessageHandle>> {
return absl::optional<MessageHandle>();
[]() -> ClientToServerNextMessage {
return ClientToServerNextMessage();
});
});
}
@ -1557,7 +1784,7 @@ class CallFilters {
return [this]() { return call_state_.PollPushServerToClientMessage(); };
}
// Server: Fetch server to client message
// Returns a promise that resolves to ValueOrFailure<MessageHandle>
// Returns a promise that resolves to ServerToClientNextMessage
GRPC_MUST_USE_RESULT auto PullServerToClientMessage() {
return TrySeq(
[this]() {
@ -1567,16 +1794,15 @@ class CallFilters {
return If(
message_available,
[this]() {
return Executor<
absl::optional<MessageHandle>, MessageHandle,
return MessageExecutor<
&CallFilters::push_server_to_client_message_,
&filters_detail::StackData::server_to_client_messages,
&CallState::FinishPullServerToClientMessage,
StacksVector::const_reverse_iterator>(
this, stacks_.crbegin(), stacks_.crend());
},
[]() -> ValueOrFailure<absl::optional<MessageHandle>> {
return absl::optional<MessageHandle>();
[]() -> ServerToClientNextMessage {
return ServerToClientNextMessage();
});
});
}
@ -1654,6 +1880,20 @@ class CallFilters {
static char g_empty_call_data_;
};
static_assert(
filters_detail::ArgumentMustBeNextMessage<
absl::remove_cvref_t<decltype(std::declval<CallFilters*>()
->PullServerToClientMessage()()
.value())>>::value(),
"PullServerToClientMessage must return a NextMessage");
static_assert(
filters_detail::ArgumentMustBeNextMessage<
absl::remove_cvref_t<decltype(std::declval<CallFilters*>()
->PullClientToServerMessage()()
.value())>>::value(),
"PullServerToClientMessage must return a NextMessage");
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H

@ -205,6 +205,8 @@ class CallSpine final : public Party {
class CallInitiator {
public:
using NextMessage = ServerToClientNextMessage;
CallInitiator() = default;
explicit CallInitiator(RefCountedPtr<CallSpine> spine)
: spine_(std::move(spine)) {}
@ -275,6 +277,8 @@ class CallInitiator {
class CallHandler {
public:
using NextMessage = ClientToServerNextMessage;
explicit CallHandler(RefCountedPtr<CallSpine> spine)
: spine_(std::move(spine)) {}

@ -831,14 +831,24 @@ auto Server::MatchAndPublishCall(CallHandler call_handler) {
payload_handling = registered_method->payload_handling;
rm = registered_method->matcher.get();
}
using FirstMessageResult =
ValueOrFailure<absl::optional<MessageHandle>>;
auto maybe_read_first_message = If(
payload_handling == GRPC_SRM_PAYLOAD_READ_INITIAL_BYTE_BUFFER,
[call_handler]() mutable {
return call_handler.PullMessage();
return Map(
call_handler.PullMessage(),
[](ClientToServerNextMessage next_msg)
-> FirstMessageResult {
if (!next_msg.ok()) return Failure{};
if (!next_msg.has_value()) {
return FirstMessageResult(absl::nullopt);
}
return FirstMessageResult(next_msg.TakeValue());
});
},
[]() -> ValueOrFailure<absl::optional<MessageHandle>> {
return ValueOrFailure<absl::optional<MessageHandle>>(
absl::nullopt);
[]() -> FirstMessageResult {
return FirstMessageResult(absl::nullopt);
});
return TryJoin<absl::StatusOr>(
std::move(maybe_read_first_message), rm->MatchRequest(0),

@ -129,6 +129,7 @@ const absl::string_view
"insecure_connections_created",
"rq_connections_dropped",
"rq_calls_dropped",
"rq_calls_rejected",
"syscall_write",
"syscall_read",
"tcp_read_alloc_8k",
@ -168,6 +169,7 @@ const absl::string_view GlobalStats::counter_doc[static_cast<int>(
"Number of insecure connections created",
"Number of connections dropped due to resource quota exceeded",
"Number of calls dropped due to resource quota exceeded",
"Number of calls rejected (never started) due to resource quota exceeded",
"Number of write syscalls (or equivalent - eg sendmsg) made by this "
"process",
"Number of read syscalls (or equivalent - eg recvmsg) made by this process",
@ -469,6 +471,7 @@ GlobalStats::GlobalStats()
insecure_connections_created{0},
rq_connections_dropped{0},
rq_calls_dropped{0},
rq_calls_rejected{0},
syscall_write{0},
syscall_read{0},
tcp_read_alloc_8k{0},
@ -610,6 +613,8 @@ std::unique_ptr<GlobalStats> GlobalStatsCollector::Collect() const {
data.rq_connections_dropped.load(std::memory_order_relaxed);
result->rq_calls_dropped +=
data.rq_calls_dropped.load(std::memory_order_relaxed);
result->rq_calls_rejected +=
data.rq_calls_rejected.load(std::memory_order_relaxed);
result->syscall_write += data.syscall_write.load(std::memory_order_relaxed);
result->syscall_read += data.syscall_read.load(std::memory_order_relaxed);
result->tcp_read_alloc_8k +=
@ -728,6 +733,7 @@ std::unique_ptr<GlobalStats> GlobalStats::Diff(const GlobalStats& other) const {
result->rq_connections_dropped =
rq_connections_dropped - other.rq_connections_dropped;
result->rq_calls_dropped = rq_calls_dropped - other.rq_calls_dropped;
result->rq_calls_rejected = rq_calls_rejected - other.rq_calls_rejected;
result->syscall_write = syscall_write - other.syscall_write;
result->syscall_read = syscall_read - other.syscall_read;
result->tcp_read_alloc_8k = tcp_read_alloc_8k - other.tcp_read_alloc_8k;

@ -206,6 +206,7 @@ struct GlobalStats {
kInsecureConnectionsCreated,
kRqConnectionsDropped,
kRqCallsDropped,
kRqCallsRejected,
kSyscallWrite,
kSyscallRead,
kTcpReadAlloc8k,
@ -285,6 +286,7 @@ struct GlobalStats {
uint64_t insecure_connections_created;
uint64_t rq_connections_dropped;
uint64_t rq_calls_dropped;
uint64_t rq_calls_rejected;
uint64_t syscall_write;
uint64_t syscall_read;
uint64_t tcp_read_alloc_8k;
@ -382,6 +384,9 @@ class GlobalStatsCollector {
void IncrementRqCallsDropped() {
data_.this_cpu().rq_calls_dropped.fetch_add(1, std::memory_order_relaxed);
}
void IncrementRqCallsRejected() {
data_.this_cpu().rq_calls_rejected.fetch_add(1, std::memory_order_relaxed);
}
void IncrementSyscallWrite() {
data_.this_cpu().syscall_write.fetch_add(1, std::memory_order_relaxed);
}
@ -573,6 +578,7 @@ class GlobalStatsCollector {
std::atomic<uint64_t> insecure_connections_created{0};
std::atomic<uint64_t> rq_connections_dropped{0};
std::atomic<uint64_t> rq_calls_dropped{0};
std::atomic<uint64_t> rq_calls_rejected{0};
std::atomic<uint64_t> syscall_write{0};
std::atomic<uint64_t> syscall_read{0};
std::atomic<uint64_t> tcp_read_alloc_8k{0};

@ -37,6 +37,8 @@
doc: Number of connections dropped due to resource quota exceeded
- counter: rq_calls_dropped
doc: Number of calls dropped due to resource quota exceeded
- counter: rq_calls_rejected
doc: Number of calls rejected (never started) due to resource quota exceeded
# tcp
- counter: syscall_write
doc: Number of write syscalls (or equivalent - eg sendmsg) made by this process

@ -233,7 +233,7 @@ void alts_handshaker_client_handle_response(alts_handshaker_client* c,
return;
}
if (recv_buffer == nullptr) {
LOG(ERROR)
VLOG(2)
<< "recv_buffer is nullptr in alts_tsi_handshaker_handle_response()";
handle_response_done(
client, TSI_INTERNAL_ERROR,
@ -929,11 +929,11 @@ void alts_handshaker_client_destroy(alts_handshaker_client* c) {
}
size_t MaxNumberOfConcurrentHandshakes() {
size_t max_concurrent_handshakes = 40;
size_t max_concurrent_handshakes = 100;
absl::optional<std::string> env_var_max_concurrent_handshakes =
grpc_core::GetEnv(kMaxConcurrentStreamsEnvironmentVariable);
if (env_var_max_concurrent_handshakes.has_value()) {
size_t effective_max_concurrent_handshakes = 40;
size_t effective_max_concurrent_handshakes = 100;
if (absl::SimpleAtoi(*env_var_max_concurrent_handshakes,
&effective_max_concurrent_handshakes)) {
max_concurrent_handshakes = effective_max_concurrent_handshakes;

@ -482,7 +482,7 @@ static tsi_result alts_tsi_handshaker_continue_handshaker_next(
struct alts_tsi_handshaker_continue_handshaker_next_args {
alts_tsi_handshaker* handshaker;
std::unique_ptr<unsigned char> received_bytes;
unsigned char* received_bytes;
size_t received_bytes_size;
tsi_handshaker_on_next_done_cb cb;
void* user_data;
@ -507,13 +507,13 @@ static void alts_tsi_handshaker_create_channel(
grpc_channel_credentials_release(creds);
tsi_result continue_next_result =
alts_tsi_handshaker_continue_handshaker_next(
handshaker, next_args->received_bytes.get(),
next_args->received_bytes_size, next_args->cb, next_args->user_data,
next_args->error);
handshaker, next_args->received_bytes, next_args->received_bytes_size,
next_args->cb, next_args->user_data, next_args->error);
if (continue_next_result != TSI_OK) {
next_args->cb(continue_next_result, next_args->user_data, nullptr, 0,
nullptr);
}
gpr_free(next_args->received_bytes);
delete next_args;
}
@ -537,6 +537,10 @@ static tsi_result handshaker_next(
return TSI_HANDSHAKE_SHUTDOWN;
}
}
if (!handshaker->is_client && received_bytes_size == 0) {
return TSI_INCOMPLETE_DATA;
}
if (handshaker->channel == nullptr && !handshaker->use_dedicated_cq) {
alts_tsi_handshaker_continue_handshaker_next_args* args =
new alts_tsi_handshaker_continue_handshaker_next_args();
@ -545,9 +549,9 @@ static tsi_result handshaker_next(
args->received_bytes_size = received_bytes_size;
args->error = error;
if (received_bytes_size > 0) {
args->received_bytes = std::unique_ptr<unsigned char>(
static_cast<unsigned char*>(gpr_zalloc(received_bytes_size)));
memcpy(args->received_bytes.get(), received_bytes, received_bytes_size);
args->received_bytes =
static_cast<unsigned char*>(gpr_zalloc(received_bytes_size));
memcpy(args->received_bytes, received_bytes, received_bytes_size);
}
args->cb = cb;
args->user_data = user_data;

@ -24,14 +24,15 @@ namespace grpc_core {
// Call the destructor of p without having to name the type of p.
template <typename T>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION void Destruct(T* p) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Destruct(T* p) {
p->~T();
}
// Call the constructor of p without having to name the type of p and forward
// any arguments
template <typename T, typename... Args>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION void Construct(T* p, Args&&... args) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Construct(T* p,
Args&&... args) {
new (p) T(std::forward<Args>(args)...);
}

@ -25,7 +25,7 @@
namespace grpc_core {
template <typename To, typename From>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To DownCast(From* f) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline To DownCast(From* f) {
static_assert(
std::is_base_of<From, typename std::remove_pointer<To>::type>::value,
"DownCast requires a base-to-derived relationship");
@ -39,7 +39,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To DownCast(From* f) {
}
template <typename To, typename From>
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To DownCast(From& f) {
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline To DownCast(From& f) {
return *DownCast<typename std::remove_reference<To>::type*>(&f);
}

@ -25,7 +25,7 @@
#include "absl/strings/string_view.h"
#if defined(GPR_LINUX) || defined(GPR_ANDROID) || defined(GPR_FREEBSD) || \
defined(GPR_APPLE)
defined(GPR_APPLE) || defined(GPR_NETBSD)
#include <dirent.h>

@ -102,9 +102,9 @@ Pod::Spec.new do |s|
# Restrict the protoc version to the one supported by this plugin.
s.dependency '!ProtoCompiler', '3.28.1'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -104,9 +104,9 @@ Pod::Spec.new do |s|
# Restrict the protoc version to the one supported by this plugin.
s.dependency '!ProtoCompiler', '3.28.1'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -110,9 +110,9 @@ Pod::Spec.new do |s|
# Restrict the protobuf runtime version to the one supported by this version of protoc.
s.dependency 'Protobuf', '~> 3.0'
# For the Protobuf dependency not to complain:
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -79,9 +79,9 @@ Pod::Spec.new do |s|
:commit => "b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6",
}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -69,7 +69,7 @@ Pod::Spec.new do |s|
}
s.vendored_framework = "Cronet.framework"
s.author = "The Chromium Authors"
s.ios.deployment_target = '10.0'
s.ios.deployment_target = '11.0'
s.source = { :http => "https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework-v#{v}.zip"}
s.preserve_paths = "Cronet.framework"
s.public_header_files = "Cronet.framework/Headers/**/*{.h}"

@ -43,9 +43,9 @@ Pod::Spec.new do |s|
s.summary = '...'
s.source = { :git => 'https://github.com/...' }
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = '1.0'

@ -77,7 +77,7 @@ ios_application(
"ipad",
],
infoplists = ["Sample/Sample/Info.plist"],
minimum_os_version = "9.0",
minimum_os_version = "11.0",
visibility = ["//visibility:public"],
deps = ["Sample-lib"],
)
@ -100,7 +100,7 @@ ios_application(
"ipad",
],
infoplists = ["InterceptorSample/InterceptorSample/Info.plist"],
minimum_os_version = "9.0", # Safe Area Layout Guide used
minimum_os_version = "11.0", # Safe Area Layout Guide used
deps = ["InterceptorSample-lib"],
)
@ -119,7 +119,7 @@ tvos_application(
name = "tvOS-sample",
bundle_id = "io.grpc.tvOS-sample",
infoplists = ["tvOS-sample/tvOS-sample/Info.plist"],
minimum_os_version = "10.0",
minimum_os_version = "13.0",
deps = [":tvOS-sample-lib"],
)
@ -148,7 +148,7 @@ ios_application(
bundle_id = "io.grpc.watchOS-sample",
families = ["iphone"],
infoplists = ["watchOS-sample/watchOS-sample/Info.plist"],
minimum_os_version = "9.0", # Safe Area Layout Guide used
minimum_os_version = "11.0", # Safe Area Layout Guide used
watch_application = "watchOS-sample-watchApp",
deps = [":watchOS-sample-iOS-lib"],
)

@ -294,7 +294,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -347,7 +347,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;

@ -1,4 +1,4 @@
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -7,9 +7,9 @@ Pod::Spec.new do |s|
s.summary = 'RemoteTest example'
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -275,7 +275,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -311,7 +311,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -288,7 +288,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -328,7 +328,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 2.3;

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
# Without this we get linker errors due to files with same names but different paths
# ref: https://github.com/CocoaPods/CocoaPods/issues/8289#issuecomment-1022723820

@ -1,4 +1,4 @@
platform :tvos, '12.0'
platform :tvos, '13.0'
install! 'cocoapods', :deterministic_uuids => false

@ -300,7 +300,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = appletvos;
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 13.0;
};
name = Debug;
};
@ -347,7 +347,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = appletvos;
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 13.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -367,7 +367,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 13.0;
};
name = Debug;
};

@ -14,7 +14,7 @@ def grpc_deps
end
target 'watchOS-sample' do
platform :ios, '10.0'
platform :ios, '11.0'
grpc_deps
end

@ -582,7 +582,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -631,7 +631,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

@ -65,7 +65,7 @@ def grpc_objc_ios_unit_test(
ios_unit_test(
name = name,
minimum_os_version = "9.0",
minimum_os_version = "11.0",
runner = test_runner,
deps = deps,
)

@ -331,7 +331,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -383,7 +383,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
@ -399,7 +399,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = EQHXZ8M8AV;
INFOPLIST_FILE = Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -419,7 +419,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = EQHXZ8M8AV;
INFOPLIST_FILE = Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

@ -85,7 +85,7 @@ tvos_application(
name = "tvos-host",
bundle_id = "grpc.objc.tests.tvos-host",
infoplists = ["Hosts/ios-host/Info.plist"],
minimum_os_version = "10.0",
minimum_os_version = "13.0",
deps = ["host-lib"],
)
@ -306,7 +306,7 @@ grpc_objc_ios_unit_test(
macos_unit_test(
name = "MacTests",
minimum_os_version = "10.10",
minimum_os_version = "10.14",
deps = [
":APIv2Tests-lib",
":InteropTestsLocalCleartext-lib",
@ -368,7 +368,7 @@ grpc_objc_ios_unit_test(
# See https://github.com/bazelbuild/rules_apple/blob/8d841342c238457896cd7596cc29b2d06c9a75f0/apple/testing/default_runner/tvos_test_runner.template.sh
tvos_unit_test(
name = "TvTests",
minimum_os_version = "10.0",
minimum_os_version = "13.0",
test_host = ":tvos-host",
deps = [
":APIv2Tests-lib",

@ -7,9 +7,9 @@ Pod::Spec.new do |s|
s.summary = "Shared common test utils"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.framework = 'XCTest'

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save