Now I observed some errors on my Cassandra system.log/debug.log and node was sudden DOWN after below errors.
CorruptSSTableException as value length exceeds the maximum of 287435456, which is set via max_value_size_in_mb in cassandra.yaml
While going through this value in Cassandra documentations found :-
max_value_size_in_mb This option is commented out by default. Maximum size of any value in SSTables. Safety measure to detect SSTable corruption early. Any value size larger than this threshold will result into marking an SSTable as corrupted. This should be positive and less than 2048. Default Value: 256
In my case also this value is default which is 256. But my questions is :-
1)What does it mean by this value? Is it max size of any SStables ? 2)Why node was down after exceeding this value or after this error ?
Thanks in advance!
What does it mean by this value?
That either there is a Row in your database file (one of SSTables) larger than allowed maximum size or the SSTable file is corrupted because the metadata contains values (row size) that exceed reasonable limits.
Is it max size of any SStables?
It is maximum allowed size of any Value (Row) (Single piece of data) (Key/Value pair) (Tuple) in the SSTable (part of a table).
Note 1: SSTable is a storage format of data for the database. It just sorted strings (rows). Usually, a table consists of a set of sstable files that contain different parts of data.
Note 2: How a table row can look like on disk? :
Row [ Len: uint64_t, Data: char[Len] ]
Len must be < max_value_size_in_mb (256MB by default)
Why node was down after exceeding this value or after this error ?
I don't know exactly whether a node shuts down if it finds out corrupted sstable. It could just mark it as corrupted and ignore it since then. Thus, it may be not related.
Basically, if there 1 of your sstables is corrupted, then you either lose data or may see previous versions or deleted rows. So, from the perspective of consistency, it is not a very good idea to allow client to interact with a broken table. But behavior depends on the database.