Skip to content

Commit 26c201a

Browse files
sylwiaszunejkodkropachev
authored andcommitted
Fix Session._set_keyspace_for_all_pools to report all pools' errors
The final callback was invoked with host_errors (the errors from only the last pool to finish) instead of the accumulated errors dict. If the last pool succeeded, failures from other pools were silently lost. Pass the aggregated errors dict, matching the method's docstring.
1 parent 5694c85 commit 26c201a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cassandra/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3438,7 +3438,7 @@ def pool_finished_setting_keyspace(pool, host_errors):
34383438
errors[pool.host] = host_errors
34393439

34403440
if not remaining_callbacks:
3441-
callback(host_errors)
3441+
callback(errors)
34423442

34433443
for pool in tuple(self._pools.values()):
34443444
pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace)

0 commit comments

Comments
 (0)