When setting the keyspace on a newly opened connection fails, the pool logs the error but still reports the ready connection as successful with a keyspace attached.
Code permalink:
|
let result = connection.use_keyspace(&keyspace_name).await; |
The ready-connection handler can then accept and publish a connection as if the current keyspace was installed. Later unqualified queries may run with no keyspace, or with the wrong keyspace, instead of retrying or discarding that connection.
Suggested direction: treat keyspace setup failure as a connection setup failure, so the pool retries or drops the connection rather than publishing it.
When setting the keyspace on a newly opened connection fails, the pool logs the error but still reports the ready connection as successful with a keyspace attached.
Code permalink:
scylla-rust-driver/scylla/src/network/connection_pool.rs
Line 1233 in e04a12a
The ready-connection handler can then accept and publish a connection as if the current keyspace was installed. Later unqualified queries may run with no keyspace, or with the wrong keyspace, instead of retrying or discarding that connection.
Suggested direction: treat keyspace setup failure as a connection setup failure, so the pool retries or drops the connection rather than publishing it.