简体   繁体   English

数据存储模式下 Cloud Firestore 上的全局非事务查询是否高度一致?

[英]Are global non-transaction queries strongly consistent on Cloud Firestore in Datastore Mode?

The following docs page claims:以下文档页面声称:

Eventual consistency: Datastore queries become strongly consistent unless you explicitly request eventual consistency.最终一致性:除非您明确请求最终一致性,否则数据存储查询将变得高度一致。

https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode

But the following docs page seems to say that maybe global non-transactional queries are not strongly consistent:但是以下文档页面似乎说全局非事务查询可能不是强一致的:

The non-transactional read consistency to use.要使用的非事务性读取一致性。 Cannot be set to STRONG for global queries.对于全局查询,不能设置为 STRONG。

https://cloud.google.com/datastore/docs/reference/data/rpc/google.datastore.v1#readoptions https://cloud.google.com/datastore/docs/reference/data/rpc/google.datastore.v1#readoptions

What's the correct way to understand this?理解这一点的正确方法是什么? For example, is an entity is deleted outside a transaction, is it possible for a separate non-transactional query to return that entity afterwards?例如,是否在事务之外删除了一个实体,是否有可能在之后单独的非事务查询返回该实体?

Looks like the docs could use an update, from your second link "For Cloud Firestore in Datastore mode, if read_consistency is not specified then lookups and all queries default to read_consistency=STRONG.".看起来文档可以使用更新,来自您的第二个链接“对于 Datastore 模式下的 Cloud Firestore,如果未指定 read_consistency,则查找和所有查询默认为 read_consistency=STRONG。”。 Queries are strongly consistent for Firestore in Datastore mode unless explicitly requested otherwise.除非另有明确要求,否则查询对于 Datastore 模式下的 Firestore 具有很强的一致性。

So if you delete an entity, then start a query that would have matched the deleted entity, the entity will not be returned.因此,如果您删除一个实体,然后启动一个与已删除实体匹配的查询,则不会返回该实体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Datastore 模式下的 Firestore 似乎没有强一致性 - Firestore in Datastore mode does not seem to be strongly consistent 如果与Google Cloud Datastore中的其他查询结合使用,祖先路径查询是否具有高度一致性? - Are ancestor path queries strongly consistent if combined with other queries in the Google Cloud Datastore? google cloud firestore datastore模式下实体组对事务的影响 - The effect of entity group on transaction in google cloud firestore in datastore mode 从 Java 以 DataStore 模式连接到 Cloud Firestore - Connect to Cloud Firestore in DataStore mode from Java Cloud Firestore在数据存储模式下的转换问题 - Cloud Firestore in datastore mode conversion questions Cloud Firestore相当于AppEngine / Datastore Memcache和Keys-only查询? - Cloud Firestore equivalent of AppEngine/Datastore Memcache and Keys-only queries? 数据存储模式下的Cloud Firestore-不再需要分片计数器吗? - Cloud Firestore in Datastore Mode - Are sharded counters not going to be needed anymore? 创建一致的Cloud Datastore备份 - Creating consistent Cloud Datastore backup 数据存储模拟器返回“事务内部只允许祖先查询”。 它不支持 Datastore 模式下的 Firestore 吗? - Datastore emulator returns 'Only ancestor queries are allowed inside transactions’. Doesn't it support Firestore in Datastore mode? 云数据存储事务吞吐量 - cloud datastore transaction throughput
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM