Skip to content

Commit 8990563

Browse files
committed
fix: _set_keyspace_for_all_pools passes only the last pool's errors to callback
The pool_finished_setting_keyspace closure was calling callback(host_errors) instead of callback(errors), so when the last pool to finish had no errors, the callback received an empty list instead of the accumulated error dict from all pools. This caused _set_keyspace_completed to report success (not [] is True) even when other pools had failures — keyspace changes silently succeeded with partial failures dropped. Introduced in d281b50 (2013-10-11). Fixes #914
1 parent 3e3e71a commit 8990563

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)