ttl在卡桑德拉创建墓碑 [英] ttl in cassandra creating tombstones

查看:73
本文介绍了ttl在卡桑德拉创建墓碑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只在给卡桑德拉做插入。插入时,不会插入null只是为了避免墓碑。但是几乎没有记录插入TTL。但是然后从表中执行select count(*)会产生以下错误-

I am only doing inserts to cassandra. While inserting , not nulls are only inserted to avoid tombstones. But few records are inserted with TTL. But then doing select count(*) from table gives following errors -


读取76个活动行和1324个逻辑删除单元以进行查询SELECT * FROM
xx.yy WHERE令牌(y)> =
令牌(fc872571-1253-45a1-ada3-d6f5a96668e8)限制100(请参阅
tombstone_warn_threshold)

Read 76 live rows and 1324 tombstone cells for query SELECT * FROM xx.yy WHERE token(y) >= token(fc872571-1253-45a1-ada3-d6f5a96668e8) LIMIT 100 (see tombstone_warn_threshold)

TTL插入是否会导致cassandra 3.7中的墓碑?如何缓解警告?

Do TTL inserts lead to tombstones in cassandra 3.7 ? How can the warning be mitigated ?

仅插入操作没有进行任何更新,一些记录没有TTL,其他记录有TTL

There are no updates done only inserts , some records without TTL , others with TTL

推荐答案

摘自datastax文档: https://docs.datastax.com/zh-CN/cql/3.1/cql/cql_using/use_expire_c.html

From datastax documentation: https://docs.datastax.com/en/cql/3.1/cql/cql_using/use_expire_c.html


自创建列以来的秒数超过TTL值后,TTL数据被视为已过期并包含在结果中。在读取路径上的下一次读取之后,已过期的数据将用墓碑标记,但最多保留gc_grace_seconds。经过这段时间后,在正常压缩和修复过程中会自动删除逻辑删除的数据。

After the number of seconds since the column's creation exceeds the TTL value, TTL data is considered expired and is included in results. Expired data is marked with a tombstone after on the next read on the read path, but it remains for a maximum of gc_grace_seconds. After this amount of time, the tombstoned data is automatically removed during the normal compaction and repair processes.

这些条目将被视为逻辑删除直到压实或修复。

These entries will be treated as tombstones until compaction or repair.

这篇关于ttl在卡桑德拉创建墓碑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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