Recover a failed pipeline without duplicating valid writes
A consumer committed order 42 then crashed before acknowledging the message. A second operator suggests restoring the entire database. Which failure actually occurred?
Recover a failed pipeline without duplicating valid writes
Replication protects availability but also copies validly committed mistakes. Keep independent restoration points for logical corruption. For retries, persist the event key and its effect together so a failure between the sink commit and acknowledgment can be recovered safely.
In the recording
Use idempotent writes or deduplication by key to prevent downstream duplicates when a pipeline restarts.
Work through the decision
A consumer committed order 42 then crashed before acknowledging the message. A second operator suggests restoring the entire database. Which failure actually occurred?
Check your reasoning
The committed order is valid. Replay the delivery using a durable unique order key and acknowledge only after a successful commit. Use a historic restore for corrupted data and a tested standby for loss of availability, with recovery targets defined for each case.
Decisions and tradeoffs
- Idempotent replay
- A stable event key and conditional insert or merge protect the sink when a committed event is delivered again.
- Point-in-time restore
- Recover to an isolated known-good timestamp before a bad change, then reconcile legitimate later writes before cutover.
- Regional failover
- Promote a prepared replica or standby after a regional outage, with a plan for routing, consistency and replication lag.
- Source reconciliation
- Compare durable source records to sink keys and totals to locate missing deliveries and decide which intervals to replay.
Choose an independent recovery point
Picture a valid write at 14:02, an erroneous update at 14:06 and a replica that applies it at 14:07. Failing over at 14:08 can preserve the error. A restore to a separate destination just before 14:06 can recover the earlier values. Reconcile valid changes after that point and use a controlled cutover. For an infrastructure outage with clean data, measure standby lag and promote according to the agreed recovery plan.
Practice the guide skills
- Test a crash after the sink commit and before acknowledgment.
- Document zonal and regional failure behavior.
- Verify a restored copy against known good and bad records.
- Measure recovery point and failover time in a rehearsal.
Official objectives for this lesson
Related lesson · Choose failover or recovery based on what failed
Recover a failed pipeline without duplicating valid writes quiz
Answer 3 questions. Check each answer for an explanation.