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