[ZODB-Dev] Clearing sticky RCEs after a transaction abort

Dieter Maurer dieter at handshake.de
Thu Sep 16 14:21:11 EDT 2004


Chris McDonough wrote at 2004-9-15 22:05 -0400:
> ...
>It appears that the only place that the _conflicts set associated with a
>connection is cleared wholesale are during a Connection's tpc_abort or
>tpc_finish methods, but no tpc_ methods are called when a transaction is
>aborted, so the _conflicts dict is never cleared for aborted
>transactions.

That's why I have put (in our private copy of "Connection.py")
"flush_invalidation" calls in "_setDB" and
the "abort" code when the connection itself has registered.

    def abort(self, object, transaction):
	...
        if object is self:
            # Note: when a transaction with subtransactions is aborted
            #  "self._tmp is None" will be false.
            #  However, this should not be a serious problem
            self._flush_invalidations(self._tmp is None)

Our "_flush_invalidations" has an additional argument which
controls whether sticky object can be garbage collected
(ZODB extension posted to "zodb-dev", but almost surely
lost ;-) ).

-- 
Dieter


More information about the ZODB-Dev mailing list