是否有实体组最大尺寸? [英] Is there an Entity Group Max Size?

查看:74
本文介绍了是否有实体组最大尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代表付款方式的实体。我希望为使用该付款方式执行的所有付款尝试创建一个实体组。

每秒1次写入限制没有问题,并且对我的用例来说确实很好,因为没有理由更频繁地为特定信用卡收费,但我找不到实体组的最大大小的任何规格。

我担心的是,一个非常活跃的公司账户会在实体组内的记录数量方面遇到任何限制(当他们与我们进行第100万笔交易时) / p>

解决方案

不,实体组大小没有限制,所有与数据存储相关的限制记录在限制



但请注意,涉及数据争用的实体组大小很重要,请参阅保持实体组很小。请注意,争用不仅发生在编写实体时,而且在事务内部读取它们时(参见 Google App Engine中的争用问题),或者偶尔甚至可能是外部事务(请参阅 GAE上的TransactionFailedError)。

恕我直言,你的使用案例不值得处理这些问题的风险(相当难以调试和解决),在这种情况下我不会使用单个实体组。


I have an Entity that represents a Payment Method. I want to have an entity group for all the payment attempts performed with that payment method.

The 1 write-per-second limitation is fine and actually good for my use case, as there is no good reason to charge a specific credit card more frequently than that, but I could not find any specifications on the max size of an entity group.

My concern is would a very active corporate account hit any limitations in terms of number of records within an entity group (when they perform their 1 millionth transaction with us)?

解决方案

No, there isn't a limit for the entity group size, all datastore-related limits are documented at Limits.

But be aware that the entity group size matters when it comes to data contention, see Keep entity groups small. Please note that contention is not only happening when writing entities, but also when reading them inside transaction (see Contention problems in Google App Engine) or, occasionally, maybe even outside transactions (see TransactionFailedError on GAE when no transaction).

IMHO your usage case is not worth the risk of dealing with these issues (fairly difficult to debug and address), I wouldn't use a single entity group in this case.

这篇关于是否有实体组最大尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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