[MUD-Dev] On Lockless Threading and X/Open XA
Greg Underwood
gunderwood at donet.com
Tue Aug 8 16:21:31 CEST 2000
Bruce writes:
> Greg Underwood wrote:
> > My initial thought would be to have the 2PC be the commit part of the C&C.
> > Any reason something that simple wouldn't work?
> >
> > It's been a while since I did an in-depth read on either protocol, but I
> > don't think 2PC is necessarily anathma to a C&C approach. IIRC, what it
> > buys you is the ability to rollback failed, partial commits.
>
> I was somewhat wrong in my thinking of what phase 1 of two phase commit
> was. It really is:
>
> Phase 1: Prepare. Ask everything if it is ready and able to commit.
> If
> so, move along to phase 2. If not, immediately rollback everything.
> Phase 2: Commit. Everything has said in the previous phase that it
> was
> ready and able to commit. At this point, everything can commit.
>
> This works just fine with both C&C and some of the other schemes for
> deadlock-free multithreading, since you can query in phase 1 and at that
> point get an answer. The only problem that might arise then is that the
> complete resolution might not be as immediate. I will remember next
> time to not confuse lock acquistion with 2PC. :)
Wow. I guess I really did learn something from those database classes.
And I thought they were a complete waste of time. Guess that'll learn me.
;)
I actually was a little sad when I had to drop the final class part way
through (work... :P). We were just getting into massive parallelization of
algorithms. Pretty neat stuff, in spite of the professor's complete lack
of teaching ability.
-Greg
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list