System Design · Middle · Question 24 of 75
How do you handle conflicts when two users edit the same record?
- ✓Correct answer: A version or ETag: the server rejects a stale update
- 2The last one to save is always right; conflicts don't matter
- 3Lock the record for everyone while it is being viewed
Explanation
The client sends If-Match: <etag> or a version field; if the record has already changed, the server returns 409/412 and the UI offers to refresh or merge changes. "Last write wins" silently loses someone else's work.