It's my understanding that, with HR, getting an entity by key is only strongly consistent within a transaction.
If this is wrong, then a significant portion of my own task handling code may need revisiting... Perhaps someone who knows more could clarify this. Tom. On 21 March 2011 22:10, Simon Knott <knott.si...@gmail.com> wrote: > I've got a query about tasks and transactions on a High-replication app that > I'm hoping someone can help me with. > I've got the following scenario: > 1) Begin a transaction > 2) Persist an entity > 3) Enqueue a task within the transaction > 4) Commit the transaction > Within the task, I get the entity via its key and I'm finding that the > object has yet to be updated in the datastore - it was my belief that > getting an entity via its key is strongly consistent, so I was quite > surprised to see that the entity was stale. Is this result expected? I've > got some defensive code in place now which just re-enqueues the task, but I > wasn't sure whether that was the right approach. > I originally had the same issue on the MS version of my app, before I > realised that I needed to enqueue the task within the same transaction to > ensure the persist had occurred before the task was run. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.