An invalid Data Center Name throw NoHostAvailableException

Description

If an invalid data center name is given to the DCAwareRoundRobinPolicy a NoHostAvailableException is thrown with a message of "None of the hosts tried for query are available (tried: 10.200.241.18)" and Errors of just the IP Address (no value).

This exception is misleading since the real error is an invalid data center name. There should be at least a more appropriate message or it own exception.

Environment

Win2008R2 x64

Activity

Show:
Jorge Bay Gondra
September 17, 2014, 9:02 AM

I understand the need to determine what is happening...
The load balancing policy determines the if it should be ignored or not, so the driver may not be able to obtain the node at all, so this can be tough to expose.

Do you think include ignored host in the tracing would be enough?

Something like:
"Verbose: Host X ignored by load balancing policy"

Richard Andersen
September 17, 2014, 4:02 PM

I really think we need to figure out what is really going on and maybe even suggest an enhancement to C* to determine if the data center name is valid.

The trace string to me seems too vague...

Jorge Bay Gondra
September 18, 2014, 7:47 AM

Its not related to the C* cluster itself, its the configuration of the Load balancing policy on the driver.

A possibility would be for the DCAwareRoundRobinPolicy to throw an exception on init, if there isn't any nodes that match the localDc string provided by the user. I think it would be a good idea for the driver to fail as soon as possible, if the settings are not correct...

What are your thoughts , , ?

Richard Andersen
September 18, 2014, 7:50 AM

I Completely agree Jorge!

Alex Popescu
September 18, 2014, 7:54 AM

👍

Fixed

Assignee

Jorge Bay Gondra

Reporter

Richard Andersen

Labels

None

Reproduced in

None

PM Priority

None

Fix versions

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

None

Pull Requests

None

Size

None

Components

Affects versions

Priority

Minor
Configure