【发布时间】: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';
【问题讨论】: