[英]is google appengine datastore.get(key) consistent?
I've read the consistency page on 我已阅读以下内容的一致性页面
https://cloud.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency https://cloud.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency
now i know that for queries to be consistent you need to use ancestor queries. 现在我知道,要使查询保持一致,就需要使用祖先查询。
What about single key? 单键呢? query for example:
查询例如:
Entity e = datastore.get(Key) 实体e = datastore.get(Key)
are they eventually consistent or strongly consistent? 他们最终是一致还是强烈一致? please do cite references or links
请引用引用或链接
Yes, a get with a specific key is always consistent. 是的,使用特定密钥进行的获取始终是一致的。
The documentation isn't as clear about this as it could be, but a get is not a query: it's a simple lookup in what is basically a key-value store. 该文档对此并不十分清楚,但是get并不是查询:这是对基本上是键值存储的简单查询。 That will always return the correct data.
那将总是返回正确的数据。 It is only queries that can be inconsistent, because they must be done against indexes and the index update can lag.
只是查询可能不一致,因为它们必须针对索引执行,并且索引更新可能会滞后。
The only reference I can give you is to point out that get is discussed on the Entities, Properties and Keys page whereas data consistency is discussed on the Datastore Queries page . 我唯一可以提供的参考是指出,在“ 实体,属性和键”页面上讨论了get ,而在“ 数据存储区查询”页面上讨论了数据一致性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.