Layer 3 · Go deeper · 6 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Build-up · 6 steps
Watch autopay act on a rollback
One wallet, one debit that never commits, and a job that reads too early. Every committed state of the row says ₹1,000.
Step 1 of 6
One wallet, ₹1,000
Wallet 42 holds ₹1,000, enough for a ₹500 electricity bill. Every committed state of this row will say ₹1,000.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Your MySQL autopay job runs at READ UNCOMMITTED because it’s “faster”. It failed a bill on a debit that rolled back. What now?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“On SQL Server, a report scanning a busy Orders table keeps queueing behind writers. Its totals must tie out. What do you do?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A Swiggy-style order service inserts an order, publishes OrderPlaced to Kafka and sets PAID in Redis. Then the payment is declined. What do you change?”
All three happen inside the transaction, before COMMIT.
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“One transaction is loading 50 million rows into a SQL Server staging table. Ops want to watch its progress. How do you count?”
Your move. Pick an approach:
Build-up · 5 steps
Keep the order inside until COMMIT
Isolation levels describe one database. An event or cache write sent before COMMIT is a dirty read for whoever receives it.
Step 1 of 5
An order, not yet real
The order service inserts an order inside a transaction. Until COMMIT it may still roll back, like a draft that might never be sent.