在对象化中批量获取/保存的实体数量限制是多少?

What is the limit on the number of entities in case of batch get/ save in objectify?

Objectify 支持批量获取实体,方法是:

ofy().load().type(TestEntity.class).ids(testIdList).now(); 

并使用以下方式批量保存:

ofy().save().entities(testEntityList).now();

我的问题是使用这种方法我们可以获取或保存的实体数量有多少限制?

是否有 objectify/ datastore 指定的任何限制 另外,即使 objectify 或 datastore 没有指定限制,我想由于应用引擎中每个请求的 60 秒超时,我想会有实际限制?

实体大小设置的限制:

  • Maximum size for an entity 1,048,572 bytes (1 MiB - 4 bytes)

和实体组:

  • Maximum number of entity groups that can be accessed in a transaction 25

  • Maximum write rate to an entity group 1 per sec

请参阅 Google 云数据存储文档中的 limits 列表。

Objectify wiki 也指这些限制:

@Load and Transactions

The datastore limits you to 25 entity groups in a single transaction....

假设您不在交易中,唯一的限制应该是 60 秒的请求截止日期和实体占用的 RAM 量(F1 实例相当紧张)。