Skip to content

Add ControlConnectionQueryFallback option #1793

Description

@patrycja-ziemkiewicz

Add ControlConnectionQueryFallback option

Summary

Add an option to allow routing application queries through the control connection when node connection pools are unavailable, similar to the Python driver's ControlConnectionQueryFallback.

Background

The Python driver provides a ControlConnectionQueryFallback setting on the Cluster object with three modes:

  • Disabled (default) - requires a usable node pool for application queries. If none is available, the driver raises NoHostAvailable.
  • Fallback - still attempts to create node pools, but allows application queries to fall back to the control connection when no usable pool is available. Session startup proceeds even if all initial pool attempts fail.
  • SkipPoolCreation - disables node-pool creation entirely and routes all application queries through the control connection.

Current state in the Rust driver

The Rust driver's ControlConnection is used exclusively for metadata fetching and event listening. There is currently no way to route user queries through it when connection pools are unavailable, the driver will return a connection error instead.

References

Metadata

Metadata

Labels

area/connectingOpening new connections, managing connection pool.area/statement-executionPreparing and executing statements.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions