Pag 144-165

Atomic Transactions

<aside> 💡 Up until both parties have signed on the dotted line (committed), either one can back out and it is as if nothing ever happened, but at the moment they both sign (commit), they pass the point of no return and the transaccion must be carried out.

This all-or-nothing property defines atomic transactions

</aside>

Untitled

Properties of atomic transactions

Transaction State
Completed Commit (permanent change)
Fails to complete Rollback to initial state

Transactions Primitives

Untitled

Properties of Transactions

Untitled

  1. Atomic: Suceden o no suceden las transacciones completas
  2. Consistent: Se cumplen las invariantes antes y despues de la transaccion (por ej la ley de conservacion del dinero)
  3. Isolated (serializable): Ante el mundo externo, parecieran que las transacciones fueron ejecutadas secuencialmente. El scheduller se encarga de quedarse con escenarios validos
  4. Durable: Los commits son permanentes.

Nested Transactions