[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

相關文章
相關標籤/搜索