Multigranularity Locking (MGL)
Allow different txns to lock at different granularity
- big queries should lock coarse-grained data (e.g. tables)
- short transactions lock fine-grained data (e.g. rows)
Lock manager can’t detect these conflicts
- each data item (e.g., table or row) has a different id
Multigranularity locking “trick”
- exploit the natural hierarchy of data containment
- before locking fine-grained data, set intention locks on coarse grained data that contains it
- e.g., before setting a read-lock on a row, get an intention-read-lock on the table that contains the row