Skip to content

Commit 11cf66a

Browse files
authored
Changed dynamic_startup_nodes default value to 'True' to prevent breaking backward compatibility (#2251)
1 parent 8b18d5b commit 11cf66a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,15 +1268,15 @@ Using scripting within pipelines in cluster mode is **not supported**.
12681268
When set to true, read commands will be assigned between the
12691269
primary and its replications in a Round-Robin manner.
12701270
1271-
dynamic_startup_nodes: (default=False)
1271+
dynamic_startup_nodes: (default=True)
12721272

12731273
Set the RedisCluster's startup nodes to all of the discovered nodes.
12741274
If true, the cluster's discovered nodes will be used to determine the
12751275
cluster nodes-slots mapping in the next topology refresh.
12761276
It will remove the initial passed startup nodes if their endpoints aren't
12771277
listed in the CLUSTER SLOTS output.
12781278
If you use dynamic DNS endpoints for startup nodes but CLUSTER SLOTS lists
1279-
specific IP addresses, keep it at false.
1279+
specific IP addresses, it is best to set it to false.
12801280
12811281
cluster_error_retry_attempts: (default=3)
12821282

redis/cluster.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def __init__(
482482
require_full_coverage=False,
483483
reinitialize_steps=10,
484484
read_from_replicas=False,
485-
dynamic_startup_nodes=False,
485+
dynamic_startup_nodes=True,
486486
url=None,
487487
**kwargs,
488488
):
@@ -512,12 +512,12 @@ def __init__(
512512
primary and its replications in a Round-Robin manner.
513513
:dynamic_startup_nodes: 'bool'
514514
Set the RedisCluster's startup nodes to all of the discovered nodes.
515-
If true, the cluster's discovered nodes will be used to determine the
516-
cluster nodes-slots mapping in the next topology refresh.
515+
If true (default value), the cluster's discovered nodes will be used to
516+
determine the cluster nodes-slots mapping in the next topology refresh.
517517
It will remove the initial passed startup nodes if their endpoints aren't
518518
listed in the CLUSTER SLOTS output.
519519
If you use dynamic DNS endpoints for startup nodes but CLUSTER SLOTS lists
520-
specific IP addresses, keep it at false.
520+
specific IP addresses, it is best to set it to false.
521521
:cluster_error_retry_attempts: 'int'
522522
Retry command execution attempts when encountering ClusterDownError
523523
or ConnectionError
@@ -1293,7 +1293,7 @@ def __init__(
12931293
from_url=False,
12941294
require_full_coverage=False,
12951295
lock=None,
1296-
dynamic_startup_nodes=False,
1296+
dynamic_startup_nodes=True,
12971297
**kwargs,
12981298
):
12991299
self.nodes_cache = {}

0 commit comments

Comments
 (0)