Transactions & Concurrency Control
Keeping data correct when many things change it at once.
Backend Engineer
Junior
Write correct code, ship small changes safely, ask good questions.
- TransactionA group of operations that succeed or fail together.
Mid-level
Own a feature end to end without hand-holding.
Core: start here
- Race ConditionA bug where the result depends on unpredictable timing.
- ACIDAtomicity, Consistency, Isolation, Durability.
- Optimistic LockingDetecting conflicts with a version number at write time.
- Pessimistic LockingLocking rows before changing them, e.g. with SELECT ... FOR UPDATE.
7 more mid-level concepts
- Unique Constraints as a Concurrency GuardLetting the database reject duplicates instead of checking first in code.
- Read-Modify-Write RaceReading a value, changing it in code and writing it back while someone else does the same.
- Transaction BoundariesDeciding where a transaction should start and end.
- AtomicityAll or nothing.
- Lost UpdateTwo writers overwriting each other's changes.
- Atomic UpdateLetting the database do the change in one statement, like SET stock = stock - 1.
- SavepointA point inside a transaction you can roll back to.
Senior
Own a system, its failure modes, and its trade-offs.
Core: start here
- Isolation LevelsRead uncommitted, read committed, repeatable read and serializable.
10 more senior concepts
- Distributed TransactionA transaction that spans several databases or services.
- Write-Ahead LogLogging changes before applying them, for durability and replication.
- Two-Phase CommitA coordinator making all participants either commit or abort.
- Dirty ReadReading another transaction's uncommitted data.
- MVCCMulti-version concurrency control, where readers don't block writers.
- Non-Repeatable ReadReading the same row twice and getting different values.
- Phantom ReadRows appearing or vanishing between reads in one transaction.
- Database DeadlockTransactions waiting on each other's locks.
- Row Locks vs Table LocksHow much a lock blocks.
- Write SkewTwo transactions reading the same data and making conflicting writes.
Data Engineer
Junior
Build and fix pipelines from clear specs; write correct SQL.
- TransactionA group of operations that succeed or fail together.
Mid-level
Own pipelines and models end to end, including their quality.
- Race ConditionA bug where the result depends on unpredictable timing.
- Unique Constraints as a Concurrency GuardLetting the database reject duplicates instead of checking first in code.
- ACIDAtomicity, Consistency, Isolation, Durability.
- Read-Modify-Write RaceReading a value, changing it in code and writing it back while someone else does the same.
- Transaction BoundariesDeciding where a transaction should start and end.
- AtomicityAll or nothing.
- Lost UpdateTwo writers overwriting each other's changes.
- Optimistic LockingDetecting conflicts with a version number at write time.
- Atomic UpdateLetting the database do the change in one statement, like SET stock = stock - 1.
- Pessimistic LockingLocking rows before changing them, e.g. with SELECT ... FOR UPDATE.
- SavepointA point inside a transaction you can roll back to.
Senior
Design the platform's storage, processing and modeling choices.
- Distributed TransactionA transaction that spans several databases or services.
- Write-Ahead LogLogging changes before applying them, for durability and replication.
- Isolation LevelsRead uncommitted, read committed, repeatable read and serializable.
- Two-Phase CommitA coordinator making all participants either commit or abort.
- Dirty ReadReading another transaction's uncommitted data.
- MVCCMulti-version concurrency control, where readers don't block writers.
- Non-Repeatable ReadReading the same row twice and getting different values.
- Phantom ReadRows appearing or vanishing between reads in one transaction.
- Database DeadlockTransactions waiting on each other's locks.
- Row Locks vs Table LocksHow much a lock blocks.
- Write SkewTwo transactions reading the same data and making conflicting writes.
Frontend Engineer
Mid-level
Own a feature end to end without hand-holding.
Core: start here
- Race ConditionA bug where the result depends on unpredictable timing.
1 more mid-level concepts
- Optimistic LockingDetecting conflicts with a version number at write time.