Cassandra Cassandra Interview Questions Interview Questions

What is a Zombie in Cassandra? How to prevent/avoid the reappearance of zombies?

A row or cell that reappears in a database table after deletion. This can happen if a node goes down for a long period of time and is then restored without being repaired.

Deleted data are not erased from database tables, but marked with tombstones until compaction. The tombstones created on one node must be propagated to the nodes containing the deleted data. If one of these nodes goes down before this happens, the node may not receive the most up-to-date tombstones. If the node is not repaired before it comes back online, the database finds the non-tombstoned items and propagates them to other nodes as new data.

To prevent the reappearance of zombies, the database gives each tombstone a grace period. The purpose of the grace period is to give unresponsive nodes time to recover and process tombstones normally. 

To avoid this problem, run nodetool repair on any restored node before rejoining it to its cluster.

PS :
If a client writes a new update to the tombstone during the grace period, the database overwrites the tombstone.

When an unresponsive node recovers, DataStax Enterprise uses hinted handoffs to replay the database mutations that the node missed while it was down. DSE does not replay a mutation for a tombstone during its grace period. If the node does not recover until after the grace period ends, the deletion might be missed.

After the tombstone’s grace period(default: 10 days) ends, DSE deletes the tombstone during compaction.

DSE supports immediate deletion through the DROP KEYSPACE and DROP TABLE statements.

Review
4
Comments Rating 0 (0 reviews)

About the author

BestTechReads

Add Comment

Click here to post a comment

Sending

Categories

Categories