Thanks for the suggestions. It's not an eventual consistency issue,
and I get datastore timeout exceptions so there can't be a blind try-
except. The code does a put() for one or more entities inside
run_in_transaction(), then does a raw put() for another entity. Here's
the simplified code:
logItems=''
for id in ids:
db.run_in_transaction(updateEntity,id,newTime)
logItems+=rh.logItem('B',newTime)
entity2.log+=logItems
entity2.put()
The put() in updateEntity() works, the entity2 put() fails without an
exception. The only reason I know this is that when I compare the log
data in entity2 it doesn't match the data in the updated entities.
This only happens once per 10,000 times, and I was lucky to catch two
recent cases - the time logged by the successful updateEntity() call
corresponding to the missing entity2 entry exactly matches the
"Transaction collision. Retying..." warning in the logs in both cases.
There are a few questions this raises:
1. I have assumed that the "Transaction collision. Retying..." warning
is caused by the updateEntity(), because it's in a
run_in_transaction(). But given the entity2.put() is the one failing,
perhaps that is the source? Can you get transaction collision warnings
from non-transactional put()s?
2. Surely no matter what I should get an exception if the
entity2.put() fails?
Thanks again for your help with this.
Greg.
> > For more options, visit this group athttp://
groups.google.com/group/google-appengine?hl=en.