[Zope-dev] connection commit ordering
Laurence Rowe
l at lrowe.co.uk
Fri Jun 18 07:06:30 EDT 2010
On 18 June 2010 01:24, Leonardo Rochael Almeida <leorochael at gmail.com> wrote:
> By the way, this issue is completely separate from the
> two-phase-commit discussion that we had recently, since all the
> connectors involved here are fully transactional.
As you can see here:
http://zope3.pov.lt/trac/browser/Zope/trunk/src/Shared/DC/ZRDB/TM.py
def tpc_vote(self, *ignored):
self._finalize = 1
def tpc_finish(self, *ignored):
if self._finalize:
try: self._finish()
finally: self._registered=0
The transaction manager is only doing one phase commit. It sorts first
as it commits in the second phase. If you change the sort order, you
lose the guarantee of transactional integrity.
Perhaps a better way to solve this would be to include the zope
transaction id in the table, then in the background thread only
reindex the queued items with a tid <= the current tid of the
connection.
Laurence
More information about the Zope-Dev
mailing list