cloudwalker
cloudwalker

Reputation: 2466

Incorrectly configured Cassandra cluster? Odd query results

I have a 3 node Ec2 Cassandra cluster. Two of the nodes are set up as seeds. The keyspace is configured with a NetworkTopologyStrategy with one datacenter (us-east) and a replication factor of 3. The snitch is configured as the Ec2Snitch. If I run the same query over and over, sometimes it returns a result and other times not, which to me indicates that I've set something up incorrectly and that it is occasionally hitting a node that does not have the data on it.

Should I have set this up differently? I'm relatively new to Cassandra and just added the two additional nodes yesterday. Up until that I was just running a one node cluster for testing purposes. Now that we are getting closer to moving into production I wanted to add some extra nodes for redundancy.

Upvotes: 0

Views: 51

Answers (1)

Alec  Collier
Alec Collier

Reputation: 1523

This is likely because you have a low consistency level and haven't run a repair since adding the new nodes to the cluster and increasing the RF. So currently Cassandra expects the new nodes to have the data but the data won't actually be streamed until you run the repair.

For future debugging, try using TRACING ON in cqlsh, This will show you detailed info about which nodes are being talked to during the query execution.

Upvotes: 0

Related Questions