All Questions
Dealing With Contention hard

Transaction T1 locks Row A on Shard 1 and wants Row B on Shard 2. Transaction T2 locks Row B on Shard 2 and wants Row A on Shard 1. How is this Distributed Deadlock typically detected?

  1. A It cannot be detected.
  2. B Timeouts. Since building a global dependency graph is expensive and slow, most distributed systems simply kill transactions that wait longer than X seconds.
  3. C By a central coordinator.
  4. D By checking CPU usage.

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

Get the app

Related questions