【问题标题】:Disk space not decrease after delete cassandra data删除 cassandra 数据后磁盘空间不减少
【发布时间】:2022-01-09 14:31:42
【问题描述】:

大约 2 周前,我删除了大约 700GB 的 cassandra 数据。但是直到现在磁盘空间仍然没有空闲。我知道 gc_grace_second 和 default_time_to_live 过期时会删除数据。并且 nodetool compactionstats 仍然有待处理的任务。

   CREATE TABLE ywulzsrdphjlbgoksmnqoliktcmrlcybidcw (
       key text,     
       column1 text,
       value text,
       PRIMARY KEY (key, column1) )
   WITH COMPACT STORAGE
   AND bloom_filter_fp_chance=0.100000
   AND caching='{"keys":"ALL", "rows_per_partition":"NONE"}' 
   AND comment=''
   AND dclocal_read_repair_chance=0.000000
   AND gc_grace_seconds=1
   AND read_repair_chance=0.000000
   AND default_time_to_live=0
   AND speculative_retry='NONE'
   AND memtable_flush_period_in_ms=0
   AND compaction={'class':'LeveledCompactionStrategy'}
   AND compression={'sstable_compression': 'LZ4Compressor'};

【问题讨论】:

标签: linux server cassandra delete-row diskspace


【解决方案1】:

与您当前的“LeveledCompactionStrategy”压缩策略相比,使用 TimeWindowCompactionStrategy 可以帮助您更频繁地触发压缩过程。

或者,您可以使用“nodetool compact keyspace/table”在已删除数据的键空间或表上强制触发压缩过程。

【讨论】:

    猜你喜欢
    • 2019-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-24
    • 2015-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多