Prepare efficiently for the Cassandra Test. Study with comprehensive quizzes and real-world scenarios. Test your understanding with multiple-choice questions and detailed explanations. Get ready for a successful exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What happens to deleted data in Cassandra after reaching gc_grace_seconds?

  1. The data is immediately removed

  2. The data is marked as a tombstone and later deleted

  3. The data is archived

  4. The data is permanently stored in logs

The correct answer is: The data is marked as a tombstone and later deleted

When data is deleted in Cassandra, it does not get immediately removed from the database. Instead, it is marked as a tombstone. This tombstone acts as a placeholder indicating that the data has been deleted. The concept of gc_grace_seconds is essential here, as it defines a time period during which the tombstones are retained. The purpose of this retention period is to ensure that any replicas that may not have received the delete operation are still aware of the data's deletion. After the gc_grace_seconds period expires, the tombstones can be safely removed during the next compaction process. This mechanism helps maintain data consistency across the distributed system even when deletions occur. It prevents scenarios such as the reappearance of deleted data from other nodes. Other options, such as immediate removal or archiving, do not accurately reflect how deletions are handled in a distributed database like Cassandra. Permanent storage in logs doesn't apply to the tombstoning process either, as the data can be purged after the retention period.