Lesson 02.6
Serializable transactions
Serializable transactions prevent outcomes that could not happen if transactions ran one at a time, usually by blocking or aborting conflicting work.
Two lifeguards, one snack break
Ava and Ben are lifeguards. The pool's big rule: at least one lifeguard must always be watching. Both want a snack break.
Each one checks before leaving. Can they still both end up on break?
In this lesson you'll
- 1Explain how two changes that each look fine can break a rule together, and why a second try is needed
- 2Watch one lifeguard take a break safely.
- 3Guess what happens when both check at the same time.
- 4Have the head lifeguard approve breaks to protect the rule.