Google App Engine - " java.lang.IllegalArgumentException:数据存储事务或写入太大。“ [英] Google App Engine - "java.lang.IllegalArgumentException: datastore transaction or write too big."

查看:151
本文介绍了Google App Engine - " java.lang.IllegalArgumentException:数据存储事务或写入太大。“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用400个键调用DatastoreService.delete(keys)时,我得到这个异常:



java.lang.IllegalArgumentException:数据存储事务或写入太大。

我认为批量删除的限制是500,所以我远低于限制。我在这里丢失了什么?



谢谢,
Keyur

解决方案

看起来您正在达到投放和删除的整体尺寸限制。批量放入和删除有500个实体的限制是正确的,但总体大小限制大约为10MB。我不知道这是否有记录,但我会检查并让它们添加它,如果没有。



因此,请尝试减少每次删除调用的实体数量。 / p>

如果您想深入挖掘,放入或删除的大小取决于超出单个实体大小的许多因素,例如需要更新的索引行的大小。它通常也基于更新本身的增量大小,而不是现有实体的大小。这意味着它并不总是直观或容易计算。但这些文章可以提供帮助:

http://code.google.com/appengine/articles/storage_breakdown.html

http://code.google.com/appengine/articles/life_of_write.html


When calling DatastoreService.delete(keys) with 400 keys, I'm get this exception:

java.lang.IllegalArgumentException: datastore transaction or write too big.

I thought the limit on batch deletes was 500 so I am well under the limit. Am I missing something here?

Thanks, Keyur

解决方案

it looks like you're hitting the overall size limit for puts and deletes. you're right that batch puts and deletes have a limit of 500 entities, but there's also an overall size limit of roughly 10MB. i'm not sure if that's documented, but i'll check and have them add it if not.

so, try reducing the number of entities per delete call.

if you want to dig deeper, the size of a put or delete depends on many factors beyond the size of the individual entities, e.g. the size of the index rows that need to be updated. it's also generally based on the delta size of the update itself, not the size of the existing entities. this means it's not always intuitive or easy to calculate. these articles can help though:

http://code.google.com/appengine/articles/storage_breakdown.html
http://code.google.com/appengine/articles/life_of_write.html

这篇关于Google App Engine - " java.lang.IllegalArgumentException:数据存储事务或写入太大。“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆