I have noticed that batch datastore calls run within a single transaction.
The maximum number of entities that can be added or deleted (and probably
modified, though I have not tried) was 500. I'm betting you could probably
wrap them around a single transaction. Though, from my experience, I
wouldn't really recommend doing this (since trying to commit two batches of
500 to the datastore within the same call tended to time out for me).

Also, don't confuse transactional tasks with the task queue. Transactional
tasks are the those that will all happen simultaneously or will graciously
fail without any partial commits. Due to the implementation details you
probably want to avoid intentionally doing lots of transaction updates on
the same few objects, since it is possible (if you are kicking lots of
simultaneous jobs off with the task queue) to shoot yourself in the foot and
have a very small success rate.

Transactions work with the task queue in such a way that the task will only
be added to the queue if no other piece of your commits fail. For example,
you wouldn't really want your app to run the "new user" code if you couldn't
create the new user account for that user because someone else registered
that user name at the same time. I.E. Things on the task queue do not
continue running within the same transaction if they were created within
one.

On Wed, Jul 7, 2010 at 4:22 AM, hawkett <hawk...@gmail.com> wrote:

> Hi,
>
>   This page -
> http://code.google.com/appengine/docs/python/datastore/transactions.html
> - says that we cannot raise more than 5 transactional tasks in a
> single transaction, and I wanted to check if this was a limit that you
> were hoping to raise, or if this is likely to be a long term
> restriction?  Does this restriction limit API calls to the task queue
> or actual number of tasks -  e.g. could I raise more than 5 by doing
> them in batch with a single call to the task queue API? Cheers,
>
> Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to