[ZODB-Dev] transactions, data manager order

Jim Fulton jim at zope.com
Thu Sep 9 14:55:39 EDT 2010


On Tue, Jun 22, 2010 at 4:58 AM, Nitro <nitro at dr-code.org> wrote:
> Hello,
>
> I'm writing a custom data manager. The data manager should execute before
> the connection's data manager.

I don't know what that means.

> So I provided the "sortKey" method. This
> works fine for the usual commit().

In particular, sortKey exists to address a deadlock that
can occur in 2-phase commit.

...

> This means for a sequence such as
>
> transaction.begin()
> transaction.get().join( myDataManager )
> transaction.savepoint()
> transaction.rollback()
> transaction.commit()
>
> the data managers are not sorted unless commit is encountered. If I move
> the sorting code to the join() method instead, I get the proper search
> order.
>
> Is this a bug?

No. sortKey is intentionally used just for commits.

Why do you want savepoints to execute in sortKey order?

Jim

--
Jim Fulton


More information about the ZODB-Dev mailing list