Re: deciding whether to do work in tpc_vote or tpc_finish

Laurence Rowe <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On 8 June 2010 12:48, Chris Withers <[email protected]> wrote:
> Christian Theune wrote:
>> 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.
>
> Okay, but this is quite a common occurrence now. For example, many projects
> will use zope.sendmail and zope.sqlalchemy together...
>
> I'd guess there are a few "transactional file on disk" components out there
> that play in this area too...

As zope.sendmail commits in tpc_finish, there is no additional issue
using it with zope.sqlalchemy in 1pc than with a 2pc data manager. If
it fails you will end up in an inconsistent state whatever. It's just
that with the maildir implementation, it pretty much can't fail as it
is only a rename and that should always succeed. Really, it should
register as an after commit hook instead. When an after commit hook
fails, the error is caught, logged, and then it continues.

Laurence
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.