首页 > 解决方案 > 实际记录 TTL 一个月后,Cassandra 墓碑未删除

问题描述

遇到 DSE 4.7 的问题。

即使在压缩、清理、rebuild_index 和修复之后,墓碑也不会被删除。记录有 15 天的 ttl。

sstablemetadata 输出表明有 90% 的墓碑

有任何想法吗?

稳定元数据输出

SSTable: ./abcd-abcd-ka-478675
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Bloom Filter FP chance: 0.010000
Minimum timestamp: 1527521280829593
Maximum timestamp: 1527596173976435
SSTable max local deletion time: 1528892173
Compression ratio: 0.36967428395684393
Estimated droppable tombstones: 0.9073013816277629
SSTable Level: 0
Repaired at: 0
ReplayPosition(segmentId=1520529283052, position=4626679)
Estimated tombstone drop times:%n
1528817679:  18318196
1528818619:  20753822
1528819513:  24176310
.
.
.

Count               Row Size        Cell Count
1                          0                 0
2                          0           1752560
3                          0                 0
4                          0           6355421
5                          0                 0
6                          0            687302
7                          0                 0
8                          0            529613
10                         0            444801
12                         0            410107
14                         0            456011
17                         0           1347893
20                         0            184960
24                         0            152814
.
.
.
770                  1347893               137
924                   184960               109
1109                  220403                68
1331                  121620                86
1597                 2044030               102
1916                  185601               195
2299                  184816            158273
2759                  868754                 0
3311                   62795                 0
3973                    1668                 0
4768                    2143                 0
5722                 1812541                 0
6866                     828                 0
.
.
.             
Ancestors: [476190, 474027, 475201, 478160]
Estimated cardinality: 20059264

标签: cassandradatastaxdatastax-enterprisecassandra-2.1tombstone

解决方案


Cassandra 在请求的时间到期后用墓碑标记 TTL 数据。gc_grace_seconds 存在一个墓碑。数据用墓碑标记后,在正常压缩过程中会自动删除数据。您可以尝试运行主要压缩以驱逐墓碑。


推荐阅读