Ledger migration
380M payment rows moved to a new ledger with zero downtime.
Tech lead and migration owner- Exactly-once refunds across two ledgers.An idempotency key on provider and event ID, with a unique constraint as the last line of defense.
- Dual writes drifted on partial failure.Transactional outbox, reconciled nightly. Found a clock-skew bug in the old writer.
- The backfill starved production.Throttled by replica lag, not a fixed rate. It pauses itself under load.
- Prove nothing was lost.OpenChecksums match. Concurrent refund races are sampled, not proven.



