Ian McCallion wrote:
>
> Christopher Cobb wrote:
> >
> > This is the fatal flaw in a two-phased commit.  As far as I know, a two-phased 
>commit can never solve this problem (even though this is the problem it is apparently 
>designed to solve).
> >
> > It can come 'close' in a logical sense if everything but the very last possible 
>atomic write is performed during phase 1.
> >
> > However, it can never fully deal with transmission or media failures in the later 
>parts of the phase 2 commits.  The whole point is that you cannot undo a commit.
> >
> > If anyone else knows different, please speak up.
>
> 2-phase commit is not designed to cope with media failures - it is designed to
> cope with crashes.

Take the following scenario:  three systems are participating in a
two-phases commit.  All three systems pass phase 1 and agree to commit.
Then phase two begins.  System 1 commits. System 2 commits.  But system
three has crashed and does not commit.

The two-phased commit is broken.

A single-system 'normal' commit doesn't have this problem because the
whole transaction will have crashed before completing.  Two-phased
commits are suseptible to transmission and media failures -- and
crashes.

> Media failures are definitely not 100% fixable. If your
> entire system is nuked no amount of software will get the data back.

However, if the two other systems are still alive, they will think the
transaction completed successfully.

>
> If by transmission failures you mean communication failures between two parts of
> a distributed transaction then 2-pc does solve them - when communication is
> eventually resored the transactions will be committed or backed out correctly.

I would use 'if', not 'when'.

>
> Ian McCallion
> Alexis Systemsa Limited

cc

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to