Question-126: What are the disadvantages you see for forcing the compaction process?

Answer: If you force the compaction process, storage engine can create one large SSTable from all the available SSTables on that node, and does not initiate another compaction process for a long time. The data in the SSTable created during the force compaction can grow very stale because of non-compaction for long period. 

Question-127: Can you give some example when Tombstone records are created?

Answer: First thing you should keep in mind that Tombstone record can only be created when there is a replication factor is more than 1. Below are the few examples in the situation where Tombstone records can be created.

  • When you fire delete statement using the CQL query.
  • If record has time to live value set and that and that got expired.
  • If you are using materialized view, then internal operation can generate Tombstone record.
  • If you are inserting or updating record with the null values.
  • If you are having update operation on collection column.

 

Question-128: What all are the different kind of Tombstone records can be created?

Answer: When Tombstone is created it can be marked on different part of partition, based on the location of the marker, Tombstone can be categorized as below.

  • Partition Tombstone: With entire partition is deleted explicitly.
  • Range Tombstone: Partition if several rows are deleted 
  • Row Tombstone: When a particular row within a partition is deleted. This deletion can be identified by using the clustering key within a partition.
  • Complex Column Tombstone: This happens when insert or update a collection type of column example sat, list and map.
  • Cell Tombstone: When you are deleting a value from a cell for example column in a specific row of a partition as well as if you are updating cell with null values.
  • TTL Tombstone: This happens when time to leave period expires which can be either at the row level or cell level 

Question-129: What is the relation with the Tombstone record and “gc_grace_second”?

Answer: Tombstone record is having a default built-in expiration known as grace period, which is set by “gc_grace_seconds”, at the end of the expiration period, the Tombstone will be deleted as part of normal compaction process.

Question-130: Is there any effect of having lot of Tombstone records?

Answer: Having an excessive number of Tombstone in a table can negatively impact application performance, if you have lot of Tombstone it is an indication that there are potential issues with either the data model or with application.