0

I did the exact same query on cassandra, but the result is different, I'm wondering why. The detail is following:

    cqlsh:keyspace > select info_map from a where seq_id = '123456' limit 2;
    (0 rows)
    .....
    (after about 1 minute)
    .....
    cqlsh:keyspace > select info_map from a where seq_id = '123456' limit 2;
    {............data detail........}
    (1 rows)

I can assure you that the data is not instant (the data is inserted into database about 1 month ago), and the number of hit recode is at most 1 (though I write limit 2 in my cql). And my cassandra has two datacenters.

Jarry woo
  • 11
  • 3
  • What consistency level did you use? What is your replication factor? Take a look here: http://stackoverflow.com/questions/25043208/read-operation-in-cassandra-at-consistency-level-of-quorum/25043599#25043599 – Carlo Bertuccini May 12 '15 at 07:11
  • Consistency level is ConsistencyLevel.ONE. replication factor is 3 (5 nodes in a cluster). – Jarry woo May 12 '15 at 09:26
  • 1
    I think you answered your own question. – rs_atl May 12 '15 at 20:28
  • I know there is possibility that in a short interval the data is not consistency in different replicas. But the record I queried is about one month ago, shouldn't it be synchronized in the cluster? – Jarry woo May 13 '15 at 03:25
  • If you're using CL.ONE, you may receive answers from different nodes, thus having different requests. Also if you wrote your data with CL.ONE, but having RF=3 for the keyspace, Cassandra may use a 'hinted-handoff' data recovery, if it detects that your row is under-replicated. – shutty May 15 '15 at 12:18

0 Answers0