Skip to content

Comments

Fall back to control connection when host pools are empty#722

Draft
dkropachev wants to merge 1 commit intoscylladb:masterfrom
dkropachev:fix/control-connection-fallback-720
Draft

Fall back to control connection when host pools are empty#722
dkropachev wants to merge 1 commit intoscylladb:masterfrom
dkropachev:fix/control-connection-fallback-720

Conversation

@dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Feb 23, 2026

Summary

  • When all hosts are marked IGNORED by the load-balancing policy (e.g. WhiteListRoundRobinPolicy with a NAT address not known to the cluster), no connection pools are created. Instead of raising NoHostAvailable on Session.connect(), the driver now logs a warning and falls back to executing queries on the already-established control connection.
  • Adds ResponseFuture._query_control_connection() method that borrows the control connection directly when session._pools is empty.
  • Adds integration test reproducing the exact scenario from the issue (connect via unadvertised NAT proxy with whitelist policy).

Fixes: #720

Test plan

  • Unit tests pass (pytest tests/unit/)
  • Integration test: SCYLLA_VERSION="release:2025.2" uv run pytest tests/integration/standard/test_public_address.py -s

@dkropachev dkropachev force-pushed the fix/control-connection-fallback-720 branch from 498b10c to 39ae69c Compare February 23, 2026 17:37
When all hosts are marked IGNORED by the load-balancing policy (e.g.
WhiteListRoundRobinPolicy with a NAT address not known to the cluster),
no connection pools are created. Instead of raising NoHostAvailable on
Session.connect(), log a warning and fall back to executing queries on
the already-established control connection.

Fixes: scylladb#720
@dkropachev dkropachev force-pushed the fix/control-connection-fallback-720 branch from 39ae69c to 5a24812 Compare February 23, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCT failing to connect via public adddress with scylla-driver==3.29.8

1 participant