Skip to content

Commit d2d2eca

Browse files
committed
Adding default retry configuration changes for sync cluster client
1 parent 92dd9b0 commit d2d2eca

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
@@ -1621,9 +1621,14 @@ def create_redis_node(self, host, port, **kwargs):
16211621
# connections on lower level clients to avoid retrying
16221622
# connections to nodes that are not reachable
16231623
# and to avoid blocking the connection pool.
1624+
# The only error that will have some handling in the lower
1625+
# level clients is ConnectionError which will trigger disconnection
1626+
# of the socket.
16241627
# The retries will be handled on cluster client level
16251628
# where we will have proper handling of the cluster topology
1626-
node_retry_config = Retry(backoff=NoBackoff(), retries=0)
1629+
node_retry_config = Retry(
1630+
backoff=NoBackoff(), retries=0, supported_errors=(ConnectionError,)
1631+
)
16271632

16281633
if self.from_url:
16291634
# Create a redis node with a costumed connection pool

0 commit comments

Comments
 (0)