Skip to content

Latest commit

 

History

History
109 lines (82 loc) · 2.51 KB

step3.md

File metadata and controls

109 lines (82 loc) · 2.51 KB
Consistency ℹ️ For technical support, please contact us via email.
⬅️ Back Step 3 of 3 Next ➡️
Use different consistency levels with all nodes available

✅ Start the node you shut down before:

Solution

Make sure that you start the right node!

Node (IP) Start command
127.0.0.1
./node1/bin/cassandra
127.0.0.2
./node2/bin/cassandra

✅ Verify that all three nodes are running:

Solution
./node3/bin/nodetool status

✅ Use cqlsh to set the consistency level to TWO and retrieve all the rows in the cassandra partition:

Solution
./node1/bin/cqlsh

USE killrvideo;

CONSISTENCY TWO;

SELECT * FROM killrvideo.videos_by_tag WHERE tag = 'cassandra';

The new row should be present.


Note: The row was inserted at consistency level ONE whn only one replica node was running. This read was at consistency level TWO and it succeeded. Somehow when the downed node returned to the cluster it synced up and got the new row! Cassandra uses Hinted Handoff to inform nodes about changes that occurred when they were not available. More on this in Exercise 13.



⬅️ Back Next ➡️