hardDesignConceptMidSeniorStaff
Two users edit the same record while offline and both reconnect. How do you reconcile the two versions without silently losing one of the edits?
6 min readUpdated 2026-08-15Target archetype: Big Tech, Enterprise Captive, Product Startup
Answer
Short answer
Accepting writes on both sides means conflicts are inevitable, so the design choice is who resolves them. Last-write-wins discards an edit by clock accident; version vectors detect the conflict and hand it back; CRDTs merge deterministically but only for the operations they model.
Use conflict resolution as the thread through the two offline edits reconnect explanation: name the signal, then say what changes when it moves.
Was this answer helpful?
Likely follow-ups
- Your merge is per field and two users edited different fields of the same record. Why might that still produce an invalid record?
- How do you keep tombstones from growing without bound, and what breaks when you finally collect them?
- Where would you put a server-side invariant, such as a balance that cannot go negative, in a design that merges client writes?
- The two offline clients are the same user on two devices. Does that make automatic resolution more or less acceptable?
Related questions
- A file changes on one laptop and must appear on three others, one of which is offline. What travels over the network, and what happens when two of them edited it?hardAlso on version-vectors and conflict-resolution6 min
- A teammate says a saga can just roll everything back if step four fails. What is wrong with that, and what would you tell them to build instead?hardAlso on eventual-consistency5 min
- A driver spends part of the day with no mobile signal. How do you design the app so the round still works?hardAlso on offline-first5 min
- Two people are typing in the same chat and one is on a train. What arrives, in what order, and what do you store?hardAlso on offline-first6 min