SpinTheMic
Pro

Interview practice question

Two users edit the same document

System Design · Databases · Intermediate

Two users edit the same record at the same time, and one person's changes silently disappear. How do you prevent this?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Lost update problem.
  • Optimistic locking with version column.
  • Update only if version matches.
  • On conflict, show user and merge/retry.
  • Or real-time collaboration for docs.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics