【问题标题】:Updating cassandra list collection is creating tombstones更新 cassandra 列表集合正在创建墓碑
【发布时间】:2019-03-22 23:11:52
【问题描述】:

Cassandra 版本 3.11.3

我有一些集合和列表集合的记录。 使用带有添加/删除数据的集合似乎没有或非常有限的墓碑创建。 然而,使用列表列似乎会为每个查询创建一个墓碑。

我的印象是这在bug 中已修复。
我是不是做错了什么?

执行 10k 次不会生成墓碑:(假设之前不存在分区)

update "Record" Set "AllSetItems" = "AllSetItems" + {'abc'} where "RecordId" = 5 and "Field" = 'xyz';
update "Record" Set "AllSetItems" = "AllSetItems" - {'abc'} where "RecordId" = 5 and "Field" = 'xyz';

因此,这个查询工作正常:

Select * from "Record" where "RecordId" = 5 and "Field" = 'xyz';

这样做 10k 次会生成很多墓碑:(假设之前不存在分区)

update "Record" Set "AllListItems" = "AllListItems" + ['abc'] where "RecordId" = 5 and "Field" = 'xyz';
update "Record" Set "AllListItems" = "AllListItems" - ['abc'] where "RecordId" = 5 and "Field" = 'xyz';

更新后,由于墓碑太多,此查询失败:

Select * from "Record" where "RecordId" = 5 and "Field" = 'xyz';

【问题讨论】:

    标签: cassandra cql tombstone


    【解决方案1】:

    我相信这是按预期工作的。阅读这篇文章(虽然它有点过时了),看看它是否能解释你的情况。

    https://jsravn.com/2015/05/13/cassandra-tombstones-collections/#lists

    【讨论】:

      猜你喜欢
      • 2019-05-17
      • 2021-10-19
      • 2023-03-08
      • 2023-03-18
      • 2017-02-09
      • 2016-05-31
      • 1970-01-01
      • 2017-08-16
      • 2017-02-09
      相关资源
      最近更新 更多