Skip to content

Commit 6b0dcee

Browse files
committed
Adding default retry configuration changes for sync cluster client
1 parent 3c261c5 commit 6b0dcee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

redis/cluster.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,9 +1610,14 @@ def create_redis_node(self, host, port, **kwargs):
16101610
# connections on lower level clients to avoid retrying
16111611
# connections to nodes that are not reachable
16121612
# and to avoid blocking the connection pool.
1613+
# The only error that will have some handling in the lower
1614+
# level clients is ConnectionError which will trigger disconnection
1615+
# of the socket.
16131616
# The retries will be handled on cluster client level
16141617
# where we will have proper handling of the cluster topology
1615-
node_retry_config = Retry(backoff=NoBackoff(), retries=0)
1618+
node_retry_config = Retry(
1619+
backoff=NoBackoff(), retries=0, supported_errors=(ConnectionError,)
1620+
)
16161621

16171622
if self.from_url:
16181623
# Create a redis node with a costumed connection pool

0 commit comments

Comments
 (0)