cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shannon Carey <>
Subject Re: Consistency Level vs. Retry Policy when no local nodes are available
Date Mon, 20 Mar 2017 22:59:57 GMT
Specifically, this puts us in an awkward position because LOCAL_QUORUM is desirable so that
we don't have unnecessary cross-DC traffic from the client by default, but we can't use it
because it will cause complete failure if the local DC goes down. And we can't use QUORUM
because it would fail if there's not a quorum in either DC (as would happen if one DC goes
down). So it seems like we are forced to use a lesser consistency such as ONE or TWO.


From: Shannon Carey <<>>
Date: Monday, March 20, 2017 at 5:25 PM
To: "<>" <<>>
Subject: Consistency Level vs. Retry Policy when no local nodes are available

I am running DSE 5.0, and I have a Java client using the Datastax 3.0.0 client library.

The client is configured to use a DCAwareRoundRobinPolicy wrapped in a TokenAwarePolicy. Nothing

When I run my query, I set a custom retry policy.

I am testing cross-DC failover. I have disabled connectivity to the "local" DC (relative to
my client) in order to perform the test. When I run a query with the first consistency level
set to LOCAL_ONE (or local anything), my retry policy is never called and I always get this
"com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query
failed (no host was tried)"

getErrors() on the exception is empty.

This is contrary to my expectation that the first attempt would fail and would allow my RetryPolicy
to attempt a different (non-LOCAL) consistency level. I have no choice but to avoid using
any kind of LOCAL consistency level throughout my applications. Is this expected? Or is there
anything I can do about it? Thanks! It certainly seems like a bug to me or at least something
that should be improved.

View raw message