Ignore the peers that have null entries in any of the key fields

Description

Currently java-driver ignores the peers that have null rpc_address. We see many cases in production where rpc_address is not null but many other key fields are left null by cassandra for invalid peers. Driver establishing connections to these nodes is a bad idea.

Tighten the peer validity check. isValidPeer() need to include the null check for the following fields:

host_id
rack
rpc_address
tokens

Ignore all the peers that are invalid as per above check.

I have attached an example that shows many invalid peers.

Environment

None

Pull Requests

None

Status

Assignee

Kevin Gallardo

Reporter

Vishy Kasar

Labels

None

PM Priority

A

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Sprint

Priority

Major
Configure