user1717817
user1717817

Reputation:

is google appengine datastore.get(key) consistent?

I've read the consistency page on

https://cloud.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency

now i know that for queries to be consistent you need to use ancestor queries.

What about single key? query for example:

Entity e = datastore.get(Key)

are they eventually consistent or strongly consistent? please do cite references or links

Upvotes: 1

Views: 218

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599490

Yes, a get with a specific key is always consistent.

The documentation isn't as clear about this as it could be, but a get is not a query: it's a simple lookup in what is basically a key-value store. That will always return the correct data. It is only queries that can be inconsistent, because they must be done against indexes and the index update can lag.

The only reference I can give you is to point out that get is discussed on the Entities, Properties and Keys page whereas data consistency is discussed on the Datastore Queries page.

Upvotes: 2

Related Questions