Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Because read locks are not replicated, it's possible that another transaction is mapped to a new primary replica and invalidates a read for the current not yet committed transaction.

Assume a transactions

T1: a= r1(x), w1(y), c1

T2: w2(xr2(y), w1(z), c2c1

Due to PR1 failure and a lost read lock, a following history is possible.

H = r1(x) w2r2(x) c2 w1(y) c1

Assume the RO transaction T3 and the history

H2 = r1(x) w2(x) c2 r3(x) r3(y) w1(y) c1

The RO transaction will return the inconsistent result to a user, not corresponding to any serial execution of T1, T2, T3

This is illustrated by the diagram:

Image Removed

Note that H2 is not allowed by SS2PL, instead it allows

H3 = r1(x) w1(y) c1 w2(x) c2This history is not serializable.

We prevent this history by not committing TX1 if its commit timestamp lies outside lease ranges.

...