[google-appengine] Re: Transaction not Atomic

2010-04-24 Thread Felix E. Klee
On Apr 24, 12:12 am, Baz wrote: > What was the conflict? As I said before, there is code that does not run in a transaction, but that should. Here is what I assume causes the problem. There are two functions, f() and g(). f() modifies the data store in a consistent way, using a transaction. g()

Re: [google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Baz
What was the conflict? On Fri, Apr 23, 2010 at 3:01 PM, Felix E. Klee wrote: > Solved! Looks like I found the error: That possibly conflicting code > does *not* run in a transaction, and it should. > > I'm glad that it's indeed me who is the idiot. ;-) > > -- > You received this message because

[google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Felix E. Klee
Solved! Looks like I found the error: That possibly conflicting code does *not* run in a transaction, and it should. I'm glad that it's indeed me who is the idiot. ;-) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group,

[google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Felix E. Klee
On Apr 23, 11:51 pm, "Felix E. Klee" wrote: > since any conflicting > transaction can only be one that reads from the data store. Sorry, that's wrong. There could be a conflicting transaction that writes to the data store. Still, I have no clue why the parent version number is decreased or rever

[google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Felix E. Klee
I found something interesting: 1. The transaction is indeed atomic, as expected. So it does add the child and increase the parent version number. I saw this in the logs: I had added debug output that shows the version number immediately after the transaction finished. 2. However, at some point so

[google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Felix E. Klee
> Do you fetch the self.data_version entity inside the transaction or > outside of it? Inside, of course. The code I posted is run as part of the transaction. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send emai

Re: [google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Ulrich
Felix E. Klee wrote: On Apr 23, 4:13 pm, Andi Albrecht wrote: Are you sure that you're not working on a parent model, that's somehow cached and therefore out-dated when you start one of those "non-atomic" transactions? That's the code that's used to increase the parent version: sel

[google-appengine] Re: Transaction not Atomic

2010-04-23 Thread Felix E. Klee
On Apr 23, 4:13 pm, Andi Albrecht wrote: > Are you sure that you're not working on a parent model, that's somehow > cached and therefore out-dated when you start one of those > "non-atomic" transactions? That's the code that's used to increase the parent version: self.data_version = str(int(se