whatyouhide / xandra

Fast, simple, and robust Cassandra/ScyllaDB driver for Elixir.
ISC License
406 stars 54 forks source link

Nodes that are down when connecting to a cluster are not considered "down" #297

Closed whatyouhide closed 1 year ago

whatyouhide commented 1 year ago

See comments from https://github.com/lexhide/xandra/pull/288#issuecomment-1497404426 and on.

We will implement the solution described in https://github.com/lexhide/xandra/pull/288#issuecomment-1497839464:

When we start a pool of connections, we can set a timer in the control connection, like {:check_host_health, Host.t()}. After that timer expires, we can check whether we have any connections for that host in the registry. If there are no connections (which means they never registered themselves) or they're all :down, we can mark the node as down as we do now. This would overcome never getting the {:disconnected, pid} message.

@harunzengin is working on this one.