Module 4: Transactions & Consistency: Mistake Clinic
This clinic turns wrong moves into reusable judgment. Use it after each practice page and again before the quiz or checkpoint.
Module-Specific Mistake Radar
Start with these traps. Replace or extend them with real mistakes from your own work.
| Mistake to look for | Where it shows up | Symptom | Repair evidence |
|---|---|---|---|
| Finishing Isolation and Anomalies Lab with only a final answer | Isolation and Anomalies Lab | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Saga Design Workshop with only a final answer | Saga Design Workshop | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Consistency Model Translation Drill with only a final answer | Consistency Model Translation Drill | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Transactions Code Katas with only a final answer | Transactions Code Katas | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Treating ACID Properties: What Each Actually Guarantees as vocabulary instead of a tool | ACID Properties: What Each Actually Guarantees | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
| Treating Atomicity and Durability via WAL and Recovery as vocabulary instead of a tool | Atomicity and Durability via WAL and Recovery | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
Practice Mistake Checks
Pull any miss from these checks into your mistake log.
Isolation and Anomalies Lab
Source: practice/01-isolation-and-anomalies-lab.md
- "I used a transaction, so concurrent updates are safe." Demonstrate on counter.
- "I'm at Serializable, so I never need to retry." Demonstrate
SQLSTATE 40001and write the retry wrapper. - "Postgres Repeatable Read gives me ANSI Repeatable Read semantics." Show where it differs (write skew).
- "My app-level uniqueness check is enough." Show a concurrent signup race that succeeds despite the check.
Saga Design Workshop
Source: practice/02-saga-design-workshop.md
- "My compensation just calls DELETE on the record the forward step created." Shows you did not consider observability, audit trail, and events already emitted.
- "If compensation fails, we log and move on." Shows no reasoning about split state; document the escape hatch.
- "We'll use eventually consistent events to drive the saga." Fine, but name the ordering guarantee (causal? session? none?).
- "Each step is idempotent because we use unique IDs." Show where the idempotency is actually enforced: DB constraint, application check, or broker deduplication?
Consistency Model Translation Drill
Source: practice/03-consistency-model-translation-drill.md
- "DynamoDB strongly consistent is linearizable." Is it? Under all conditions?
- "I have read-your-writes, so my cross-user ordering is fine." Is it?
- "Cassandra with QUORUM gives serializability." Does it?
- "I need strong consistency" is a complete requirement. Is it?
Repair Protocol
For each real mistake:
- Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
- Name the hidden assumption.
- Repair the artifact.
- Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
- Add one retrieval card beginning with Check... before... or Do not use... when....
Mistake Log
| Date | Mistake | Symptom | Root cause | Repair evidence | Retrieval card |
|---|---|---|---|---|---|
| Starter | Pick one radar row above | Explain how it would fail in this module | Name the assumption | Add a counterexample or corrected artifact | Write the card before closing the page |
Completion Standard
- At least five real mistakes are logged.
- At least two mistakes include a counterexample or failing test.
- At least one mistake connects to an older semester skill.
- At least one correction changes code, a proof, a diagram, a command transcript, a query, or a design decision.