本文介绍了GAE:等待最终一致性需要多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,用于创建大量实体。我不想把他们放在同一个实体小组中,因为我可能会在很短的时间内创造出很多 - 例如24小时内就有100万人。




$ b

  Foo.all()在某些情况下,我想要使用这样的查询来获取所有这些实体: 

创建最后一个Foo实体后,需要等待多长时间才能获得全部的Foo实体与这个查询?



编辑:



从,似乎我不能马上获得我所有的实体。我很高兴知道我应该等多久。

解决方案

除了相当昂贵的整个事情,你将能够立即获取所有实体。注意,遍历数百万个实体需要使用Tasks,如果这还不够,因为它们的截止时间为10分钟,您应该考虑使用。


I have an app where I am creating a large number of entities. I don't want to put them in the same entity group, because I could be creating a lot of them in a short period of time -- say 1 million in 24 hours.

At certain points, I want to get all of these entities with a query like this:

Foo.all()

How long do I need to wait after the last Foo entity is created to be highly likely to get all of the Foo entities with this query?

EDIT:

From this question, it seems that I can't get all my entities right away. Would be great to know how long I should wait.

解决方案

Other than being quite expensive the whole thing, you will be able to get all your entities right away.

Note that iterating through millions of entities will require to use Tasks and if that is not enough, since they have a deadline of 10 minutes, you should consider using Backends.

这篇关于GAE:等待最终一致性需要多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 15:53