Can I force cleanup of old tombstones?

天涯浪子 提交于 2019-12-04 00:09:04

问题


I have recently lowered gc_grace_seconds for a CQL table. I am running LeveledCompactionStrategy. Is it possible for me to force purging of old tombstones from my SSTables?


回答1:


TL;DR

Your tombstones will disappear on their own through compaction bit make sure you are running repair or they may come back from the dead.

http://www.datastax.com/documentation/cassandra/2.0/cassandra/dml/dml_about_deletes_c.html

Adding some more details:

Tombstones are not immediately available for deletion until both:

1) gc_grace_seconds has expired

2) they meet the requirements configured in tombstone compaction sub-properties

I need to free up disk by expiring tombstones, how do I do this quickly?

1) Run a repair to ensure your tombstones are consistent

2) Decrease gc_grace_seconds for your table (alter table statement)

3) Configure your compaction sub properties to speed up tombstone removal:

Decrease tombstone_compaction_interval and decrease tombstone_threshold, or set unchecked_tombstone_compaction to true to ignore both conditions and collect based purely on gc grace.

Is it working?

You can see statistics about tombstones in nodetool cfstats and by using the sstable metatdata utility found in your tools directory sstablemetadata <sstable filenames>.



来源:https://stackoverflow.com/questions/27566615/can-i-force-cleanup-of-old-tombstones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!