diff --git a/doc/python/sphinx/glossary.rst b/doc/python/sphinx/glossary.rst index cae5f4a32e3..fb44bdf114d 100644 --- a/doc/python/sphinx/glossary.rst +++ b/doc/python/sphinx/glossary.rst @@ -27,3 +27,15 @@ 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. diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index ff799cd07e9..75b1a923f67 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -414,8 +414,8 @@ class ClientCallDetails(six.with_metaclass(abc.ABCMeta)): metadata: Optional :term:`metadata` to be transmitted to the service-side of the RPC. credentials: An optional CallCredentials for the RPC. - wait_for_ready: This is an EXPERIMENTAL argument. An optional flag t - enable wait for ready mechanism. + wait_for_ready: This is an EXPERIMENTAL argument. An optional + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. """ @@ -690,7 +690,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -723,7 +723,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -756,7 +756,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -792,7 +792,7 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -828,7 +828,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -862,7 +862,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -895,7 +895,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -931,7 +931,7 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. diff --git a/src/python/grpcio/grpc/experimental/aio/_base_channel.py b/src/python/grpcio/grpc/experimental/aio/_base_channel.py index b6c946a4367..33efa7789cb 100644 --- a/src/python/grpcio/grpc/experimental/aio/_base_channel.py +++ b/src/python/grpcio/grpc/experimental/aio/_base_channel.py @@ -49,7 +49,7 @@ class UnaryUnaryMultiCallable(abc.ABC): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -87,7 +87,7 @@ class UnaryStreamMultiCallable(abc.ABC): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -125,7 +125,7 @@ class StreamUnaryMultiCallable(abc.ABC): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. @@ -163,7 +163,7 @@ class StreamStreamMultiCallable(abc.ABC): credentials: An optional CallCredentials for the RPC. Only valid for secure Channel. wait_for_ready: This is an EXPERIMENTAL argument. An optional - flag to enable wait for ready mechanism + flag to enable :term:`wait_for_ready` mechanism. compression: An element of grpc.compression, e.g. grpc.compression.Gzip. This is an EXPERIMENTAL option. diff --git a/src/python/grpcio/grpc/experimental/aio/_interceptor.py b/src/python/grpcio/grpc/experimental/aio/_interceptor.py index 80d17e04ce9..b9f786e5522 100644 --- a/src/python/grpcio/grpc/experimental/aio/_interceptor.py +++ b/src/python/grpcio/grpc/experimental/aio/_interceptor.py @@ -73,8 +73,8 @@ class ClientCallDetails( metadata: Optional metadata to be transmitted to the service-side of the RPC. credentials: An optional CallCredentials for the RPC. - wait_for_ready: This is an EXPERIMENTAL argument. An optional flag to - enable wait for ready mechanism. + wait_for_ready: This is an EXPERIMENTAL argument. An optional + flag to enable :term:`wait_for_ready` mechanism. """ method: str