[Zope] BUG: subtransaction not handled correctly in "manage_addFile"
Ian Sealy
Ian.Sealy@bristol.ac.uk
Fri, 26 Jan 2001 10:07:38 +0000 (GMT)
Dear all,
Does anyone fancy earning a bit of pocket money? I've got a Zope problem
that I can't solve because my Python isn't good enough and my
understanding of the ZODB is pretty much still zero.
We've got a simple Zope application that allows users to upload files
without going near the Zope management screens. For more information on
this and what the problem is, see:
http://www.egroups.com/message/zope/48084
The basic thrust is that when a large file is uploaded and
subtransactions are needed, something goes wrong.
Dieter Maurer sent a reply helpful reply (thanks Dieter) that's archived
at:
http://www.egroups.com/message/zope/48116
In it, he said:
> On the other hand, the bug is triggered by
> something. I would expect, it is an
> exception in "ZODB.Transaction:261",
> AttributeError "commit_sub".
> You can verify this, if you put an
> "import traceback; traceback.print_exc()"
> below line 270.
> Problably some non-subtransaction object
> managed to enter in "subjars".
Sure enough, Dieter was right. I get:
Traceback (innermost last):
File "/usr/local/zope/lib/python/ZODB/Transaction.py", line 261, in commit
j.commit_sub(self)
AttributeError: commit_sub
Dieter told me to file a bug report (and he's told a couple of other
people the same thing since) but I haven't yet because I'm having
trouble replicating the problem. I can't replicate it by just copying
the two salient methods to a fresh Zope installation of Zope 2.2.5.
Other messages (e.g. < http://www.egroups.com/message/zope/48492 >) made
me suspect that it was a problem with a Product, but installing the
Products I'm using (SiteAccess, ZOracleDA, ZPyGreSQLDA and
smbUserFolder) to this fresh installation didn't replicate the bug. I
only see it if I copy over the Data.fs from the original installation.
Other people seem to have come across the same problem in different
contexts. Have a look at:
http://groups.yahoo.com/group/zope/messagesearch?query=commit_sub
We need to get this fixed ASAP so my boss has told me to send this
message to the list and offer 400 pounds (sterling) to anyone who can
fix this bug. Any takers?
Cheers,
Ian