On Sep 5, 10:24 am, "Jason (Google)" <apija...@google.com> wrote:
> Batch puts are supported, yes, and as of yesterday's release, calling
> makePersistentAll (JDO) and the equivalent JPA call will take advantage of
> this support (previously, you had to use the low-level API).
>
> Two quick notes:
>
> 1) All of the entities that you're persisting should be in separate entity
> groups since two entities in the same entity group can't be written to
> consecutively, and you will see datastore timeout exceptions if many
> simultaneous write requests come in for the same entity or entity group.

Sorry Jason, I'm a bit confused now.  Wouldn't that be the most common
use case for batch puts?  According to the GAE documentation, this is
the main point of entity groups:
  "App Engine creates related entities in entity groups automatically
to support updating related objects together"

...so you can add them together _logically_ but not chronologically?
I've got several cases where I'd have 50,000 to 1000,000 records which
logically belong to a single parent entity.  If I need to add them to
the datastore individually it's going to take about somewhere between
2 to 24 hours to write them all (spread across multiple HTTP requests
in any case).  If I could batch put the data (within the same entity
group) I imagine that the time would be reduced significantly.

> 2) Batch puts do not operate in a transaction. This means that some writes
> may succeed but others may not, so if you need the ability to rollback,
> you'll need transactions.

Do you mean that if necessary, the call to makePersistentAll() should
be wrapped in a transaction, or that makePersistentAll() _can_not_ be
wrapped in a transaction?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to