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

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

问题描述

我最近降低了 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) 它们满足在 tombstone compaction 子属性中配置的要求

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(alter table statement)

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

3) 将您的压缩子属性配置为加速删除墓碑:

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 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天全站免登陆