MicrolearnENPTES

Transactions and isolation

Lesson 18 of 40 · Sys.Micro

All-or-nothing changes, and what concurrent transactions are allowed to see.

Two writes: subtract from Ana, add to Bruno. If the server crashes between them, $50 disappears. If someone reads in the middle, the totals do not add up.

Lost updates and how locks or atomic ops prevent them

Check yourself

Two requests each read a stock count of 5, subtract 1 and write 4. Which fix is simplest and safe?

Do it in the browser: a real system design tool, a short mission and instant feedback. No install.

Start this lesson — free
← Consensus and leadersFiles and media →

All lessons · Sys.Micro