[MUD-Dev] On Lockless Threading and X/Open XA

Bruce bruce at puremagic.com
Mon Aug 7 13:11:31 CEST 2000


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

 - Bruce



_______________________________________________
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