[Zope-CMF] Re: Recipe for ReadConflictError hell

Dieter Maurer dieter at handshake.de
Thu Jan 13 16:16:40 EST 2005


Chris Withers wrote at 2005-1-12 13:46 +0000:
> ...
[DM]
>>   I found out that the "_v_eek" attribute
>>   (from "OFS.SimpleItem.SimpleItem.raise_standardErrorMessage")
>>   were written through the surrogate into the underlying
>>   "FSDirectoryView" object: The "__setattr__" of
>>   "DirectoryViewSurrogate" writes to both the surrogate
>>   and the "FSDirectoryView" itself. This caused very
>>   strange error handling behaviour for us (fixed
>>   by defining a "__delattr__" along the same line as "__setattr__").
> >
>> This behaviour of surrogates means that one must use "_v_" variables
>> to avoid ZODB writes even though the surrogates themselves are not persistent.

[CW]
>Hmm, okay, but _v_eek is a _v_ attribute, so what's the problem here?

Yes.

The problem may be that you write through a non-persistent object
into a persistent object without being aware of this.
*If* this happens with "_v_" attribute, then there is no bloat,
but if it happens with a normal attribute ...

>Regardless, has this been submitted as a bug anywhere?

No. I just defined "__delattr__" in our local Zope copy...

No, I will not file a bug report...
If you think the problem is big enough, simply define the
"__delattr__".

-- 
Dieter


More information about the Zope-CMF mailing list