Skip to content

Commit 2ad9ba6

Browse files
committed
TokenAwarePolicy: enable shuffling by default
Shuffling provides better performance with no downsides
1 parent 01eb2e8 commit 2ad9ba6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cassandra/policies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,12 @@ class TokenAwarePolicy(LoadBalancingPolicy):
476476

477477
_child_policy = None
478478
_cluster_metadata = None
479-
shuffle_replicas = False
479+
shuffle_replicas = True
480480
"""
481481
Yield local replicas in a random order.
482482
"""
483483

484-
def __init__(self, child_policy, shuffle_replicas=False):
484+
def __init__(self, child_policy, shuffle_replicas=True):
485485
self._child_policy = child_policy
486486
self.shuffle_replicas = shuffle_replicas
487487

0 commit comments

Comments
 (0)