On Monday, March 3, 2014 5:26:29 AM UTC-5, Simon King wrote:
>
> > 
> > Partially innocent question: If one of the flushes you describe above 
> fails 
> > (say with an integrity error), then the transactions would be left in 
> need 
> > of a rollback on all engines and definitely no data would be committed? 
> > 
>
> Again, I would assume so. 
>
>
Yep.  You can look at the internals of the 'Transaction' package and cross 
reference to the zope.sqlachemy to see exactly how it works.

IIRC, the implementation of the two phase commit basically has everyone 
flush on Phase1, then report back as a "vote".  If there are any negative 
votes, the transaction manager instructs everyone to fail and rollback as 
Phase2.   If you had a flush that caused an integrity error before trying 
to commit, that would still trigger an issue. 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to