我可以强行清理旧的墓碑吗? [英] Can I force cleanup of old tombstones?

查看:172
本文介绍了我可以强行清理旧的墓碑吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近降低了CQL表的gc_grace_seconds.我正在运行LeveledCompactionStrategy.我可以强制从SSTable中清除旧的墓碑吗?

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?

推荐答案

TL; DR

您的墓碑将通过压实而自行消失,请确保您正在维修,否则它们可能会从死里复出.

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

直到两个都不能立即删除墓碑:

Tombstones are not immediately available for deletion until both:

1)gc_grace_seconds已过期

1) gc_grace_seconds has expired

2)它们满足在墓碑压实子属性中配置的要求

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

1)进行维修以确保您的墓碑一致

1) Run a repair to ensure your tombstones are consistent

2)减少表的gc_grace_seconds(更改表语句)

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

3)将 compact子属性配置为加快墓碑的移除速度:

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

减小tombstone_compaction_interval并减小tombstone_threshold,或将unchecked_tombstone_compaction设置为true,以忽略这两种情况,并纯粹基于gc宽限度进行收集.

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.

您可以在nodetool cfstats中以及通过使用在工具目录sstablemetadata <sstable filenames>中找到的sstable metatdata实用程序来查看有关墓碑的统计信息.

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

这篇关于我可以强行清理旧的墓碑吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆