You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/retry.rst
+1-7
Original file line number
Diff line number
Diff line change
@@ -49,16 +49,11 @@ Retry in Redis Cluster
49
49
Retry behaviour in Redis Cluster is a little bit different from Standalone:
50
50
51
51
* ``retry``: :class:`~.Retry` instance with a :ref:`backoff-label` strategy and the max number of retries, default value is ``Retry(ExponentialWithJitterBackoff(base=1, cap=10), cluster_error_retry_attempts)``
52
-
* ``cluster_error_retry_attempts``: number of times to retry before raising an error when :class:`~.TimeoutError` or :class:`~.ConnectionError` or:class:`~.ClusterDownError` or :class:`~.SlotNotCoveredError` are encountered, default value is ``3``
52
+
* ``cluster_error_retry_attempts``: number of times to retry before raising an error when :class:`~.TimeoutError`, :class:`~.ConnectionError`,:class:`~.ClusterDownError` or :class:`~.SlotNotCoveredError` are encountered, default value is ``3``
53
53
* This argument is deprecated - it is used to initialize the number of retries for the retry object,
54
54
only in the case when the ``retry`` object is not provided.
55
55
When the ``retry`` argument is provided, the ``cluster_error_retry_attempts`` argument is ignored!
56
56
57
-
* Starting from version 6.0.0 of the library, the default retry policy for the nodes connections is without retries.
58
-
This means that if a connection to a node fails, the lower level connection will not retry the connection.
59
-
Instead, it will raise a :class:`~.ConnectionError` to the cluster level call., where it will be retried.
60
-
This is done to avoid blocking the cluster client for too long in case of a node failure.
61
-
62
57
* The retry object is not yet fully utilized in the cluster client.
63
58
The retry object is used only to determine the number of retries for the cluster level calls.
64
59
@@ -74,6 +69,5 @@ Let's consider the following example:
74
69
#. the client library calculates the hash slot for key 'foo'.
75
70
#. given the hash slot, it then determines which node to connect to, in order to execute the command.
76
71
#. during the connection, a :class:`~.ConnectionError` is raised.
77
-
#. because the default retry policy for the nodes connections is without retries, the error is raised to the cluster level call
78
72
#. because we set ``retry=Retry(ExponentialBackoff(), 6)``, the cluster client starts a cluster update, removes the failed node from the startup nodes, and re-initializes the cluster.
79
73
#. the cluster client retries the command until it either succeeds or the max number of retries is reached.
0 commit comments