51a: Database Race Conditions

  • Dirty writes: It happens when a transaction overwrites the value that is written by another transaction that hasn’t been committed yet.
  • Dirty reads: A transaction reads a value from a write transaction that is not committed yet.
  • Fuzzy Read: It happens when a transaction sees two different results when reading a value twice. When the difference is caused by committing another transaction, the value comes from pre-commit and after-commit.
  • Phantom Read: It happens when a transaction reads a set of objects whiles another transaction changes some of the data; thus, it affects the result of the read.

This note is mentioned in:

42. 42c. 48.

If you're unfamiliar with Zettelkasten: These notes are atomic. The aim is to have one idea in a note. The connections between notes are as important as the notes themselves.

Reply via email

or comment below.