diff --git a/BUILD b/BUILD
index 7fcd4a55f5d..8be2c685cd8 100644
--- a/BUILD
+++ b/BUILD
@@ -551,7 +551,6 @@ grpc_cc_library(
"src/core/lib/gprpp/global_config_generic.h",
"src/core/lib/gprpp/host_port.h",
"src/core/lib/gprpp/manual_constructor.h",
- "src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/string_view.h",
@@ -618,40 +617,12 @@ grpc_cc_library(
],
)
-grpc_cc_library(
- name = "inlined_vector",
- external_deps = [
- "absl/container:inlined_vector",
- ],
- language = "c++",
- public_hdrs = [
- "src/core/lib/gprpp/inlined_vector.h",
- ],
- deps = [
- "gpr_base",
- ],
-)
-
grpc_cc_library(
name = "debug_location",
language = "c++",
public_hdrs = ["src/core/lib/gprpp/debug_location.h"],
)
-grpc_cc_library(
- name = "optional",
- external_deps = [
- "absl/types:optional",
- ],
- language = "c++",
- public_hdrs = [
- "src/core/lib/gprpp/optional.h",
- ],
- deps = [
- "gpr_base",
- ],
-)
-
grpc_cc_library(
name = "orphanable",
language = "c++",
@@ -990,6 +961,8 @@ grpc_cc_library(
],
external_deps = [
"madler_zlib",
+ "absl/container:inlined_vector",
+ "absl/types:optional",
],
language = "c++",
public_hdrs = GRPC_PUBLIC_HDRS,
@@ -998,8 +971,6 @@ grpc_cc_library(
"gpr_base",
"grpc_codegen",
"grpc_trace",
- "inlined_vector",
- "optional",
"orphanable",
"ref_counted",
"ref_counted_ptr",
@@ -1107,6 +1078,9 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/subchannel_interface.h",
"src/core/ext/filters/client_channel/subchannel_pool_interface.h",
],
+ external_deps = [
+ "absl/container:inlined_vector",
+ ],
language = "c++",
deps = [
"gpr_base",
@@ -1114,7 +1088,6 @@ grpc_cc_library(
"grpc_client_authority_filter",
"grpc_deadline_filter",
"grpc_health_upb",
- "inlined_vector",
"orphanable",
"ref_counted",
"ref_counted_ptr",
diff --git a/BUILD.gn b/BUILD.gn
index 6c3db9ac4b7..40dfa4bf46c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -156,7 +156,6 @@ config("grpc_config") {
"src/core/lib/gprpp/host_port.cc",
"src/core/lib/gprpp/host_port.h",
"src/core/lib/gprpp/manual_constructor.h",
- "src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/mpscq.h",
@@ -570,8 +569,6 @@ config("grpc_config") {
"src/core/lib/debug/trace.h",
"src/core/lib/gprpp/atomic.h",
"src/core/lib/gprpp/debug_location.h",
- "src/core/lib/gprpp/inlined_vector.h",
- "src/core/lib/gprpp/optional.h",
"src/core/lib/gprpp/orphanable.h",
"src/core/lib/gprpp/ref_counted.h",
"src/core/lib/gprpp/ref_counted_ptr.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17ed31d4910..a82784d07db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -756,7 +756,6 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx mock_test)
add_dependencies(buildtests_cxx nonblocking_test)
add_dependencies(buildtests_cxx noop-benchmark)
- add_dependencies(buildtests_cxx optional_test)
add_dependencies(buildtests_cxx orphanable_test)
add_dependencies(buildtests_cxx out_of_bounds_bad_client_test)
add_dependencies(buildtests_cxx pid_controller_test)
@@ -12166,44 +12165,6 @@ target_link_libraries(noop-benchmark
)
-endif()
-if(gRPC_BUILD_TESTS)
-
-add_executable(optional_test
- test/core/gprpp/optional_test.cc
- third_party/googletest/googletest/src/gtest-all.cc
- third_party/googletest/googlemock/src/gmock-all.cc
-)
-
-target_include_directories(optional_test
- PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
- ${_gRPC_SSL_INCLUDE_DIR}
- ${_gRPC_UPB_GENERATED_DIR}
- ${_gRPC_UPB_GRPC_GENERATED_DIR}
- ${_gRPC_UPB_INCLUDE_DIR}
- ${_gRPC_ZLIB_INCLUDE_DIR}
- third_party/googletest/googletest/include
- third_party/googletest/googletest
- third_party/googletest/googlemock/include
- third_party/googletest/googlemock
- ${_gRPC_PROTO_GENS_DIR}
-)
-
-target_link_libraries(optional_test
- ${_gRPC_PROTOBUF_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc
- gpr
- address_sorting
- upb
- ${_gRPC_GFLAGS_LIBRARIES}
-)
-
-
endif()
if(gRPC_BUILD_TESTS)
diff --git a/Makefile b/Makefile
index 883745259c5..1ccc7e99fd5 100644
--- a/Makefile
+++ b/Makefile
@@ -1251,7 +1251,6 @@ nanopb_fuzzer_response_test: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test
nanopb_fuzzer_serverlist_test: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test
nonblocking_test: $(BINDIR)/$(CONFIG)/nonblocking_test
noop-benchmark: $(BINDIR)/$(CONFIG)/noop-benchmark
-optional_test: $(BINDIR)/$(CONFIG)/optional_test
orphanable_test: $(BINDIR)/$(CONFIG)/orphanable_test
out_of_bounds_bad_client_test: $(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test
percent_decode_fuzzer: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer
@@ -1616,7 +1615,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/mock_test \
$(BINDIR)/$(CONFIG)/nonblocking_test \
$(BINDIR)/$(CONFIG)/noop-benchmark \
- $(BINDIR)/$(CONFIG)/optional_test \
$(BINDIR)/$(CONFIG)/orphanable_test \
$(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test \
$(BINDIR)/$(CONFIG)/pid_controller_test \
@@ -1774,7 +1772,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/mock_test \
$(BINDIR)/$(CONFIG)/nonblocking_test \
$(BINDIR)/$(CONFIG)/noop-benchmark \
- $(BINDIR)/$(CONFIG)/optional_test \
$(BINDIR)/$(CONFIG)/orphanable_test \
$(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test \
$(BINDIR)/$(CONFIG)/pid_controller_test \
@@ -2276,8 +2273,6 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/nonblocking_test || ( echo test nonblocking_test failed ; exit 1 )
$(E) "[RUN] Testing noop-benchmark"
$(Q) $(BINDIR)/$(CONFIG)/noop-benchmark || ( echo test noop-benchmark failed ; exit 1 )
- $(E) "[RUN] Testing optional_test"
- $(Q) $(BINDIR)/$(CONFIG)/optional_test || ( echo test optional_test failed ; exit 1 )
$(E) "[RUN] Testing orphanable_test"
$(Q) $(BINDIR)/$(CONFIG)/orphanable_test || ( echo test orphanable_test failed ; exit 1 )
$(E) "[RUN] Testing out_of_bounds_bad_client_test"
@@ -16213,49 +16208,6 @@ endif
endif
-OPTIONAL_TEST_SRC = \
- test/core/gprpp/optional_test.cc \
-
-OPTIONAL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(OPTIONAL_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/optional_test: openssl_dep_error
-
-else
-
-
-
-
-ifeq ($(NO_PROTOBUF),true)
-
-# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+.
-
-$(BINDIR)/$(CONFIG)/optional_test: protobuf_dep_error
-
-else
-
-$(BINDIR)/$(CONFIG)/optional_test: $(PROTOBUF_DEP) $(OPTIONAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(OPTIONAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/optional_test
-
-endif
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/gprpp/optional_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
-
-deps_optional_test: $(OPTIONAL_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(OPTIONAL_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
ORPHANABLE_TEST_SRC = \
test/core/gprpp/orphanable_test.cc \
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index ca226638154..560904729ad 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -299,7 +299,6 @@ libs:
- src/core/lib/gprpp/global_config_generic.h
- src/core/lib/gprpp/host_port.h
- src/core/lib/gprpp/manual_constructor.h
- - src/core/lib/gprpp/map.h
- src/core/lib/gprpp/memory.h
- src/core/lib/gprpp/mpscq.h
- src/core/lib/gprpp/string_view.h
@@ -548,8 +547,6 @@ libs:
- src/core/lib/debug/trace.h
- src/core/lib/gprpp/atomic.h
- src/core/lib/gprpp/debug_location.h
- - src/core/lib/gprpp/inlined_vector.h
- - src/core/lib/gprpp/optional.h
- src/core/lib/gprpp/orphanable.h
- src/core/lib/gprpp/ref_counted.h
- src/core/lib/gprpp/ref_counted_ptr.h
@@ -1451,8 +1448,6 @@ libs:
- src/core/lib/debug/trace.h
- src/core/lib/gprpp/atomic.h
- src/core/lib/gprpp/debug_location.h
- - src/core/lib/gprpp/inlined_vector.h
- - src/core/lib/gprpp/optional.h
- src/core/lib/gprpp/orphanable.h
- src/core/lib/gprpp/ref_counted.h
- src/core/lib/gprpp/ref_counted_ptr.h
@@ -6538,19 +6533,6 @@ targets:
- benchmark
benchmark: true
defaults: benchmark
-- name: optional_test
- gtest: true
- build: test
- language: c++
- headers: []
- src:
- - test/core/gprpp/optional_test.cc
- deps:
- - grpc_test_util
- - grpc
- - gpr
- - address_sorting
- - upb
- name: orphanable_test
gtest: true
build: test
diff --git a/doc/python/sphinx/conf.py b/doc/python/sphinx/conf.py
index 49e5ecb1dcd..6e4bfab7d0e 100644
--- a/doc/python/sphinx/conf.py
+++ b/doc/python/sphinx/conf.py
@@ -28,13 +28,17 @@ sys.path.insert(0, os.path.join(PYTHON_FOLDER, 'grpcio_testing'))
# -- Project information -----------------------------------------------------
project = 'gRPC Python'
-copyright = '2018, The gRPC Authors'
+copyright = '2020, The gRPC Authors'
author = 'The gRPC Authors'
# Import generated grpc_version after the path been modified
import grpc_version
-version = ".".join(grpc_version.VERSION.split(".")[:3])
+version = '.'.join(grpc_version.VERSION.split('.')[:3])
release = grpc_version.VERSION
+if 'dev' in grpc_version.VERSION:
+ branch = 'master'
+else:
+ branch = 'v%s.%s.x' % tuple(grpc_version.VERSION.split('.')[:2])
# -- General configuration ---------------------------------------------------
@@ -100,3 +104,7 @@ epub_exclude_files = ['search.html']
# -- Options for todo extension ----------------------------------------------
todo_include_todos = True
+
+# -- Options for substitutions -----------------------------------------------
+
+rst_epilog = '.. |grpc_types_link| replace:: https://github.com/grpc/grpc/blob/%s/include/grpc/impl/codegen/grpc_types.h' % branch
diff --git a/doc/python/sphinx/glossary.rst b/doc/python/sphinx/glossary.rst
index cae5f4a32e3..a4daa31d180 100644
--- a/doc/python/sphinx/glossary.rst
+++ b/doc/python/sphinx/glossary.rst
@@ -27,3 +27,24 @@ Glossary
the returned object doesn't have restrictions (i.e. ``None`` allowed). The
deserializer is invoked with inbound message bytes on both the server side
and the client-side.
+
+ wait_for_ready
+ If an RPC is issued but the channel is in the TRANSIENT_FAILURE or SHUTDOWN
+ states, the library cannot transmit the RPC at the moment. By default, the
+ gRPC library will fail such RPCs immediately. This is known as "fail fast."
+ RPCs will not fail as a result of the channel being in other states
+ (CONNECTING, READY, or IDLE).
+
+ When the wait_for_ready option is specified, the library will queue RPCs
+ until the channel is READY. Any submitted RPCs may still fail before the
+ READY state is reached for other reasons, e.g., the client channel has been
+ shut down or the RPC's deadline has been reached.
+
+ channel_arguments
+ A list of key-value pairs to configure the underlying gRPC Core channel or
+ server object. Channel arguments are meant for advanced usages and contain
+ experimental API (some may not labeled as experimental). Full list of
+ available channel arguments and documentation can be found under the
+ "grpc_arg_keys" section of "grpc_types.h" header file (|grpc_types_link|).
+ For example, if you want to disable TCP port reuse, you may construct
+ channel arguments like: ``options = (('grpc.so_reuseport', 0),)``.
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 612090f465c..b94955f47a4 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -418,12 +418,9 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
- 'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
@@ -870,12 +867,9 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
- 'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index b2595ac1ce4..d04fa0aaabc 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -610,13 +610,10 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
- 'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
@@ -1226,12 +1223,9 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
- 'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index c6faf7095f6..e2f6580651e 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -532,13 +532,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/global_config_generic.h )
s.files += %w( src/core/lib/gprpp/host_port.cc )
s.files += %w( src/core/lib/gprpp/host_port.h )
- s.files += %w( src/core/lib/gprpp/inlined_vector.h )
s.files += %w( src/core/lib/gprpp/manual_constructor.h )
- s.files += %w( src/core/lib/gprpp/map.h )
s.files += %w( src/core/lib/gprpp/memory.h )
s.files += %w( src/core/lib/gprpp/mpscq.cc )
s.files += %w( src/core/lib/gprpp/mpscq.h )
- s.files += %w( src/core/lib/gprpp/optional.h )
s.files += %w( src/core/lib/gprpp/orphanable.h )
s.files += %w( src/core/lib/gprpp/ref_counted.h )
s.files += %w( src/core/lib/gprpp/ref_counted_ptr.h )
diff --git a/package.xml b/package.xml
index adc859441ee..c5294e90da6 100644
--- a/package.xml
+++ b/package.xml
@@ -512,13 +512,10 @@
-
-
-
diff --git a/src/core/ext/filters/client_channel/backend_metric.cc b/src/core/ext/filters/client_channel/backend_metric.cc
index b36614f5b80..dbc296a39d4 100644
--- a/src/core/ext/filters/client_channel/backend_metric.cc
+++ b/src/core/ext/filters/client_channel/backend_metric.cc
@@ -26,12 +26,12 @@ namespace grpc_core {
namespace {
template
-std::map ParseMap(
+std::map ParseMap(
udpa_data_orca_v1_OrcaLoadReport* msg,
EntryType** (*entry_func)(udpa_data_orca_v1_OrcaLoadReport*, size_t*),
upb_strview (*key_func)(const EntryType*),
double (*value_func)(const EntryType*), Arena* arena) {
- std::map result;
+ std::map result;
size_t size;
const auto* const* entries = entry_func(msg, &size);
for (size_t i = 0; i < size; ++i) {
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index aea8e00a501..97fc16822ef 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -26,6 +26,7 @@
#include
#include
+#include