Dirty read
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    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.

    1. 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:

    2. 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:

    3. 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:

    4. 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.