I think I've seen this question somewhere else, but I've searched and
can't seem to find it, so I apologize in advance is this is a
duplicate.

I'm using the datastore low-level API to do a batch put via
DatastoreService.put(Iterable<Entity>). Some questions related to this
method:

  1. If this method succeeds (does not throw an exception) does that
guarantee that all entities were written to the datastore
successfully?

  2. If this method fails (throws a DatastoreFailureException) does
that mean that none of the entities were written, or that some were
and some weren't? If the latter, is there any way to know which
entities were successfully written and which weren't?

  3. If I invoke DatastoreService.put(Transaction, Iterable<Entity>)
and it throws a DatastoreFailureException, does invoking
Transaction.rollback() guarantee that none of the entities are written
to the datastore? (I'm pretty sure the answer to this one must be
"yes").

When doing a batch put, I need to be able to guarantee that all
entities are either written, or all not written. I think the best way
is to use a transaction, but thought I'd ask to make sure my
understanding of how this works is correct. Thanks.

--~--~---------~--~----~------------~-------~--~----~
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 [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-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to