Skip to main content

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 forWhere it shows upSymptomRepair evidence
Finishing Isolation and Anomalies Lab with only a final answerIsolation and Anomalies LabThe 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 answerSaga Design WorkshopThe 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 answerConsistency Model Translation DrillThe 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 answerTransactions Code KatasThe 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 toolACID Properties: What Each Actually GuaranteesThe 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 toolAtomicity and Durability via WAL and RecoveryThe 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

  1. "I used a transaction, so concurrent updates are safe." Demonstrate on counter.
  2. "I'm at Serializable, so I never need to retry." Demonstrate SQLSTATE 40001 and write the retry wrapper.
  3. "Postgres Repeatable Read gives me ANSI Repeatable Read semantics." Show where it differs (write skew).
  4. "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

  1. "My compensation just calls DELETE on the record the forward step created." Shows you did not consider observability, audit trail, and events already emitted.
  2. "If compensation fails, we log and move on." Shows no reasoning about split state; document the escape hatch.
  3. "We'll use eventually consistent events to drive the saga." Fine, but name the ordering guarantee (causal? session? none?).
  4. "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

  1. "DynamoDB strongly consistent is linearizable." Is it? Under all conditions?
  2. "I have read-your-writes, so my cross-user ordering is fine." Is it?
  3. "Cassandra with QUORUM gives serializability." Does it?
  4. "I need strong consistency" is a complete requirement. Is it?

Repair Protocol

For each real mistake:

  1. Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
  2. Name the hidden assumption.
  3. Repair the artifact.
  4. Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
  5. Add one retrieval card beginning with Check... before... or Do not use... when....

Mistake Log

DateMistakeSymptomRoot causeRepair evidenceRetrieval card
StarterPick one radar row aboveExplain how it would fail in this moduleName the assumptionAdd a counterexample or corrected artifactWrite 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.