Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Lock Fairness

Re: Lock Fairness

From: <fitzjarrell_at_cox.net>
Date: Thu, 29 Nov 2007 10:50:55 -0800 (PST)
Message-ID: <43aa7efd-2f1d-4bf3-a116-dcc16ae81b6a@y43g2000hsy.googlegroups.com>


On Nov 29, 11:58 am, Robert Klemme <shortcut..._at_googlemail.com> wrote:
> On 29.11.2007 17:49, fitzjarr..._at_cox.net wrote:
>
> > On Nov 29, 10:46 am, "shortcut..._at_googlemail.com"
> > <shortcut..._at_googlemail.com> wrote:
> >> while investigating an ORA-02049 (time-out: distributed transaction
> >> waiting for lock) I was asked which of the TX waiting for a lock will
> >> obtain the lock after it is released. I tried Concepts Guide,
> >> Administrator Guide, searched Oracle docs and Google but could not
> >> find anything meaningful on Oracle's lock fairness. I would assume
> >> that it's simply unspecified. Does anyone have more specific
> >> information about this? In practice it's certainly safe to assume
> >> nothing about the order TX's are served but I am curious... :-)
>
> > Usually the first one in the queue.
>
> Thank you, David! Sounds as if you knew something about exceptional
> cases where it is not the first one. :-) I could only speculate here
> (e.g. a TX waiting for more taken locks at the same time could be left
> waiting if another one can continue immediately). Do you have a pointer
> to further material on the matter?
>
> Kind regards
>
> robert

The 'first' one in the queue may no longer exist due to resource profile settings/software aborts/etc. Thus the second transaction would become the first, which, of course, then makes it the transaction obtaining the lock once the existing lock is released. This could go on until no transactions are left in the queue (not likely, but remotely possible).

The 'usually' refers to the queue at time X.

David Fitzjarrell Received on Thu Nov 29 2007 - 12:50:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US