Re: Deadlock in Index (where index is B+ tree) Locking with Intention Locks

From: Novice <6tc1_at_qlink.queensu.ca>
Date: 12 Dec 2002 16:27:25 -0800
Message-ID: <b80e4a77.0212121627.431f7441_at_posting.google.com>


Actually it isn't serialized at the root node.

Perhaps your misunderstanding is due to the concept of the lock IX (Intentional Exclusive Lock). This lock allows other Intentional Exclusive locks to be obtained (or such is my understanding).

For instance the following ordering is allowed:

T1 - IX(root) 
T2 - IX(root) 
T1 - IX(B) 
T2 - IX(B) 
T1 - IX(D) IX(H) X(P) X(H) X(D) X(B) U(P) U(H) U(D) U(B) U(root)
T2 - IX(D) IX(H) X(O) X(H) X(D) X(B) U(O) U(H) U(D) U(B) U(root)
T3 - IX(root) IX(B) IX(D) IX(G) X(N) X(G) X(D) X(B) U(N) U(G) U(D)
U(B) U(root)

And of course will not result in deadlock. Basically, I'm trying to confirm or deny the theory that "all locking protocols that allow concurrency can result in deadlock".

The index locking (with a tree) appears to me to be an exception to this rule.

Thanks for your suggestion though... I don't mean to sound unappreciative of your feedback.

Thanks,
Tim

"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news:<ew4K9.7$cw5.102_at_news.oracle.com>...
> "Novice" <6tc1_at_qlink.queensu.ca> wrote in message
> news:b80e4a77.0212120907.7cfb153d_at_posting.google.com...
> > And let's imagine the following scenario:
> > T1 - IX(root) IX(B) IX(D) IX(H) X(P) X(H) X(D) X(B) U(P) U(H) U(D)
> > U(B) U(root)
> > T2 - IX(root) IX(B) IX(D) IX(H) X(O) X(H) X(D) X(B) U(O) U(H) U(D)
> > U(B) U(root)
> > T3 - IX(root) IX(B) IX(D) IX(G) X(N) X(G) X(D) X(B) U(N) U(G) U(D)
> > U(B) U(root)
> >
> > There is no permutation I could find of the above that would result in
> > deadlock.
> >
> > If you can think of a more simple set of transactions that would
> > result in deadlock I would also be interested in that.
>
> Is your protocol deadlock safe? Maybe. But it's not very interesting, since
> all your transactions are serialized on the root node. You need to unlock
> root node early, and then watch problem to happen!
Received on Fri Dec 13 2002 - 01:27:25 CET

Original text of this message