Code AnalysisBeginner 60s
Dual Write Ledger and Event Bug
Pseudo-code:
def transfer(a, b, amt):
db.tx: ledger.debit(a, amt); ledger.credit(b, amt)
db.commit()
broker.publish('transfer.done', {a, b, amt})
What is the classic failure mode of this dual write?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.