Re: [Zope] Can't reproduce :-(
Ian Sealy writes:
I've finally managed to replicate the bug consistently, so I've just submitted it to the Collector:
In fact, this problem was known but not recognized in the new context! The incompatibility between "subtransaction" and "Z SQL methods" is a well known problem documented with ZCatalog. Apparently, someone at DC decided that subtransaction are good, too, to upload images. Maybe, this was not so good an idea. While for ZCatalog, subtransactions can be disabled, this apparently is not the case for image uploads. Dieter
Dieter Maurer wrote:
Ian Sealy writes:
I've finally managed to replicate the bug consistently, so I've just submitted it to the Collector:
Apparently, someone at DC decided that subtransaction are good, too, to upload images. Maybe, this was not so good an idea. While for ZCatalog, subtransactions can be disabled, this apparently is not the case for image uploads.
Having browsed through Image.py, the problematic bits lvie in File.py, so both file and imaeg uploads are affected :-( Also, it doesn't look like subtransactions are done properly, it looks like a real hack by the comments. This could end up being a real pain :-S I wonder what effort it would take to sort out subtransactions? What about just putting a try: ... except AttributeError around the commit_sub call in Transaction.py? What bad effects would that have? cheers, Chris
Chris Withers writes:
.... What about just putting a try: ... except AttributeError around the commit_sub call in Transaction.py? What bad effects would that have? That would probably not be a good idea as it could hide serious problems. ZCatalog has a similar "try: ... except" and in its case, many trivial bugs are hidden thereby.
"hasattr(...,'commit_sub')" and "hasattr(....,'abort_sub')" would be a better approach. Dieter
participants (2)
-
Chris Withers -
Dieter Maurer