Hi,

As you are writing as CL.ONE and cqlsh by default reads at CL.ONE, there is
a probability that you are reading stale data i.e. the node you have
contacted for the read may not have the most recent data. If you have a
higher consistency requirement, you should look at increasing your
consistency level, for a more detailed look at this see:
http://www.datastax.com/documentation/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html

If you want to continue using CL.ONE, you could look at increasing the
read_repair_chance for better consistency.
http://www.datastax.com/documentation/cassandra/2.0/cassandra/reference/referenceTableAttributes.html

Just to verify that this is in fact a consistency issue could you run a
nodetool repair on that table and run the same queries again?


Mark

Regards,
Mark


On 20 August 2014 00:14, Check Peck <comptechge...@gmail.com> wrote:

> We have cassandra cluster in three different datacenters (DC1, DC2 and
> DC3) and we have 10 machines in each datacenter. We have few tables in
> cassandra in which we have less than 100 records.
>
> What we are seeing - some tables are out of sync between machines in DC3
> as compared to DC1 or DC2 when we do select count(*) on it.
>
> As an example we did select count(*) while connecting to one cassandra
> machine in dc3 datacenter as compared to one cassandra machine in dc1
> datacenter and the results were different.
>
>     root@machineA:/home/david/apache-cassandra/bin# python cqlsh
> dc3114.dc3.host.com
>     Connected to TestCluster at dc3114.dc3.host.com:9160.
>     [cqlsh 2.3.0 | Cassandra 1.2.9 | CQL spec 3.0.0 | Thrift protocol
> 19.36.0]
>     Use HELP for help.
>     cqlsh> use testingkeyspace ;
>     cqlsh:testingkeyspace> select count(*) from test_metadata ;
>
>     count
>     -------
>         12
>
>     cqlsh:testingkeyspace> exit
>     root@machineA:/home/david/apache-cassandra/bin# python cqlsh
> dc18b0c.dc1.host.com
>     Connected to TestCluster at dc18b0c.dc1.host.com:9160.
>     [cqlsh 2.3.0 | Cassandra 1.2.9 | CQL spec 3.0.0 | Thrift protocol
> 19.36.0]
>     Use HELP for help.
>     cqlsh> use testingkeyspace ;
>     cqlsh:testingkeyspace> select count(*) from test_metadata ;
>
>     count
>     -------
>         16
>
> What could be the reason for this sync issue? Can anyone shed  some light
> on this?
>
> Since our java driver code and datastax c++ driver code are using these
> tables with CONSISTENCY LEVEL ONE.
>

Reply via email to