Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



graham.robertson_178283 avatar image
graham.robertson_178283 asked Erick Ramirez edited

What is the safest way to remove redundant *-data.db files?

Looking for advice on this one, we have a number of redundant data.db and other files that are outwith the TTL period taking up excess space, what would be the safest way to remove these without causing disruption to the main db itself

1 comment
10 |1000

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

Generally speaking the older data files should be compacted away. If they are still hanging around chances are they still have live data and / or are not eligible for compaction. Perhaps you could include your schema for this table in your questions to facilitate a more directed answer?

0 Likes 0 ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered graham.robertson_178283 commented

@graham.robertson_178283 SSTables are not necessarily redundant despite being older than the table's default TTL. There are various reasons why data files hang around. As an example, SizeTieredCompactionStrategy will only compact similarly-sized SSTables (4 by default) together. Generally, older SSTables are larger and takes a while before they end up with compaction "partners".

We recommend that you let normal compaction operations to deal with the SSTables and that you don't manually delete them from the filesystem. If you're dealing with a really large STCS SSTable and you don't want to wait (server is running out of space, for example), you might be interested in this KB article I wrote -- FAQ - How to split large SSTables on another server. Cheers!

1 comment 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.

@Erick Ramirez this is perfect thank you for responding

0 Likes 0 ·