Amerdrix
Amerdrix

Reputation: 143

High replication datastore consistency across instances

A pretty simple question really. Are queries consistent across instances?

I understand that with the following query, I may miss some newly put entities.

messages = Message.all().filter('user =', current_user).fetch(20)

However, is it safe to assume that once an entities is returned from this query, it will always be returned by it (ignoring the fact that it may not be in the first 20)?

If so, does it extend to other queries of the same entity (using a different index)

messages = Message.all().filter('user =', current_user)
                        .filter('posted >', old_date) .fetch(20)

Upvotes: 3

Views: 154

Answers (1)

Nick Johnson
Nick Johnson

Reputation: 101149

What instance you do an operation from has absolutely no effect on the result - all instances query the same set of datastore servers.

Once a new entity (or a modification to an entity) shows up in a query result, you can assume that it will do so for all future executions of that query. That does not imply that the entity will show up for different queries that should include it yet, though.

Upvotes: 3

Related Questions