pa-06 — Verification
One command
cd pa-06-partitioning-consistency && bash scripts/verify.sh
What the tests prove
| Test | Invariant |
|---|---|
TestConsistentHashingMinimalMovement | removing 1 of 3 nodes moves ~1/3 of keys (<50%) |
TestModHashMovesEverything | mod-N moves most keys when N changes (the reshuffle) |
TestConsistentHashingBalance | with 200 vnodes, each node is within ~25% of ideal load |
TestQuorumStrongWhenOverlap | R+W>N → a worst-case read sees the latest write |
TestQuorumStaleWhenNoOverlap | R+W≤N → a read may be stale |
All under -race.
What "green" does NOT guarantee
- No real replication/convergence. Read-repair, anti-entropy, hinted handoff, and conflict resolution are exercises / the Dynamo toolkit.
- Versions, not values. Consistency is modeled by recency; concurrent- write conflict resolution (vector clocks/CRDTs) is out of scope.
- Consensus is elsewhere. Strong consistency via a replicated log is db-16…20.