What version of Cassandra are you running? There is a bug in 3.10.0 and certain 3.0.x that occurs in certain conditions and corrupts that file.
Hannu > Vitali Dyachuk <vdjat...@gmail.com> kirjoitti 25.7.2018 kello 10.48: > > Hi, > I have noticed in the cassandra system.log that there is some issue with > sstable metadata, the messages says: > WARN [Thread-6] 2018-07-25 07:12:47,928 SSTableReader.java:249 - Reading > cardinality from Statistics.db failed for > /opt/data/disk5/data/keyspace/table/mc-big-Data.db > Although there is no such file. The message has appeared after i've changed > the compaction strategy from SizeTiered to Leveled. > Currently i'm running nodetool scrub to rebuilt the sstable, and it takes a > lot of time to scrub all sstables. > Reading the code it is said that if this metada is broken, then estimating > the keys will be done using index summary. How expensive it is ? > https://github.com/apache/cassandra/blob/cassandra-3.0.15/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java#L245 > > The main question is why has this happened? > > Thanks, > Vitali Djatsuk.