[Cassandra] Mutation of bytes is too large for the maxiumum size of

[Cassandra] Mutation of bytes is too large for the maxiumum size of

Q:

WARN [SharedPool-Worker-4] 2015-11-28 20:04:44,663 AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread Thread[SharedPool-Worker-4,5,main]: {} java.lang.IllegalArgumentException: Mutation of 28087887 bytes is too large for the maxiumum size of 16777216java

A:

简单讲是因为Cassandra发现你一次提交的数据太大了,也就是超过commitlog_segment_size_in_mb大小的50%,这个配置的默认值是32MB,若是一次提交的数据超过16MB就会出现这样的问题,尤为是经过batch提交大量数据时。这样作的目的是避免是做为一种保护措施,避免程序Bug致使数据破坏或者对系统形成不良影响。设计

解决方法之一是修改默认的commitlog_segment_size_in_mb大小,这样作其实不推荐,由于这样违背了设计的初衷,16MB的数据做为一个提交单元已经不小了。
更好的方式是去排查为何会一次提交这么多数据,若是肯定没问题,那么请分批提交这些数据。code

相关文章
相关标签/搜索