scylladb / java-driver

ScyllaDB Java Driver for ScyllaDB and Apache Cassandra, based on the DataStax Java Driver
Apache License 2.0
61 stars 37 forks source link

Picking connection fails when pool is empty #236

Open zimnx opened 1 year ago

zimnx commented 1 year ago

What version of driver are you using?

master

What did you do?

When connections to cluster are proxied, and all of them lands on the same proxy replica it's impossible to do a rolling restart of a proxy, even when there's always a second proxy replica able to handle the traffic.

What did you expect to see?

Instead throwing an exception and failing entire request, driver should attempt to establish connection once (or with configurable amount of retries) and fail only if it's not possible. https://github.com/scylladb/java-driver/blob/scylla-4.x/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlRequestHandler.java#L311-L321

What did you see instead?

Requests are failing for noticeable amount of time until pool is filled with at least one connection.

roydahan commented 3 months ago

Leaving this one only for SNI Proxy case that should support rolling restart.

mykaul commented 3 months ago

I'm not sure SNI proxy is an interesting use case.

roydahan commented 3 months ago

Right, hence we set it to backlog and lowest priority for now.