Consider the following scenario:
- Driver queried the cluster for RO replicas' endpoints.
- N records returned of 'active' state.
- N records added to the list.
- X RO replicas went down.
- Application requests connection to be established.
- Driver pulls record which points to the replica, which is no longe accessible.
- Driver tries to open JDBC connection.
- Driver receives SQLException with IOException as cause.
Need to add logic which will:
- Handle exception and try to open the connection to the healthy address, respecting the general distribution logic.
- Optionally: Remove those records from the list or somehow mark it as down.