[Cassandra] Mutation of <x> bytes is too large for the maxiumum size of <y>

[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 16777216

A:

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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Apache Cassandra is a massively scalable, peer-to-peer database designed for 100 percent uptime, with deployments in the tens of thousands of nodes, all supporting petabytes of data. This book offers a practical insight into building highly available, real-world applications using Apache Cassandra. The book starts with the fundamentals, helping you to understand how Apache Cassandra’s architecture allows it to achieve 100 percent uptime when other systems struggle to do so. You’ll get an excellent understanding of data distribution, replication, and Cassandra’s highly tunable consistency model. Then we take an in-depth look at Cassandra’s robust support for multiple data centers, and you’ll see how to scale out a cluster. Next, the book explores the domain of application design, with chapters discussing the native driver and data modeling. Lastly, you’ll find out how to steer clear of common anti-patterns and take advantage of Cassandra’s ability to fail gracefully. What you will learn Understand how the core architecture of Cassandra enables highly available applications Use replication and tunable consistency levels to balance consistency, availability, and performance Set up multiple data centers to enable failover, load balancing, and geographic distribution Add capacity to your cluster with zero downtime Take advantage of high availability features in the native driver Create data models that scale well and maximize availability Understand common anti-patterns so you can avoid them Keep your system working well even during failure scenarios

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值