Search code examples
cassandradatastax-enterprise

manually removing sstables and associated files


Anyone know if removing a particular sstable and its associated files (while cassandra is up and running) is problematic? You may ask why would someone do such a thing? In short, the sstable was created before the application changed to provide ttl with the data (so all records in that sstable are essentially expired by the business rules (older than 15 days), but without any ttl forcing it to do so. We're using Time Window Compaction Strategy so that sstable will never get dropped (as it's 0% droppable). So I'm wondering if I can simply remove it myself (while it's running). The other option is performing deletes followed by manual compactions to clean things up). Thoughts?

dse version is 5.1 (cassandra 3.11)


Solution

  • If you are allowed to restart the node (this is usually fine, Cassandra focuses on high availability, and temporary unavailability of a single node is its bread and butter), the safest thing would be to shut down Cassandra on one node, delete the sstable (while Cassandra is not running; don't forget to delete all of the sstable's files), and start Cassandra up again.