Skip to content

Commit 6056b36

Browse files
committed
for RoundRobin return iterator instead of materialized list
Most of time, only first element will be consumed.
1 parent 33e9a99 commit 6056b36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cassandra/policies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def make_query_plan(self, working_keyspace=None, query=None):
173173
length = len(hosts)
174174
if length:
175175
pos %= length
176-
return list(islice(cycle(hosts), pos, pos + length))
176+
return islice(cycle(hosts), pos, pos + length)
177177
else:
178178
return []
179179

0 commit comments

Comments
 (0)