Skip to content

Commit da4d3c4

Browse files
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 da20330 commit da4d3c4

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
@@ -3439,7 +3439,7 @@ def pool_finished_setting_keyspace(pool, host_errors):
34393439
errors[pool.host] = host_errors
34403440

34413441
if not remaining_callbacks:
3442-
callback(host_errors)
3442+
callback(errors)
34433443

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

0 commit comments

Comments
 (0)