我将 Aws Keyspaces 与 c# 一起使用,首先我从表中选择以按分区键删除,然后尝试使用 where 子句从表中删除许多行:
var daysToDelete = DateTimeOffset.UtcNow.AddDays(-1);
foreach (var result in selectResult)
{
Cql deleteQuery = new Cql("WHERE interfaceid = ? and environment = ? and transactionguid < ?",
result .InterfaceId,
result .Environment,
TimeUuid.Min(daysToDelete)).WithOptions(o => o.SetPageSize(100));
mapper.Delete<Transaction>(deleteQuery);
}
它大约有 3k - 6k 行,当我试图删除这些行时,我得到一个错误:
“范围删除请求受限于单个范围内可删除的项目数量”
我该如何解决这个问题?