DCAware load balancing policy should not attempt to reconnect/handshake to remote host when configured to keep 0 connection to remote host

Description

It seems that when a remote Cassandra node goes down, after the java driver receives notification from cassandra, it attempt to reconnect to that node without taking into account load balancing policy.

The scenario that was observed is that driver is configured to use TokenAware load balancing policy wrapped around the DCAware load balancing policy with usedHostsPerRemoteDC = 0. When driver receives a notification from Cassandra indicating that a node goes down, it attempts to handshake with that node regardless of DC where that node resides, even though all cassandra nodes in local DC were up and were reachable.

I'd suggest this behaviour to be changed, if possible, so that it's possible to avoid handshaking or reconnection attempts to nodes on remote DC, when DC aware load balancing policy is used with usedHostsPerRemoteDc = 0.

This behaviour is initially found Java driver version 1.0.5. Quick code inspection on the latest version 1.0.7 of the Java driver shows that the behaviour is still the same in 1.0.7.

Environment

None

Pull Requests

None

Assignee

Sylvain Lebresne

Reporter

Tran Huynh

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Major
Configure