[ZODB-Dev] RE: [Zope-Annce] ZODB 3.2.4 release candidate 1released

Dieter Maurer dieter at handshake.de
Tue Sep 14 15:01:56 EDT 2004


Chris McDonough wrote at 2004-9-14 00:38 -0400:
> ...
>Despite the special behavior of POSKeyError (a particular object can't
>be loaded), it seems that catching one inappropriately can produce the
>same sort of app-level inconsistencies as any other kind of error.

I have code that expects "POSKeyError"s because it looks at
old ZODB state (state as it was at a given time; because some
objects states at that time might have been packed away, "POSKeyError"s
are inevitable). Of course, it catches "POSKeyError".

I would not be happy when the occurence of a "POSKeyError" would
make it impossible to commit the transaction. Of course,
the connection that looks at the state in the past will not allow
old state to be modified but other connections may look
at current states and may want to change them.

*ALL* exceptions can potentially affect app-level invariants.
Nevertheless, there are for (almost) all types of exceptions use cases
to catch them -- provided you know what you do.

Use this "sticky" mechanism with care only...

-- 
Dieter


More information about the ZODB-Dev mailing list