-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/14/10 10:19 , Shane Hathaway wrote:
> On 06/14/2010 01:43 AM, Jens Vagelpohl wrote:
>> My question: Is there any risk associated with ignoring the failure
>> during packing? The latest object versions for the persistent objects in
>> question do not have the problematic attribute anymore, so the latest
>> records are "safe" and will not cause the AttributeError, anyway.
> 
> In the general case, a failure to unpickle could be caused by some
> temporary condition, so we can't ignore it.  For example, a broken
> __setstate__ method could be involved.  Ignoring unpickling errors could
> cause the pack to not discover all references and possibly delete more
> objects than it should.
> 
> In your case, you have already determined that this specific pickle is
> permanently broken, so the references from it don't matter and packing
> is probably safe.  However, can you be certain that the rest of your
> database is free of temporarily broken pickles?  If I were you, I would
> add some logging to ensure the exception handler is triggered only once,
> pack, and then revert the ZODB code change.

Hi Shane,

The exception handler is triggered once for every broken pickle, I'm
guessing that's what you mean by "once". The broken pickle represents a
very simple persistent object that does not have any further persistent
subobjects itself, and even its absence won't break the application. The
plan was indeed to patch the code just for packing and then restart
without the change.

jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkwV6CIACgkQRAx5nvEhZLJu1ACeLjyg/3yhc8SkGG6rdLxY4jz5
J6gAn0eLwla203gIzzPfAHy+fEhZUWQV
=7smq
-----END PGP SIGNATURE-----
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to