是否可以使用 'truncate' 在 Aerospike 中使用 asinfo 发出持久删除?

Is it possible to issue a durable delete in Aerospike with asinfo using 'truncate'?

我想避免使用 Aerospike 客户端(例如 Python)并使用来自 AS 文档的原生 asinfo command 'truncate' as it allows to do it quickly. But after I restarted Aerospike all deleted records were back. I saw this but it doesn't answer my question. Neither does this page 从集合中删除记录。它说,应该在持久删除后写入逻辑删除,我必须手动创建它还是有其他方法?

更新: 感谢@kporter,他在下面提供了可接受的答案,我得以研究 Aerospike 的社区版和企业版之间的差异,并找到了有关该问题的更多信息,有些人可能会发现它也有帮助:

如果我理解正确,在 CE 中完全删除记录的最佳方法是确保它们具有正确的 TTL 并且可以自然过期。如果由于某种原因你有很多没有 TTL 的旧记录,就像我的情况一样,你可以通过 asinfo 发出 truncate 命令,并且在 SSD 上的数据最终被覆盖之前不要重新启动 AS 服务器。或者只是在每次重新启动时用旧记录截断集。

另外我想知道是否可以完全擦除 AS 存储,然后作为紧急措施从已截断数据的备份中恢复它?

UPD1: 因此,我能够使用 Aerospike 存储擦除 SSD,并从备份中仅恢复需要的记录。这是我的做法:

有用的链接:how to remove and clean up an aerospike server installation, AS docs on SSD setup

我不确定它是否适合大型生产设置,但它在我的情况下按预期工作,只有一个 AS 节点并有机会停止它一段时间。 通过这种方式,我能够将我的 AS 中的数据大小从 160Gb 减少到 11Gb,因此我的服务器现在完全重启只需要半小时,而不是像以前那样大约八小时。

您可以在此处找到有关截断集合的更多信息: https://www.aerospike.com/docs/operations/manage/sets/

正如那里提到的,截断在 Aerospike 社区中是不持久的。

In the Enterprise Edition, truncation is durable and preserves record deletions through a cold-restart. In the Community Edition, similar to record deletes, records in previously truncated sets are not durable and deletes can return through a cold-start.