0

I've learned about this anomaly from these papers: https://www.cs.umb.edu/~poneil/ROAnom.pdf (original) https://johann.schleier-smith.com/blog/2016/01/06/analyzing-a-read-only-transaction-anomaly-under-snapshot-isolation.html (short and easy explanation)

Can somebody please explain why is this considered an anomaly? AFAIK, a read-only transaction should see committed changes at the time of its execution, so the result is correct.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Max
  • 21
  • 3

1 Answers1

0

It is considered an anomaly because this read-only transaction sees what it couldn't have seen given any order of transactions.

Consider an example from https://johann.schleier-smith.com/blog/2016/01/06/analyzing-a-read-only-transaction-anomaly-under-snapshot-isolation.html

You can easily order any given pair of transactions:

  • Txn2 → Txn1
  • Txn1 → Txn3
  • Txn3 → Txn2

But you can't order all three of them:

  • Txn2 → Txn1 → Txn3 wrong (according to previous table, Txn3 happened before Txn2)
  • Txn1 → Txn3 → Txn2 wrong (Txn2 happened before Txn1)
  • Txn3 → Txn2 → Txn1 wrong (Txn1 happened before Txn3)
HolisticElastic
  • 937
  • 8
  • 17