Code RoomBackfill race corrupts denormalized field
HardPrep Room Coding #2702

Backfill race corrupts denormalized field

On-callConcurrencySenior–Staff~40 min

A backfill recomputes a denormalized `lifetime_spend` on each `account` by reading the account, computing the new value, and writing it back (read-modify-write, no locking). It ran during business hours at ~3k accounts/sec. Afterward, finance finds that for accounts that placed an order *while the backfill was running*, `lifetime_spend` is wrong — sometimes missing the new order, sometimes missing the backfill's correction. Dashboards: write success 100%, no errors, no lag. How do you triage, stop the divergence, and correct the affected accounts?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 40 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.