At 11:12 AM 12/2/2000 -0500, Christopher Cobb wrote:
>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.

Actually, no.  By definition (the Open Group's DTP standard), the
Transaction Manager must maintain the uncompleted transaction in the
prepare state until the resource becomes available and then complete the
transaction commit.  Once the transaction manager issues the commit to the
various participants there is no going back.  Unfortunately, all the
outstanding transaction locks will be held until the transaction is
completed or manually aborted, resulting in the dreaded heuristic damage
condition.


>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.


Nope, those two systems will still see the transaction as incomplete.


===

Tad W. Stephens
System Engineer         BEA Systems
770.614-3756            [EMAIL PROTECTED]

===========================================================================
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