Skip to content

Commit b460f39

Browse files
committed
TokenAwarePolicy: enable shuffling by default
Shuffling provides better performance with no downsides
1 parent 30f6d78 commit b460f39

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
@@ -478,12 +478,12 @@ class TokenAwarePolicy(LoadBalancingPolicy):
478478
_child_policy = None
479479
_cluster_metadata = None
480480
_tablets_routing_v1 = False
481-
shuffle_replicas = False
481+
shuffle_replicas = True
482482
"""
483483
Yield local replicas in a random order.
484484
"""
485485

486-
def __init__(self, child_policy, shuffle_replicas=False):
486+
def __init__(self, child_policy, shuffle_replicas=True):
487487
self._child_policy = child_policy
488488
self.shuffle_replicas = shuffle_replicas
489489

0 commit comments

Comments
 (0)