while cassandra is running and compaction is going on,commit logs files are getting deleted when Cassandra process is still using it and due to it inodes are not getting free. please help me how to fix this.
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
The commitlog segments generally get recycled and reused, not deleted, so the inodes for those segments don't get released.
For what it's worth, commitlogs are unrelated to compactions since those are a separate paths. When data is written to Cassandra, they go to the memtables and are persisted to commitlogs temporarily to protect against power outages or a server crash. When a memtable is flushed to disk (there are several ways this gets triggered), the corresponding commitlog segment gets purged of its contents and kept so it can be reused.
If you have commitlog archiving enabled, the commitlogs do not get released until they are archived successfully. You need to check that the archive script is working and that there is free space in the destination directory or the commitlogs will pile up.
Compaction on the other hand is a mechanism by which SSTables are merged and coalesced together into new SSTable files. If you run backups over your regularly, you will need to ensure that you are clearing snapshots you no longer require.
Snapshots create hardlinks to the original inodes. If you don't clear the snapshot, space will not get freed on the data directory since the inode is still in use. I've explained how snapshots are hardlinks work in this post if you're interested. Cheers!
6 People are following this question.