Uh oh!
There was an error while loading. Please reload this page.
cluster: add control-connection query fallback - #878
Conversation
88b0f45 to
82a5b3cCompare82a5b3c to
4eb62ceCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dkropachev
commented
May 7, 2026
cqlsh manual test report I tested cqlsh with the local driver from Test setup: This setup makes the initial control connection reachable, but makes discovered node-pool connections unusable. Results:
Default With I also verified directly through the driver that the session starts with no node pools and still executes the query: With Conclusion: |
d14ab6c to
a94d092CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b50342a to
5f16f20Compare5f16f20 to
a37ecceCompare
Lorak-mmk
left a comment
There was a problem hiding this comment.
I have to admit I don't understand the logic and flow around _control_connection_query_attempted. I'll have to just assume it works.
I have 2 more questions regarding SkipPoolCreation:
- WDYT about changing
ProfileManagerto returnIGNOREDdistance for all hosts in this mode? It would be additional hardening about unexpected code paths doing something weird. One possible problem is that it may affect control connection, in which case we should not do it. - I think
Cluster.on_upandCluster.on_downshould also be guarded inSkipPoolCreationmode. We don't want reconnectors to start etc.
a37ecce to
16424dcComparedkropachev
commented
May 8, 2026
Great idea, easily can see how it can stop driver spin on pool creation, added. |
16424dc to
b0e8df1CompareUh oh!
There was an error while loading. Please reload this page.
Add an opt-in control-connection fallback for application queries when the driver cannot populate normal node pools, which happens in deployments that expose the cluster through a non-broadcast IP address such as a TCP proxy or a node public IP. In that mode the driver can still execute queries over the single control connection, but throughput is poor and connection churn increases the chance of request errors. This option is intentionally disabled by default and should not be used in production. Also propagate keyspace updates on the fallback path so USE keeps the control connection in sync. Tests: - tests/unit/test_cluster.py::ClusterTest::test_set_keyspace_for_all_pools_reports_all_errors - tests/unit/test_response_future.py::ResponseFutureTests::test_control_connection_fallback_updates_connection_keyspace
b0e8df1 to
baeae28CompareUh oh!
There was an error while loading. Please reload this page.
Enable ControlConnectionQueryFallback.Fallback for use_zero_nodes sessions so queries can continue through the driver control connection when zero-token topologies leave no usable node pools. Refs: scylladb/python-driver#878
Enable ControlConnectionQueryFallback.Fallback for use_zero_nodes sessions so queries can continue through the driver control connection when zero-token topologies leave no usable node pools. Refs: scylladb/python-driver#878
Enable ControlConnectionQueryFallback.Fallback for use_zero_nodes sessions so queries can continue through the driver control connection when zero-token topologies leave no usable node pools. Refs: scylladb/python-driver#878 (cherry picked from commit 0a2025a)
Summary
Add an opt-in control-connection fallback for application queries when the driver cannot populate normal node pools, which happens in deployments that expose the cluster through a non-broadcast IP address such as a TCP proxy or a node public IP. In that mode the driver can still execute queries over the single control connection, but throughput is poor and connection churn increases the chance of request errors. This option is intentionally disabled by default and should not be used in production.
Also propagate keyspace updates on the fallback path so
USEkeeps the control connection in sync.Fixes: #720
Tests
uv run python - <<\"PY\" ... pytest tests/unit/test_cluster.py -q -k set_keyspace_for_all_pools_reports_all_errors ... PYuv run python - <<\"PY\" ... pytest tests/unit/test_response_future.py -q -k control_connection_fallback_updates_connection_keyspace ... PY