Code RoomOrders charged twice
MediumPrep Room Coding #2576

Orders charged twice

On-callNetworking & APIsDistributed systemsMid–Senior~35 min

Your order-processing consumer reads from Kafka and writes to Postgres. At 13:00 finance reports some orders are charged twice. Dashboards: the consumer group rebalanced at 12:58 (a pod was OOM-killed and restarted); consumer lag briefly spiked then recovered; you commit Kafka offsets AFTER processing each message; the charge call to the payment provider and the DB insert are separate steps with no shared transaction. No code deploy. How do you triage and mitigate?

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 35 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.