question

mohit1234 avatar image
mohit1234 asked Erick Ramirez edited

How do I remove SSTable data along with DROP KEYSPACE?

HI Team,

I have removed keyspace my_dev_ks using query drop keyspace my_dev_ks;
But i can see sstable data is still present for this keyspace.

After some time created keyspace with same name and schema now i can see keyspace data has two folder for each table exist in my_dev_ks.

could you please guide me how can we remove unwanted data or any other way to remove data along with drop keyspace to avoid excessive data usage.

maintenance
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

starlord avatar image
starlord answered

You may find that you have auto_snapshot set to true in the cassandra.yaml, and it's true by default, so when you drop a keyspace you'll be left with a snapshot of the data that will hang around indefinitely as a safeguard.

If the keyspace is definitely not needed, you can simply manually delete the old keyspace's data directory, just be sure you don't remove any needed data. Compare the timestamps of the sstables to be sure the newly created data dir isn't removed.

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.