Consistency and queries
There are three methods to query entities in Datastore: key queries, ancestor queries, and global queries. Key queries are direct entity lookups by key. Ancestor queries are queries that return either ancestor or descendant entities from a given entity key. Lastly, global queries are queries that work on indexes such as entity properties, kinds, and custom indexes.
Because entities within entity groups undergo shared transactions, key queries and ancestor queries are strongly consistent. Global queries on the other hand are inherently eventually consistent. This has important implications in how applications are designed to interact with Datastore.
For example, if an application must query all entities of a specific ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access