Sat
Sat

Reputation: 4148

Different results for same query in different Cassandra nodes

I have 3 cassandra nodes, when I execute a query, 2 nodes are giving same response but 1 node is giving different response

Suppose I executed following query

select * from employee;

Node1 and Node2 are giving 2 rows but Node3 is giving 0 rows(empty response)

How to solve this issue

Upvotes: 2

Views: 1102

Answers (2)

Sat
Sat

Reputation: 4148

I did the following steps, then problem was solved and now the data is in sync in all the 3 nodes

run the command nodetool rebuild on the instances and also

update 'replication_factor': '2' to 'replication_factor': '3'

Upvotes: 1

Rubayat Jinnah
Rubayat Jinnah

Reputation: 424

1.You are not using Network topology.
2.Your replication factor is 2.

Simple strategy : Use only for a single datacenter and one rack. SimpleStrategy places the first replica on a node determined by the partitioner. Additional replicas are placed on the next nodes clockwise in the ring without considering topology (rack or datacenter location).

Go to this link : https://docs.datastax.com/en/cassandra/3.0/cassandra/architecture/archDataDistributeReplication.html

Upvotes: 1

Related Questions