[Zope-dev] deciding whether to do work in tpc_vote or tpc_finish

Christian Theune ct at gocept.com
Tue Jun 8 06:58:18 EDT 2010


On 06/08/2010 12:44 PM, Chris Withers wrote:
> Laurence Rowe wrote:
>> Committing in tpc_vote is right so long as you ensure your data
>> manager sorts last, and that there are no other data managers in the
>> transaction which are using the same trick.
>
> Why does the latter part matter?
>
> (It is, of course, the situation I'm in, where zope.sqlalchemy is
> operating in non-tpc mode (sqlite doesn't support tpc :-/) and now I'm
> writing another data manager for a service that doesn't support tpc)

Because TPC requires all participating DMs to be able to get in a state 
where committment can be guaranteed but also aborted.

A single DM may have non-TPC behaviour and you will still be fine. If 
you have more than one then it can happen that the first one committed, 
but the second one doesn't and then you can't properly roll back.

Christian

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development



More information about the Zope-Dev mailing list