gpt4 book ai didi

Cassandra Drop 键空间快照清理

转载 作者:行者123 更新时间:2023-12-04 15:53:35 24 4
gpt4 key购买 nike

在 Cassandra 文档中读到:

Cassandra takes a snapshot of the keyspace before dropping it. In Cassandra 2.0.4 and earlier, the user was responsible for removing the snapshot manually.



https://docs.datastax.com/en/cql/3.1/cql/cql_reference/drop_keyspace_r.html

这意味着在 Cassandra 2.0.4 之后的版本中,这是自动完成的。如果是这样,在执行 DROP KEYSPACE 时,什么配置参数(如果有)设置快照自动删除之前的时间?

例如,在 DROP TABLE 的情况下,gc_grace_seconds 是

the number of seconds after data is marked with a tombstone (deletion marker) before it is eligible for garbage-collection.

最佳答案

我相信这个引用是不准确的,Cassandra 不会自动为你清理快照。

Cassandra won’t clean up the snapshots for you



http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html#snapshot-before-compaction

您可以使用 nodetool clearsnapshot 删除快照命令,或自己手动删除目录和文件(这是安全的,因为快照只是文件 hard-links )。

另请注意 gc_grace_seconds与快照无关,它仅在压缩期间使用。

关于Cassandra Drop 键空间快照清理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41062782/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com