【发布时间】:2021-11-27 13:57:05
【问题描述】:
我的程序生成大量时间序列数据到下表中:
CREATE TABLE AccountData
(
PartitionKey text,
RowKey text,
AccountId uuid,
UnitId uuid,
ContractId uuid,
Id uuid,
LocationId uuid,
ValuesJson text,
PRIMARY KEY (PartitionKey, RowKey)
)
WITH CLUSTERING ORDER BY (RowKey ASC)
PartitionKey 是一个字典值(10 之一),RowKey 是 DateTime 转换为 long。
现在由于程序正在生成大量数据,每个ContractId 在代码中都有不同的保留策略。代码会根据特定 ContractId 的保留时间删除旧数据。
我现在遇到的问题是,在 SELECT 语句期间它拾取了太多的 Tombstones 并且我收到了一个错误。
我应该使用什么 Table Compaction 策略来解决这个 Tombstone 问题?
【问题讨论】: