Re: how to build a database from scratch

From: vc <boston103_at_hotmail.com>
Date: 8 Dec 2006 10:23:53 -0800
Message-ID: <1165602233.920066.41320_at_16g2000cwy.googlegroups.com>


Sampo Syreeni wrote:
> On 2006-12-08, vc wrote:
>
> >> I meant to say "ordered 2PL" or "2PL like that".
> >
> > What is "ordered 2PL"?
>
> The thing that was being described. I don't know its True Name. Since
> all that was specified was that strict 2PL is used, locking was at table
> granularity, and tables were ordered for update, I took it to mean a
> scheme intermediate between conservative 2PL where all locks are
> acquired in advance and held to termination (in order or not in order,
> we don't care) and strict 2PL (incremental acquisition in any order and
> release of write locks at termination), which acquires as it goes and
> releases read locks early, but does so in a global order at table
> granularity and rolls back all changes after the first acquisition
> failure.

I think that it is pretty obvious that global lock acquisition ordering is hardly practically possible because the transaction read/write sets are not generally speaking known beforehand. Also, are not you confusing global lock ordering with the wait-for graph deadlock avoidance technique ? With the former, you do not need to abort/restart the transaction.

>Such a scheme seems intuitively reasonable because it will tend
> to lead to roundrobin updates and with it static analysis can be used to
> arrive at a conservative lower bound for the lock set without causing
> the policy to ever exclusively lock anything that the transaction isn't
> about to modify.

> --
> Sampo Syreeni, aka decoy - mailto:decoy_at_iki.fi, tel:+358-50-5756111
> student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
> openpgp: 050985C2/025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Received on Fri Dec 08 2006 - 19:23:53 CET

Original text of this message