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

Viewed 29

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

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.

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?

1 Answers

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.". Queries are strongly consistent for Firestore in Datastore mode unless explicitly requested otherwise.

So if you delete an entity, then start a query that would have matched the deleted entity, the entity will not be returned.

Related