State safety
Name the state that survives restart and the write that makes retry safe.
Independent adaptive mocks for Web Crawler and Job Scheduler, plus a transfer pressure drill for Price Tracking.
Follow the Week 4 delivery pattern: blank-page first, source reading second, DDIA decision third, spoken close, contiguous algorithm practice, evening recall.
| Time | Block | Required output |
|---|---|---|
| 08:30 | Wake + setup | Open this page, start the board, write the day question: Can you produce Staff mechanisms under clock pressure without reading? |
| 08:50—09:00 | Board set | List entities, queues, leases, retry states, dedupe keys, metrics before reading. |
| 09:00—10:05 | Blank-page attempt + Hello reading | Run Web Crawler 45 minutes, then Job Scheduler 45 minutes. The moderator only injects failures that follow your own design choices. Capture the first missing invariant, not a long transcript. |
| 10:05—10:45 | Deep dive + DDIA decision | After both mocks, repair exactly two dives: one crawler dive and one scheduler dive. Each repair must include invariant, failure, recovery, and metric. |
| 10:45—10:55 | Spoken close | Record the new default answer for politeness and for exactly-once illusion in the scorecard. |
| 14:30—16:15 | NeetCode Heap/Priority Queue | Complete contiguous slots W8-H16—W8-H18; capture invariant and bug risk for each. |
| 20:30—21:15 | Recall / Q&A / mock | Use Staff Q&A, lecture assets, or mock script for the day's system. |
Read only the listed Hello Interview headings for today's assignment. Every link is a direct day-page anchor.
Use exact sections only from Ch5, Ch9, and Ch12.
| Chapter | Exact DDIA decision section | Concrete Week 8 use |
|---|---|---|
| Ch9 | 故障注入 | Mock injects worker pause, queue redelivery, and stale lease completion. |
| Ch12 | 容错 | Score whether replay and rebuild stories are explicit. |
| Ch12 | 幂等性 | Score whether each retry path has an idempotency key or conditional write. |
Three contiguous slots today. Keep one invariant and one failure mode per problem.
| Slot | Problem | Pattern | Invariant / bug risk | Time · Space |
|---|---|---|---|---|
| W8-H16 | Network Delay Time | Dijkstra | The heap priority is best-known arrival time, not edge weight. | O(E log V) · O(V+E) |
| W8-H17 | Swim in Rising Water | best-first search | Path cost is the maximum cell height seen so far. | O(n^2 log n) · O(n^2) |
| W8-H18 | Path With Minimum Effort | Dijkstra on max edge | Relax by max(current effort, next edge effort). | O(mn log mn) · O(mn) |
One compact artifact is enough if it proves mechanism depth.
Name the state that survives restart and the write that makes retry safe.
Use a worker crash, zombie lease, redelivery, poison message, stale robots decision, or duplicate price event.
Attach lag, retry rate, duplicate suppression, stale lease reject count, host politeness violation, or alert freshness.