Hi Sylvain, In a lot of situations, the correct behavior in a datastore timeout is to simply retry the operation. You're right that in a situation where you have to insert many records in different entity groups, either retrying or rolling back can be complicated. Bear in mind, though, that even if you explicitly handle this, since you have no guarantee of atomicity outside a transaction, there's always the possibility that you will encounter concurrency issues, or that your script will terminate without completing for one reason or another. If this is problematic in your application, you need to have other measures - such as keeping a transaction journal in the datastore - to allow you to complete or roll back updates from failed scripts.
I agree that an article detailing how to deal with this would be useful. Since the area is quite a complex one, there's a lot to cover. We do accept articles from third parties, if you'd like to write one. ;) On Apr 15, 2:18 pm, Sylvain <[email protected]> wrote: > Hi, > > Currently, I think 0.5% of my Datastore operations result in a > datastore timeout. > I don't know why... It can be raised on very simple or very > complicated operation. > > For my app for example, the problem is that it can occur during a big > request where I need to create 50-100 entities of 3 different kinds. > So I need to manually rollback everything and it can be difficult. > > Having a "big" transaction could be a solution, but GAE it too limited > (only 1 kind,....). > > It seems that datastore timeout will always be there and we have to > manage them. So I think we need an article that explains how to handle > them properly with different scenarios. It will be very appreciated. > > Regards. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
