Are requests by keys strongly consistent ?

28 views
Skip to first unread message

Salomon Brys

unread,
Mar 5, 2013, 12:21:59 PM3/5/13
to objectify...@googlegroups.com
Hi there,
I wonder : it is stated in the datastore documentation that only ancestor queries are strongly consistent.
But what about request by key ?

I have noticed that both these lines give the same result :

1/ ofy().load().key(usrKey).get();
2/ ofy().load().type(User.class).ancestor(usrKey).filterKey(usrKey).first().get();

The first is a simple load by key while the second is an ancestor query.

I know (by google's documentation) that the second is strongly consistent, which means that if the entity has just been modified, the result should be the modified, last version.

So what about the load-by-key consistency ?

Thanks ;)
Salomon BRYS


Avatar Salomon BrysSalomon BRYS | Architecte Logiciel | Chief Geek Officer
Kick Your App
80 Rue des Haies - 75020 - Paris, France
+33 9 72 37 17 24 | +33 6 83 54 55 96 
sal...@kickyourapp.com
LinkedinLogo Kick Your App

Jeff Schnitzer

unread,
Mar 5, 2013, 2:23:58 PM3/5/13
to objectify...@googlegroups.com
Just like ancestor queries, load-by-key is strongly consistent as long as you don't set ofy().consistency(Consistency.EVENTUAL).

Jeff


--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages