【问题标题】:Can I force cleanup of old tombstones?我可以强制清理旧墓碑吗?
【发布时间】:2015-02-18 10:09:04
【问题描述】:

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

【问题讨论】:

    标签: cassandra datastax datastax-enterprise tombstone


    【解决方案1】:

    TL;DR

    您的墓碑将通过压缩位自行消失,请确保您正在运行修复,否则它们可能会死而复生。

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

    添加更多细节:

    只有两个墓碑都不能立即删除:

    1) gc_grace_seconds 已过期

    2) 它们满足 tombstone compaction 子属性中配置的要求

    我需要通过使墓碑过期来释放磁盘,我该如何快速做到这一点?

    1) 运行修复以确保您的墓碑是一致的

    2) 减少表的 gc_grace_seconds (alter table statement)

    3) 配置您的compaction sub properties 以加快删除墓碑:

    减少 tombstone_compaction_interval 并减少 tombstone_threshold,或将 unchecked_tombstone_compaction 设置为 true 以忽略这两个条件并完全基于 gc grace 进行收集。

    有效吗?

    您可以在 nodetool cfstats 中查看有关墓碑的统计信息,并使用工具目录 sstablemetadata <sstable filenames> 中的 sstable metatdata 实用程序。

    【讨论】:

    • Nodetool 垃圾收集在现代版本中很有用。
    猜你喜欢
    • 1970-01-01
    • 2015-06-14
    • 1970-01-01
    • 2010-12-23
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-11
    相关资源
    最近更新 更多