[Zope] Long transactions and conflict errors

Dieter Maurer dieter at handshake.de
Tue Mar 1 14:42:36 EST 2005


Pascal Peregrina wrote at 2005-3-1 10:10 +0100:
> ...
>I would like to know if during a transaction there is a way to "unlock"
>objects from which I read some values but that I don't need anymore for the
>rest of the transaction execution.

There is no need to "unlock" anything because the ZODB does not
lock anything.

There are two kinds of "ConflictError": (write) "ConflictError"
and "ReadConflictError".

You get a "ReadConflictError", when you load an object
from the ZODB (into memory) and this object was
modified since transaction start by another committed transaction.
You can try to minimize such conflicts by reading as early as
possible.

You get a (write) "ConflictError" when two transactions try
to modify the same object -- more precisely, the second transaction
gets this error. You can minimize this kind of error
by reading as last as possible (but this increases
"ReadConflictError" probability).

-- 
Dieter


More information about the Zope mailing list