Advanced Topics in Computer Systems
Fall 2001
Joe Hellerstein & Anthony Joseph

Degrees of Consistency (a/k/a Isolation Levels)

Despite all the discussion of ACID, sometimes it's nice to sacrifice semantic guarantees for the sake of performance.  The goal is to let individual transactions choose this WITHOUT messing up the database or the other transactions that do care.

Gray, et al.: Degrees of Consistency

First, a definition: A write is committed when transaction if finished; otherwise, the write is dirty.

A Locking-Based Description of Degrees of Consistency:

This is not actually a description of the degrees, but rather of how to achieve them via locking. But it’s better defined.

A Dirty-Data Description of Degrees of Consistency

Transaction T sees degree X consistency if...

Examples of Inconsistencies prevented by Various Degrees NOTE: if everybody is at least degree 1, than different transactions can CHOOSE what degree they wish to "see" without worry.  I.e. can have a mixture of levels of consistency.

Adya, et al. : Generalized Isolation Levels

Gray et al's definitions (and the resulting ANSI standards) are not implementation-independent, and semantics are ill-defined.

Want an implementation-independent semantic isolation levels which is as permissive as possible (most possible schedules allowed).

Key insight: many dependencies are multi-object.  Capture those, and you'll get the right semantics.

Conflicts in Adya's Serialization Graphs:

Direct Serialization Graph: Now we can talk about isolation in terms of serialization graphs and "histories" ("schedules"), NOT implementation.

Adya's Isolation Levels
Try to Generalize Gray's.  PL-x = "Portable Level x".

Modeling Mixed-Mode Systems