All Questions
Dealing With Contention easy

In a database, what happens if Transaction A locks a row and Transaction B tries to modify the same row?

  1. A Transaction B crashes immediately.
  2. B Transaction B overwrites the data.
  3. C Transaction B waits (blocks) until Transaction A commits or rolls back (releasing the lock).
  4. D Transaction A is killed.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions