Data Consistency in Cloud Datastore Queries

Data consistency levels

Google Cloud Datastore queries can deliver their results at either of two consistency levels:

In an eventually consistent query, the indexes used to gather the results are also accessed with eventual consistency. Consequently, such queries may sometimes return entities that no longer match the original query criteria, while strongly consistent queries are always transactionally consistent. See the article Transaction Isolation in App Engine for more information on how entities and indexes are updated.

Cloud Datastore query data consistency

Queries return their results with different levels of consistency guarantee, depending on the nature of the query:

  • Ancestor queries (those within an entity group) are strongly consistent by default, but can instead be made eventually consistent by setting the Cloud Datastore read policy (see below).
  • Non-ancestor queries are always eventually consistent.

What's next?

Send feedback about...

App Engine standard environment for Go