feng1122
feng1122

Reputation: 139

How to delete tombstones of cassandra table?

My OpsCenter give me 'Failed' result on Tombstone count performance service. I read this paper and find that may be the insertion of NULL value is the casual.

So I try to fix this problem using the following procedures:

  1. Set the NULL column of table channels and articles to ''. And for checking reason, there is no any insertings to these two tables.

  2. Set gc_grace_seconds to 0 using commands: alter table channels with gc_grace_seconds = 0 alter table articles with gc_grace_seconds = 0

  3. Truncate bestpractice_results table in OpsCenter keyspace.

  4. Restart agents and OpsCenter using commands: service datastax-agent restart service opscenterd restart

But, when OpsCenter run routine performance check (every 1 minute), the following 'Failed' information appeared again. And the number of tombstones is not changed (i.e., 23552 and 1374)

And I have the question:

  1. How to remove these tombstones when there is no any insertion operations on two tables ? Do I need repair the cluster ?

enter image description here

OpsCenter Version: 6.0.3 Cassandra Version: 2.1.15.1423 DataStax Enterprise Version: 4.8.10

Upvotes: 3

Views: 15879

Answers (2)

Martin Tapp
Martin Tapp

Reputation: 3396

With Cassandra 3.10+, use

nodetool garbagecollect keyspace_name table_name

Check https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/tools/nodetool/toolsGarbageCollect.html

Upvotes: 10

Big Data Guy
Big Data Guy

Reputation: 248

Please go through below link to get complete info about Delete and Tombstone.. It may be helpful for you. http://thelastpickle.com/blog/2016/07/27/about-deletes-and-tombstones.html

Upvotes: 6

Related Questions