简体   繁体   中英

Cassandra Drop Keyspace Snapshot Cleaning

Was reading in Cassandra Documentation that:

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

This would imply that in versions after Cassandra 2.0.4, this is done automatically. If so, what configuration parameter (if any) sets the time before snapshot is automatically removed when doing a DROP KEYSPACE?

For example, in the case of DROP TABLE, gc_grace_seconds is

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

I believe this reference is not accurate, Cassandra does not automatically clean up snapshots for you.

Cassandra won't clean up the snapshots for you

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

You can remove snapshots using the nodetool clearsnapshot command, or manually delete the directories & files yourself (this is safe as snapshots are just file hard-links ).

Note also that gc_grace_seconds is not related to snapshots, it is used during compactions only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM