I&#39;ve tried to reproduce the behaviour in a simple test app but I haven&#39;t had any luck yet.  I&#39;m not sure exactly what pattern of requests produces the failure in the real app, but I&#39;ll add some debugging trace to try and work it out.<br>
<br>Cheers,<br>Mike<br><br><div class="gmail_quote">On 2 February 2010 12:33, Sebastian Ware <span dir="ltr">&lt;<a href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I allways recomened setting a breakpoint and stepping through the code. A lot of Grok stuff has explained itself in interactive sessions.<br>
<br>
Mvh Sebastian<br>
0707- 577 858<br>
<br>
<a href="http://www.urbantalk.se" target="_blank">http://www.urbantalk.se</a><br>
<br>
<br>
<br>
<br>
2 feb 2010 kl. 12.40 skrev Mike Bell:<div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Sebastian,<br>
<br>
Thanks for the reply.<br>
<br>
I&#39;m not interfacing with MySQL at all - for this project I am using only the ZODB to store data.<br>
<br>
I&#39;m fairly confident that what happens is the object (subclass of grok.Model) is committed to the database in the state that it was in when it was first added to a Container.  I don&#39;t think any other changes (to that object or other objects) are committed at all.  I will try and write a script that reproduces the problem this evening.<br>

<br>
Cheers,<br>
Mike<br>
<br>
2010/2/2 Sebastian Ware &lt;<a href="mailto:sebastian@urbantalk.se" target="_blank">sebastian@urbantalk.se</a>&gt;<br>
If the request fails all changes should revert. How are you interfacing MySQL? If you are doing this through your own code, that could explain why db-writes don&#39;t honor the transaction rollback.<br>
<br>
Mvh Sebastian<br>
<br>
<br>
2 feb 2010 kl. 00.47 skrev <a href="mailto:grok-dev-owner@zope.org" target="_blank">grok-dev-owner@zope.org</a>:<br>
<br>
As list administrator, your authorization is requested for the<br>
following mailing list posting:<br>
<br>
  List:    <a href="mailto:Grok-dev@zope.org" target="_blank">Grok-dev@zope.org</a><br>
  From:    <a href="mailto:mdb036@googlemail.com" target="_blank">mdb036@googlemail.com</a><br>
  Subject: Transactions and competing writes/reads warnings<br>
  Reason:  Post to moderated list<br>
<br>
At your convenience, visit:<br>
<br>
  <a href="https://mail.zope.org/mailman/admindb/grok-dev" target="_blank">https://mail.zope.org/mailman/admindb/grok-dev</a><br>
<br>
to approve or deny the request.<br>
<br>
Från: Mike Bell &lt;<a href="mailto:mdb036@googlemail.com" target="_blank">mdb036@googlemail.com</a>&gt;<br>
Datum: ti 2 feb 2010 00.47.15 GMT+01:00<br>
Till: <a href="mailto:grok-dev@zope.org" target="_blank">grok-dev@zope.org</a><br>
Ämne: Transactions and competing writes/reads warnings<br>
<br>
<br>
Hi,<br>
<br>
I&#39;m new to grok and zope, but learning fast - it looks like a neat environment for putting together apps quickly and fairly cleanly (compared to php &amp; mysql, which I&#39;ve been using up til now).  I&#39;ve created an app (it&#39;s going to be a facebook game) that seems to generally be working fairly well, but today I hit this warning from zope:<br>

<br>
2010-02-01T13:35:01 WARNING ZopePublication Competing writes/reads at /iridium/galaxy: database conflict error (oid 0x1446, class iridium.player.Player)<br>
<br>
After this it appears that some but not all of the changes made by a single request have been committed to Zope, leaving an object in an inconsistent state.  It looks like the inconsistent object was created during the request that failed due to the warning, but a modification made to that object during processing that same request was not committed to the database.<br>

<br>
My understanding was that all changes made in a single HTTP request are committed as a single transaction, but that doesn&#39;t seem to have worked here.  Do conflicts like this need to be handled in a special way - if so, how do I catch them?  I can&#39;t seem to find any details about how grok uses transactions in the documentation.<br>

<br>
Any hints would be much appreciated!<br>
<br>
Thanks,<br>
Mike<br>
<br>
<br>
<br>
Från: <a href="mailto:grok-dev-request@zope.org" target="_blank">grok-dev-request@zope.org</a><br>
Ämne: confirm 11cb368a852a113c8f27fc0f7178e213afc82422<br>
<br>
<br>
If you reply to this message, keeping the Subject: header intact,<br>
Mailman will discard the held message.  Do this if the message is<br>
spam.  If you reply to this message and include an Approved: header<br>
with the list password in it, the message will be approved for posting<br>
to the list.  The Approved: header can also appear in the first line<br>
of the body of the reply.<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>