【发布时间】:2021-04-26 03:43:46
【问题描述】:
我的任务是站起来准备我们的生产 Cassandra 集群 (3.11.1)。一切都很好,用压力测试工具加载了几亿条记录,太棒了。然而,在我完成后,我做了一个“DROP KEYSPACE keyspace1;” (压力测试使用的空间)假设这就像 MySQL 并且空间将被清理。
现在我已经运行了 nodetools cleanup、flush、truncatehints、cleansnapshots 以及我能找到的几乎所有其他命令变体。每个节点的磁盘使用量仍然约为 30GB,Cassandra 中似乎没有发生任何事情。
所以#1 - 我如何恢复被现在删除的键空间吸收的磁盘空间?
还有 #2 - 如果这是“错误的方式”,我应该如何删除这些数据?
【问题讨论】:
-
auto_snapshot (Default: true) Enables or disables whether Cassandra takes a snapshot of the data before truncating a keyspace or dropping a table. To prevent data loss, Datastax strongly advises using the default setting. If you set auto_snapshot to false, you lose data on truncation or drop.见the docs