Skip to content
Preptima
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