WARN : “Mutation of xxx bytes is too large for the maximum size of xxx”

Share us

 

In this blog post, we will explain the error of “Mutation of xxx bytes is too large for the maximum size of xxx”.

Recently, we encountered an error(WARN) “Mutation of 17156436 bytes is too large for the maximum size of 16777216”.

To understand the above error, we should know what is mutation in Cassandra, what’s the maximum size etc.

Mutation:- A Mutation is either an insert (represented by filling column_or_supercolumn) or a deletion (represented by filling the deletion attribute).
@param column_or_supercolumn:- An insert to a column or supercolumn (possibly counter column or supercolumn)
@param deletion:- A deletion of a column or supercolumn

Reference- Check the Cassandra directory- apache-cassandra-2.1.1/interface/cassandra.thrift

Now, let’s come to our error which we caught.

Above WARN(error) come, when we try to write a segment which is more than half of commitlog_segment_size_in_mb. If we use unlogged batch on the same partition, it can be consider as one mutation, even it has hundreds/thousand of changes.

We need to debug why are we creating such a big mutation. We may need to check the data model, we may have large number of elements in collection or big text.

Reference-

https://stackoverflow.com/questions/58816451/how-write-in-cassandra-works-in-terms-of-commitlog-segment-size-in-mb

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.