[Zope] TM and commit/abort regarding RDBMS

Marco Bizzarri m.bizzarri at icube.it
Wed Jan 12 05:04:56 EST 2005


Hi all.

Thanks to suggestions provided by Dieter on this mailing list, we've 
been successfull in creating transaction-aware objects, which correctly 
register.

My next question is where I could find more information about the 
protocol used by Zope/ZODB with TM-aware classes. I think it is a two 
phase commit, but, in this case, I've some doubt.

The two phase commit, IIRC, works as follows:

phase 1) all the involved parties in a transaction are asked if the 
transaction should commit or abort

phase 2) if all the parties agrees on commit, then commit (i.e. call the 
commit for) all objects, otherwise abort.


Now, if I understand correctly, phase 1) is done in the tpc_vote. 
According to the implementation of some DA (ZMysqlDA, ZPsycopgDA), the 
tpc_vote is actually not defined, therefore it will always vote for 
finalizing.

At this point, all transactions will try to commit... including the open 
database transaction.

The question are two:

1) where can I learn more about this process inside Zope?

2) is there a scenario where a commit from Zope will face an abort from 
the RDB (i.e. Zope will call the commit, and the RDB will refuse due to 
concurrency problems) ?

Thanks to all for patience and support.

Regards
Marco


More information about the Zope mailing list