On Tue, Feb 27, 2018 at 9:45 AM, Abhishek Kumar Maheshwari <
abhishek.maheshw...@timesinternet.in> wrote:

>
> i have a KeySpace in Cassandra (cassandra version 3.0.9- total 12 Servers
> )With below definition:
>
> {'DC1': '2', 'class': 'org.apache.cassandra.locator.
> NetworkTopologyStrategy'}
>
> Some time i am getting below exception
>
> [snip]

> Caused by: com.datastax.driver.core.exceptions.WriteTimeoutException:
> Cassandra timeout during write query at consistency QUORUM (3 replica were
> required but only 2 acknowledged the write)
>         at com.datastax.driver.core.exceptions.WriteTimeoutException.
> copy(WriteTimeoutException.java:100)
>         at com.datastax.driver.core.Responses$Error.asException(Respons
> es.java:134)
>         at com.datastax.driver.core.RequestHandler$SpeculativeExecution
> .onSet(RequestHandler.java:525)
>         at com.datastax.driver.core.Connection$Dispatcher.channelRead0(
> Connection.java:1077)
>
> why its waiting for acknowledged from 3rd server as replication factor is
> 2?
>

I see two possibilities:

1) The data in this keyspace is replicated to another DC, so there is also
'DC2': '2', for example, but you didn't show it.  In this case QUORUM
requires more than 2 nodes.
2) The write was targeting a table in a different keyspace than you think.

In any case QUORUM (or LOCAL_QUORUM) with RF=2 is equivalent of ALL.  Not
sure why would you use it in the first place.

For consistency levels involving quorum you want to go with RF=3 in a
single DC.  For multi DC you should think if you want QUORUM or EACH_QUORUM
for your writes and figure out the RFs from that.

Cheers,
--
Alex

Reply via email to