简体   繁体   English

google appengine datastore.get(key)是否一致?

[英]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.

相关问题 Java Google Appengine datastore.get在现有实体上引发EntityNotFoundException - Java Google appengine datastore.get throws EntityNotFoundException on an existing entity 在REST中使用Google Appengine datastore.key时出错 - Error using google appengine datastore.key with REST 更改AppEngine数据存储主键 - Change AppEngine DataStore Primary Key Google Appengine数据存储超时异常 - Google Appengine Datastore Timeout Exception Google AppEngine:了解数据存储区交易 - Google AppEngine: understanding datastore transactions Google Appengine-ID为“ com.google.appengine.api.datastore.Key:Product(“ Potatoe”)”的对象由其他对象管理器管理 - Google Appengine - Object with id “com.google.appengine.api.datastore.Key:Product(”Potatoe“)” is managed by a different Object Manager 如何在Google App Engine _ah / api / explorer中创建com.google.appengine.api.datastore.Key对象? - How to create the com.google.appengine.api.datastore.Key object in the Google App Engine _ah/api/explorer? 从字符串生成密钥(com.google.appengine.api.datastore.Key) - Generating a Key (com.google.appengine.api.datastore.Key) from string App Engine JDO Persistent类从com.google.appengine.api.datastore.Key迁移到Long - App Engine JDO Persistent class migrate from com.google.appengine.api.datastore.Key to Long 如何使用Java确定Google AppEngine数据存储区中给定键的对象是否存在? - How to I determine if an object exists for a given key in the Google AppEngine datastore using Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM